remove runtime changes for OCIS_ENABLE_OCM

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2024-08-12 16:53:56 +02:00
parent f960ae4d64
commit d61e2c18b7
7 changed files with 8 additions and 8 deletions

View File

@@ -145,6 +145,7 @@ config = {
"skip": False,
"federationServer": True,
"extraServerEnvironment": {
"OCIS_ADD_RUN_SERVICES": "ocm",
"OCIS_ENABLE_OCM": True,
"OCM_OCM_INVITE_MANAGER_INSECURE": True,
"OCM_OCM_SHARE_PROVIDER_INSECURE": True,

1
.vscode/launch.json vendored
View File

@@ -94,6 +94,7 @@
"OCIS_LDAP_URI": "ldaps://localhost:10235",
"OCIS_RUNTIME_PORT": "10250",
"OCIS_URL": "https://federation-ocis-server:10200",
"OCIS_ADD_RUN_SERVICES": "ocm",
"OCIS_ENABLE_OCM": "true",
"APP_PROVIDER_DEBUG_ADDR": "127.0.0.1:10165",
"APP_PROVIDER_GRPC_ADDR": "127.0.0.1:10164",

View File

@@ -1,5 +1,5 @@
Enhancement: Add OCIS_ENABLE_OCM env var
We added a new `OCIS_ENABLE_OCM` env var that will enable all ocm flags and add `ocm` to the services started by the runtime.
We added a new `OCIS_ENABLE_OCM` env var that will enable all ocm flags.
https://github.com/owncloud/ocis/pull/9784

View File

@@ -558,6 +558,7 @@ OCIS_URL="https://ocis-server:9200" \
PROXY_ENABLE_BASIC_AUTH=true \
OCIS_ENABLE_OCM=true \
OCM_OCM_PROVIDER_AUTHORIZER_PROVIDERS_FILE="${workspaceFolder}/tests/config/drone/providers.json" \
OCIS_ADD_RUN_SERVICES="ocm" \
ocis/bin/ocis server
```
@@ -579,7 +580,9 @@ ocis/bin/ocis server
The second oCIS instance should be available at: https://federation-ocis-server:10200/
{{< hint info >}}
To enable ocm in the web interface, you need to set `OCIS_ENABLE_OCM=true`. It will enable all ocm flags and start the ocm service when running `ocis server`.
To enable ocm in the web interface, you need to set the following envs:
`OCIS_ENABLE_OCM="true"`
`OCIS_ADD_RUN_SERVICES="ocm"`
{{< /hint>}}
#### Run the Acceptance Test

View File

@@ -56,7 +56,6 @@ type Runtime struct {
Services []string `yaml:"services" env:"OCIS_RUN_EXTENSIONS;OCIS_RUN_SERVICES" desc:"A comma-separated list of service names. Will start only the listed services." introductionVersion:"pre5.0"`
Disabled []string `yaml:"disabled_services" env:"OCIS_EXCLUDE_RUN_SERVICES" desc:"A comma-separated list of service names. Will start all default services except of the ones listed. Has no effect when OCIS_RUN_SERVICES is set." introductionVersion:"pre5.0"`
Additional []string `yaml:"add_services" env:"OCIS_ADD_RUN_SERVICES" desc:"A comma-separated list of service names. Will add the listed services to the default configuration. Has no effect when OCIS_RUN_SERVICES is set. Note that one can add services not started by the default list and exclude services from the default list by using both envvars at the same time." introductionVersion:"pre5.0"`
EnableOCM bool `yaml:"enable_ocm" env:"OCIS_ENABLE_OCM" desc:"Enable all OCM config flags and start the ocm service." introductionVersion:"%%NEXT%%"`
}
// Config combines all available configuration parts.

View File

@@ -473,11 +473,6 @@ func (s *Service) generateRunSet(cfg *ociscfg.Config) {
runset[name] = struct{}{}
}
// add ocm service if explicitly enabled by config
if cfg.Runtime.EnableOCM {
runset[cfg.OCM.Service.Name] = struct{}{}
}
// remove services if explicitly excluded by config
for _, name := range cfg.Runtime.Disabled {
delete(runset, name)

View File

@@ -8,6 +8,7 @@ export OCIS_EVENTS_ENDPOINT=127.0.0.1:10233
export OCIS_LDAP_URI=ldaps://localhost:10235
export OCIS_RUNTIME_PORT=10250
export OCIS_URL=https://federation-ocis-server:10200
export OCIS_ADD_RUN_SERVICES=ocm
export OCIS_ENABLE_OCM=true
export APP_PROVIDER_DEBUG_ADDR=127.0.0.1:10165
export APP_PROVIDER_GRPC_ADDR=127.0.0.1:10164