Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/oc config #36

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Next Next commit
configuration changed
  • Loading branch information
shokri-navid committed Jul 21, 2022
commit c55693723af30156a0821d8a76fab05779eedcb4
6 changes: 5 additions & 1 deletion revad/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -31,7 +31,11 @@ spec:
- /usr/bin/revad
args:
- "-c"
- "/etc/revad/revad.toml"
- {{ if eq .Values.EFSS "OWNCLOUD" }}
{{- "/etc/revad/oc.revad.toml" }}
{{ else }}
{{- "/etc/revad/revad.toml" }}
{{end}}
- "-p"
- "/var/run/revad.pid"
volumeMounts:
150 changes: 149 additions & 1 deletion revad/values.yaml
Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@ envFrom: []
# name: reva-envars
# - secretRef:
# name: reva-secrets

EFSS: ""
ingress:
enabled: false
services:
@@ -118,7 +118,155 @@ configFiles:
[http.services.ocmd]
[http.services.ocdav]
[http.services.ocs]
oc.revad.toml: |
[shared]
gatewaysvc = "revaoc1.docker:19000"

[grpc]
address = "0.0.0.0:19000"

[grpc.services.gateway]
authregistrysvc = "revaoc1.docker:19000"
appprovidersvc = "revaoc1.docker:19000"
appregistry = "revaoc1.docker:19000"
storageregistrysvc = "revaoc1.docker:19000"
preferencessvc = "revaoc1.docker:19000"
userprovidersvc = "revaoc1.docker:19000"
usershareprovidersvc = "revaoc1.docker:19000"
publicshareprovidersvc = "revaoc1.docker:19000"
ocmcoresvc = "revaoc1.docker:19000"
ocmshareprovidersvc = "revaoc1.docker:19000"
ocminvitemanagersvc = "revaoc1.docker:19000"
ocmproviderauthorizersvc = "revaoc1.docker:19000"
commit_share_to_storage_grant = false
datagateway = "http://localhost/data"
transfer_expires = 6 # give it a moment

[grpc.services.authregistry]
driver = "static"

[grpc.services.authregistry.drivers.static.rules]
basic = "revaoc1.docker:19000"

[grpc.services.storageregistry]
driver = "static"

[grpc.services.storageregistry.drivers.static]
home_provider = "/home"

[grpc.services.storageregistry.drivers.static.rules]
"/home" = {"address" = "revaoc1.docker:19000"}
"123e4567-e89b-12d3-a456-426655440000" = {"address" = "revaoc1.docker:19000"}

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

[grpc.services.ocmcore]
driver = "nextcloud"

[grpc.services.ocmcore.drivers.nextcloud]
endpoint = "https://oc1.docker/index.php/apps/sciencemesh/"
shared_secret = "shared-secret-1"
mock_http = false

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

[grpc.services.ocmshareprovider]
driver = "nextcloud"

[grpc.services.ocmshareprovider.drivers.nextcloud]
endpoint = "https://oc1.docker/index.php/apps/sciencemesh/"
shared_secret = "shared-secret-1"
mock_http = false

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

[grpc.services.ocmproviderauthorizer.drivers.json]
providers = "providers.demo.json"
verify_request_hostname = true

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

[grpc.services.appprovider]
driver = "demo"
iopsecret = "testsecret"
wopiurl = "http://0.0.0.0:8880/"
wopibridgeurl = "http://localhost:8000/wopib"

[grpc.services.appregistry]
driver = "static"

[grpc.services.appregistry.static.rules]
"text/plain" = "revaoc1.docker:19000"
"text/markdown" = "revaoc1.docker:19000"
"application/compressed-markdown" = "revaoc1.docker:19000"
"application/vnd.oasis.opendocument.text" = "revaoc1.docker:19000"
"application/vnd.oasis.opendocument.spreadsheet" = "revaoc1.docker:19000"
"application/vnd.oasis.opendocument.presentation" = "revaoc1.docker:19000"

[grpc.services.storageprovider]
driver = "nextcloud"

[grpc.services.storageprovider.drivers.nextcloud]
endpoint = "https://oc1.docker/index.php/apps/sciencemesh/"
shared_secret = "shared-secret-1"
mock_http = false

[grpc.services.authprovider]
auth_manager = "nextcloud"

[grpc.services.authprovider.auth_managers.nextcloud]
endpoint = "https://oc1.docker/index.php/apps/sciencemesh/"
shared_secret = "shared-secret-1"
mock_http = false

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

[grpc.services.userprovider.drivers.nextcloud]
endpoint = "https://oc1.docker/index.php/apps/sciencemesh/"
shared_secret = "shared-secret-1"
mock_http = false

[http]
enabled_services = ["ocmd"]
enabled_middlewares = ["providerauthorizer", "cors"]
address = "0.0.0.0:443"
certfile = "/etc/revad/tls/revaoc1.crt"
keyfile = "/etc/revad/tls/revaoc1.key"

[http.services.dataprovider]
driver = "localhome"

[http.services.prometheus]
[http.services.sysinfo]

[http.services.dataprovider.drivers.localhome]
user_layout = "{{.Username}}"

[http.services.ocmd]
prefix = "ocm"

[http.services.ocmd.config]
host = "revaoc1.docker"
provider = "test-revaoc1"

[http.middlewares.providerauthorizer]
driver = "json"

[http.middlewares.providerauthorizer.drivers.json]
providers = "providers.demo.json"

[http.services.ocs]
prefix = "ocs"

[http.services.ocdav]
prefix = "ocdav"

[http.middlewares.cors]
users.json: |
[
{