Skip to content

Commit

Permalink
config: add standalone configuration (#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkode authored Mar 4, 2020
1 parent 8dfc587 commit 9358716
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 0 deletions.
77 changes: 77 additions & 0 deletions examples/standalone/standalone.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
[shared]
jwt_secret = "Pive-Fumkiu4"
gatewaysvc = "localhost:19000"

[grpc]
address = "0.0.0.0:19000"

[grpc.services.gateway]
authregistrysvc = "localhost:19000"
storageregistrysvc = "localhost:19000"
preferencessvc = "localhost:19000"
userprovidersvc = "localhost:19000"
usershareprovidersvc = "localhost:19000"
publicshareprovidersvc = "localhost:19000"
ocmshareprovidersvc = "localhost:19000"
commit_share_to_storage_grant = false
datagateway = "http://localhost:19001/data"
transfer_shared_secret = "replace-me-with-a-transfer-secret" # for direct uploads
transfer_expires = 6 # give it a moment

[grpc.services.authregistry]
driver = "static"
[grpc.services.authregistry.drivers.static.rules]
basic = "localhost:19000"

[grpc.services.storageregistry]
driver = "static"
[grpc.services.storageregistry.drivers.static]
home_provider = "/"
[grpc.services.storageregistry.drivers.static.rules]
"/" = "localhost:19000"
"123e4567-e89b-12d3-a456-426655440000" = "localhost:19000"

[grpc.services.usershareprovider]
driver = "memory"

[grpc.services.publicshareprovider]
driver = "memory"

[grpc.services.storageprovider]
driver = "local"
mount_path = "/"
mount_id = "123e4567-e89b-12d3-a456-426655440000"
expose_data_server = true
data_server_url = "http://localhost:19001/data"
enable_home_creation = true

[grpc.services.storageprovider.drivers.local]
namespace = "/var/tmp/reva/"
user_layout = "{{.Username}}"
enable_home = true

[grpc.services.authprovider]
auth_manager = "json"
[grpc.services.authprovider.auth_managers.json]
users = "users.demo.json"

[grpc.services.userprovider]
driver = "json"

[grpc.services.userprovider.drivers.json]
users = "users.demo.json"

[http]
address = "0.0.0.0:19001"

[http.services.dataprovider]
driver = "local"
temp_folder = "/var/tmp/"

[http.services.dataprovider.drivers.local]
namespace = "/var/tmp/reva/"
user_layout = "{{.Username}}"
enable_home = true

#[http.services.datagateway]
#transfer_shared_secret = "replace-me-with-a-transfer-secret" # for direct uploads
35 changes: 35 additions & 0 deletions examples/standalone/users.demo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[
{
"id": {
"opaque_id": "4c510ada-c86b-4815-8820-42cdf82c3d51",
"idp": "http://localhost:20080"
},
"username": "einstein",
"secret": "relativity",
"mail": "[email protected]",
"display_name": "Albert Einstein",
"groups": ["sailing-lovers", "violin-haters", "physics-lovers"]
},
{
"id": {
"opaque_id": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c",
"idp": "http://localhost:20080"
},
"username": "marie",
"secret": "radioactivity",
"mail": "[email protected]",
"display_name": "Marie Curie",
"groups": ["radium-lovers", "polonium-lovers", "physics-lovers"]
},
{
"id": {
"opaque_id": "932b4540-8d16-481e-8ef4-588e4b6b151c",
"idp": "http://localhost:20080"
},
"username": "richard",
"secret": "superfluidity",
"mail": "[email protected]",
"display_name": "Richard Feynman",
"groups": ["quantum-lovers", "philosophy-haters", "physics-lovers"]
}
]

0 comments on commit 9358716

Please sign in to comment.