Merge: c08c6c09 2bda4f57
Author: Michael Barz <mbarz@owncloud.com>
Date:   Thu Jul 1 17:07:50 2021 +0200

    Merge pull request #2006 from owncloud/config-adr

    [docs-only] Configuration ADR
This commit is contained in:
Michael Barz committed 2021-07-01 15:09:29 +00:00
1 parent f3b552a205
commit 4d73b2fd57
16 files changed
+2736 -2515

No files matched your search

+433 -433
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-07-01T14:17:19+0000"
date: "2021-07-01T15:08:05+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/accounts/templates
@@ -34,310 +34,6 @@ If multiple variables are listed for one option, they are in order of precedence
### Commandline flags
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
### accounts add
Create a new account
Usage: `accounts add [command options] [arguments...]`
-grpc-namespace | $ACCOUNTS_GRPC_NAMESPACE
: Set the base namespace for the grpc namespace. Default: `flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api")`.
-name | $ACCOUNTS_NAME
: service name. Default: `flags.OverrideDefaultString(cfg.Server.Name, "accounts")`.
-enabled |
: Enable the account.
-displayname |
: Set the displayname for the account.
-username |
: Username will be written to preferred-name and on_premises_sam_account_name.
-preferred-name |
: Set the preferred-name for the account.
-on-premises-sam-account-name |
: Set the on-premises-sam-account-name.
-mail |
: Set the mail for the account.
-description |
: Set the description for the account.
-password |
: Set the password for the account.
-force-password-change |
: Force password change on next sign-in.
-force-password-change-mfa |
: Force password change on next sign-in with mfa.
### accounts list
List existing accounts
Usage: `accounts list [command options] [arguments...]`
-grpc-namespace | $ACCOUNTS_GRPC_NAMESPACE
: Set the base namespace for the grpc namespace. Default: `flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api")`.
-name | $ACCOUNTS_NAME
: service name. Default: `flags.OverrideDefaultString(cfg.Server.Name, "accounts")`.
### accounts remove
Removes an existing account
Usage: `accounts remove [command options] [arguments...]`
-grpc-namespace | $ACCOUNTS_GRPC_NAMESPACE
: Set the base namespace for the grpc namespace. Default: `flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api")`.
-name | $ACCOUNTS_NAME
: service name. Default: `flags.OverrideDefaultString(cfg.Server.Name, "accounts")`.
### accounts ocis-accounts
Provide accounts and groups for oCIS
Usage: `accounts ocis-accounts [command options] [arguments...]`
-log-level | $ACCOUNTS_LOG_LEVEL , $OCIS_LOG_LEVEL
: Set logging level.
-log-pretty | $ACCOUNTS_LOG_PRETTY , $OCIS_LOG_PRETTY
: Enable pretty logging.
-log-color | $ACCOUNTS_LOG_COLOR , $OCIS_LOG_COLOR
: Enable colored logging.
-extensions |
: Run specific extensions during supervised mode.
### accounts server
@@ -445,134 +141,6 @@ Usage: `accounts server [command options] [arguments...]`
### accounts inspect
Show detailed data on an existing account
Usage: `accounts inspect [command options] [arguments...]`
-grpc-namespace | $ACCOUNTS_GRPC_NAMESPACE
: Set the base namespace for the grpc namespace. Default: `flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api")`.
-name | $ACCOUNTS_NAME
: service name. Default: `flags.OverrideDefaultString(cfg.Server.Name, "accounts")`.
### accounts rebuildIndex
Rebuilds the service's index, i.e. deleting and then re-adding all existing documents
Usage: `accounts rebuildIndex [command options] [arguments...]`
@@ -669,6 +237,207 @@ Usage: `accounts update [command options] [arguments...]`
-force-password-change-mfa |
: Force password change on next sign-in with mfa.
### accounts list
List existing accounts
Usage: `accounts list [command options] [arguments...]`
-grpc-namespace | $ACCOUNTS_GRPC_NAMESPACE
: Set the base namespace for the grpc namespace. Default: `flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api")`.
-name | $ACCOUNTS_NAME
: service name. Default: `flags.OverrideDefaultString(cfg.Server.Name, "accounts")`.
### accounts rebuildIndex
Rebuilds the service's index, i.e. deleting and then re-adding all existing documents
Usage: `accounts rebuildIndex [command options] [arguments...]`
### accounts ocis-accounts
Provide accounts and groups for oCIS
Usage: `accounts ocis-accounts [command options] [arguments...]`
-log-level | $ACCOUNTS_LOG_LEVEL , $OCIS_LOG_LEVEL
: Set logging level.
-log-pretty | $ACCOUNTS_LOG_PRETTY , $OCIS_LOG_PRETTY
: Enable pretty logging.
-log-color | $ACCOUNTS_LOG_COLOR , $OCIS_LOG_COLOR
: Enable colored logging.
-extensions |
: Run specific extensions during supervised mode.
@@ -755,3 +524,234 @@ Usage: `accounts version [command options] [arguments...]`
### accounts add
Create a new account
Usage: `accounts add [command options] [arguments...]`
-grpc-namespace | $ACCOUNTS_GRPC_NAMESPACE
: Set the base namespace for the grpc namespace. Default: `flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api")`.
-name | $ACCOUNTS_NAME
: service name. Default: `flags.OverrideDefaultString(cfg.Server.Name, "accounts")`.
-enabled |
: Enable the account.
-displayname |
: Set the displayname for the account.
-username |
: Username will be written to preferred-name and on_premises_sam_account_name.
-preferred-name |
: Set the preferred-name for the account.
-on-premises-sam-account-name |
: Set the on-premises-sam-account-name.
-mail |
: Set the mail for the account.
-description |
: Set the description for the account.
-password |
: Set the password for the account.
-force-password-change |
: Force password change on next sign-in.
-force-password-change-mfa |
: Force password change on next sign-in with mfa.
### accounts inspect
Show detailed data on an existing account
Usage: `accounts inspect [command options] [arguments...]`
-grpc-namespace | $ACCOUNTS_GRPC_NAMESPACE
: Set the base namespace for the grpc namespace. Default: `flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api")`.
-name | $ACCOUNTS_NAME
: service name. Default: `flags.OverrideDefaultString(cfg.Server.Name, "accounts")`.
### accounts remove
Removes an existing account
Usage: `accounts remove [command options] [arguments...]`
-grpc-namespace | $ACCOUNTS_GRPC_NAMESPACE
: Set the base namespace for the grpc namespace. Default: `flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api")`.
-name | $ACCOUNTS_NAME
: service name. Default: `flags.OverrideDefaultString(cfg.Server.Name, "accounts")`.
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-07-01T14:17:59+0000"
date: "2021-07-01T15:08:40+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/glauth/templates
+31 -31
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-07-01T14:17:59+0000"
date: "2021-07-01T15:08:40+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/graph-explorer/templates
@@ -73,36 +73,6 @@ Usage: `graph-explorer [global options] command [command options] [arguments...]
## Sub Commands
### graph-explorer health
Check health status
Usage: `graph-explorer health [command options] [arguments...]`
-debug-addr | $GRAPH_EXPLORER_DEBUG_ADDR
: Address to debug endpoint. Default: `flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9136")`.
### graph-explorer server
Start integrated server
@@ -181,3 +151,33 @@ Usage: `graph-explorer server [command options] [arguments...]`
-extensions |
: Run specific extensions during supervised mode. This flag is set by the runtime.
### graph-explorer health
Check health status
Usage: `graph-explorer health [command options] [arguments...]`
-debug-addr | $GRAPH_EXPLORER_DEBUG_ADDR
: Address to debug endpoint. Default: `flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9136")`.
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-07-01T14:17:59+0000"
date: "2021-07-01T15:08:40+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/graph/templates
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-07-01T14:17:59+0000"
date: "2021-07-01T15:08:40+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/idp/templates
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-07-01T14:17:59+0000"
date: "2021-07-01T15:08:41+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/ocs/templates
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-07-01T14:17:59+0000"
date: "2021-07-01T15:08:41+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/onlyoffice/templates
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-07-01T14:17:59+0000"
date: "2021-07-01T15:08:41+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/proxy/templates
+77 -77
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-07-01T14:17:59+0000"
date: "2021-07-01T15:08:41+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/settings/templates
@@ -34,6 +34,82 @@ If multiple variables are listed for one option, they are in order of precedence
### Commandline flags
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
### settings health
Check health status
Usage: `settings health [command options] [arguments...]`
-debug-addr | $SETTINGS_DEBUG_ADDR
: Address to debug endpoint. Default: `flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9194")`.
### settings ocis-settings
Provide settings and permissions for oCIS
Usage: `settings ocis-settings [command options] [arguments...]`
-log-level | $SETTINGS_LOG_LEVEL , $OCIS_LOG_LEVEL
: Set logging level.
-log-pretty | $SETTINGS_LOG_PRETTY , $OCIS_LOG_PRETTY
: Enable pretty logging.
-log-color | $SETTINGS_LOG_COLOR , $OCIS_LOG_COLOR
: Enable colored logging.
### settings server
@@ -164,80 +240,4 @@ Usage: `settings version [command options] [arguments...]`
-name | $SETTINGS_NAME
: service name. Default: `flags.OverrideDefaultString(cfg.Service.Name, "settings")`.
### settings health
Check health status
Usage: `settings health [command options] [arguments...]`
-debug-addr | $SETTINGS_DEBUG_ADDR
: Address to debug endpoint. Default: `flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9194")`.
### settings ocis-settings
Provide settings and permissions for oCIS
Usage: `settings ocis-settings [command options] [arguments...]`
-log-level | $SETTINGS_LOG_LEVEL , $OCIS_LOG_LEVEL
: Set logging level.
-log-pretty | $SETTINGS_LOG_PRETTY , $OCIS_LOG_PRETTY
: Enable pretty logging.
-log-color | $SETTINGS_LOG_COLOR , $OCIS_LOG_COLOR
: Enable colored logging.
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-07-01T14:18:00+0000"
date: "2021-07-01T15:08:41+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/store/templates
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-07-01T14:18:00+0000"
date: "2021-07-01T15:08:42+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/thumbnails/templates
+39 -39
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-07-01T14:18:00+0000"
date: "2021-07-01T15:08:42+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/web/templates
@@ -71,44 +71,6 @@ Usage: `web [global options] command [command options] [arguments...]`
## Sub Commands
### web health
Check health status
Usage: `web health [command options] [arguments...]`
-debug-addr | $WEB_DEBUG_ADDR
: Address to debug endpoint. Default: `flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9104")`.
### web server
@@ -228,4 +190,42 @@ Usage: `web server [command options] [arguments...]`
-extensions |
: Run specific extensions during supervised mode. This flag is set by the runtime.
### web health
Check health status
Usage: `web health [command options] [arguments...]`
-debug-addr | $WEB_DEBUG_ADDR
: Address to debug endpoint. Default: `flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9104")`.
+34 -34
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-07-01T14:18:01+0000"
date: "2021-07-01T15:08:42+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/webdav/templates
@@ -66,6 +66,39 @@ Usage: `webdav [global options] command [command options] [arguments...]`
## Sub Commands
### webdav health
Check health status
Usage: `webdav health [command options] [arguments...]`
-debug-addr | $WEBDAV_DEBUG_ADDR
: Address to debug endpoint. Default: `flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9119")`.
### webdav server
@@ -195,37 +228,4 @@ Usage: `webdav version [command options] [arguments...]`
-service-name | $WEBDAV_SERVICE_NAME
: Service name. Default: `flags.OverrideDefaultString(cfg.Service.Name, "webdav")`.
### webdav health
Check health status
Usage: `webdav health [command options] [arguments...]`
-debug-addr | $WEBDAV_DEBUG_ADDR
: Address to debug endpoint. Default: `flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9119")`.
+221
View File
@@ -0,0 +1,221 @@
---
title: "8. Configuration"
date: 2021-05-03T15:00:00+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0008-configuration.md
---
## 5. Configuration Management for oCIS
* Status: proposed
* Deciders: @refs, @butonic, @micbar, @dragotin, @pmaier1
* Date: 2021-05-03
- [5. Configuration Management for oCIS](#5-configuration-management-for-ocis)
* [Context and Problem Statement](#context-and-problem-statement)
* [Decision Drivers](#decision-drivers)
* [Considered Options](#considered-options)
* [Decision Outcome](#decision-outcome)
+ [Positive Consequences](#positive-consequences)
* [Pros and Cons of the Options](#pros-and-cons-of-the-options)
+ [Extend FlagInputSourceExtension interface](#extend-flaginputsourceextension-interface)
+ [Feature request: support for structured configuration (urfave/cli).](#feature-request-support-for-structured-configuration-urfavecli)
+ [Clearly defined boundaries of what can and cannot be done.](#clearly-defined-boundaries-of-what-can-and-cannot-be-done)
+ [Expose structured field values as CLI flags](#expose-structured-field-values-as-cli-flags)
+ [Drop support for structure configuration](#drop-support-for-structure-configuration)
+ [Adapt the "structured config files have the highest priority" within oCIS](#adapt-the-structured-config-files-have-the-highest-priority-within-ocis)
* [Notes](#notes)
+ [Use Cases and Expected Behaviors](#use-cases-and-expected-behaviors)
- [Supervised (`ocis server` or `ocis run extension`)](#supervised-ocis-server-or-ocis-run-extension)
* [Known Gotchas](#known-gotchas)
- [Unsupervised (`ocis proxy`)](#unsupervised-ocis-proxy)
+ [Other known use cases](#other-known-use-cases)
+ [Use Cases for Development](#use-cases-for-development)
+ [Config Loading](#config-loading)
+ [Start an extension multiple times with different configs (in Supervised mode)](#start-an-extension-multiple-times-with-different-configs-in-supervised-mode)
+ [Developing Considered Alternatives Further](#developing-considered-alternatives-further)
+ [Follow up PR's](#follow-up-prs)
+ [State of the Art](#state-of-the-art)
## Context and Problem Statement
As per urfave/cli's doc:
>The precedence for flag value sources is as follows (highest to lowest):
>
>0. Command line flag value from user
>1. Environment variable (if specified)
>2. Configuration file (if specified)
>3. Default defined on the flag
An issue arises in point 2, in the sense that configuration file refers to a single file containing the value for the env variable. The CLI framework we use for flag parsing does not support merging config structs with CLI flags. This introduces an inconsistency with the framework: config structs are not supported, and we cannot hook to the lifecycle of the flags parsing to use a file as source and conform to these rules.
Because we solely rely on [structured configuration](https://github.com/owncloud/ocis/blob/master/ocis-pkg/config/config.go) we need a way to modify values in this struct using the provided means urfave/cli gives us (flags, env variables, config files and default value), but since we have different modes of operation (supervised Vs. unsupervised) we have to define a clear line.
### Decision Drivers
- Improve experience for the end user.
- Improve experience for developers.
- Sane defaults.
- Sane overrides.
### Considered Options
- Extend [FlagInputSourceExtension interface](https://github.com/urfave/cli/blob/master/altsrc/flag.go#L12-L17)
- Feature request: support for structured configuration (urfave/cli).
- Clearly defined boundaries of what can and cannot be done.
- Expose structured field values as CLI flags
- Drop support for structure configuration
- Adapt the "structured config files have the highest priority" within oCIS
### Decision Outcome
[STILL UNDECIDED]
#### Positive Consequences
[TBD, depends on Decision Outcome]
### Pros and Cons of the Options
#### Extend FlagInputSourceExtension interface
- Good, because we could still use Viper to load from config files here and apply values to the flags in the context.
- Bad, because urfave/cli team are [actively working on v3 of altsrc](https://github.com/urfave/cli/issues/1051#issuecomment-606311923) and we don't want to maintain yet another slice of the codebase.
notes: source is [FlagInputSourceExtension interface](https://github.com/urfave/cli/blob/master/altsrc/flag.go#L12-L17)
#### Feature request: support for structured configuration (urfave/cli).
- Good, because we could remove Viper off the codebase and solely rely on urfave/cli's native code.
- Bad, because there are no plans to support this upstream.
#### Clearly defined boundaries of what can and cannot be done.
- Good, because no changes to the codebase required (not drastic changes.)
- Bad, because we're limited by the framework
#### Expose structured field values as CLI flags
- Good, because it has been already taken into account on large projects (kubernetes) [here.](https://docs.google.com/document/d/1Dvct469xfjkgy3tjWMAKvRAJo4CmGH4cgSVGTDpay6A) in point 5.
- Bad, because it requires quite a bit<sup>1</sup> of custom logic.
- Bad, because how should these flags be present in the `-h` menu of a subcommand? Probably some code generation needed.
*[1] this is a big uncertainty.
#### Drop support for structure configuration
- Good, because it makes the integration with the cli framework easier to grasp.
- Good, because it is not encouraged by the 12factor app spec.
- Bad, because we already support if and users make active use of it. At least for development.
#### Adapt the "structured config files have the highest priority" within oCIS
- Good, because that would mean little structural changes to the codebase since the Viper config parsing logic already uses the `Before` hook to parse prior to the command's action executes.
### Notes
#### Use Cases and Expected Behaviors
##### Supervised (`ocis server` or `ocis run extension`)
![grafik](https://user-images.githubusercontent.com/6905948/116872568-62b1a780-ac16-11eb-9f29-030a651ee39b.png)
- Use a global config file (ocis.yaml) to configure an entire set of services: `> ocis --config-file /etc/ocis.yaml service`
- Use a global config file (ocis.yaml) to configure a single extension: `> ocis --config-file /etc/ocis/yaml proxy`
- When running in supervised mode, config files from extensions are NOT evaluated (only when running `ocis server`, runs with `ocis run extension` do parse individual config files)
- i.e: present config files: `ocis.yaml` and `proxy.yaml`; only the contents of `ocis.yaml` are loaded<sup>1</sup>.
- Flag parsing for subcommands are not allowed in this mode, since the runtime is in control. Configuration has to be done solely using config files.
*[1] see the development section for more on this topic.
###### Known Gotchas
- `> ocis --config-file /etc/ocis/ocis.yaml server` does not work. It currently only supports reading global config values from the predefined locations.
##### Unsupervised (`ocis proxy`)
![grafik](https://user-images.githubusercontent.com/6905948/116872534-54fc2200-ac16-11eb-8267-ffe7b03177b3.png)
- `ocis.yaml` is parsed first (since `proxy` is a subcommand of `ocis`)
- `proxy.yaml` is parsed if present, overriding values from `ocis.yaml` and any cli flag or env variable present.
#### Other known use cases
- Configure via env + some configuration files like WEB_UI_CONFIG or proxy routes
- Configure via flags + some configuration files like WEB_UI_CONFIG or proxy routes
- Configure via global (single file for all extensions) config file + some configuration files like WEB_UI_CONFIG or proxy routes
- configure via per extension config file + some configuration files like WEB_UI_CONFIG or proxy routes
Each individual use case DOES NOT mix sources (i.e: when using cli flags, do not use environment variables nor cli flags).
_Limitations on urfave/cli prevent us from providing structured configuration and framework support for cli flags + env variables._
#### Use Cases for Development
#### Config Loading
Sometimes is desired to decouple the main series of services from an individual instance. We want to use the runtime to startup all services, then do work only on a single service. To achieve that one could use `ocis server && ocis kill proxy && ocis run proxy`. This series of commands will 1. load all config from `ocis.yaml`, 2. kill the supervised proxy service and 3. start the same service with the contents from `proxy.yaml`.
#### Start an extension multiple times with different configs (in Supervised mode)
Flag parsing on subcommands in supervised mode is not yet allowed. The runtime will first parse the global `ocis.yaml` (if any) and run with the loaded configuration. This use case should provide support for having 2 different proxy config files and making use of the runtime start 2 proxy services, with different values.
For this to work, services started via `Service.Start` need to forward any args as flags:
```go
if err := client.Call("Service.Start", os.Args[2], &reply); err != nil {
log.Fatal(err)
}
```
This should provide with enough flexibility for interpreting different config sources as: `> bin/ocis run proxy --config-file /etc/ocis/unexpected/proxy.yaml`
#### Developing Considered Alternatives Further
Let's develop further the following concept: Adapt the "structured config files have the highest priority" within oCIS.
Of course it directly contradicts urfave/cli priorities. When a command finished parsing its cli args and env variables, only after that `Before` is called. This mean by the time we reach a command `Before` hook, flags have already been parsed and its values loaded to their respective destinations within the `Config` struct.
This should still not prevent a developer from using different config files for a single service. Let's analyze the following use case:
1. global config file present (ocis.yaml)
2. single proxy.yaml config file
3. another proxy.yaml config file
4. running under supervision mode
The outcome of the following set of commands should be having all bootstrapped services running + 2 proxies on different addresses:
```console
> ocis server
> ocis kill proxy
> ocis run proxy --config-file proxy.yaml
> ocis run proxy --config-file proxy2.yaml
```
This is a desired use case that is yet not supported due to lacking of flags forwarding.
#### Follow up PR's
- Variadic runtime extensions to run (development mostly)
- Arg forwarding to command (when running in supervised mode, forward any --config-file flag to supervised subcommands)
- Ability to set `OCIS_URL` from a config file (this would require to extend the ocis-pkg/config/config.go file).
#### The case for `OCIS_URL`
`OCIS_URL` is a jack-of-all trades configuration. It is meant to ease up providing defaults and ensuring dependant services are well configured. It is an override to the following env vars:
```
OCIS_IDM_ADDRESS
PROXY_OIDC_ISSUER
STORAGE_OIDC_ISSUER
STORAGE_FRONTEND_PUBLIC_URL
STORAGE_LDAP_IDP
WEB_UI_CONFIG_SERVER
WEB_OIDC_AUTHORITY
OCIS_PUBLIC_URL
```
Because this functionality is only available as an env var, there is no current way to "normalize" its usage with a config file. That is, there is no way to individually set `OCIS_URL` via config file. This is clear technical debt, and should be added functionality.
#### State of the Art
- [Kubernetes proposal on this very same topic](https://docs.google.com/document/d/1Dvct469xfjkgy3tjWMAKvRAJo4CmGH4cgSVGTDpay6A)
- [Configuration \| Pulumi](https://www.pulumi.com/docs/intro/concepts/config/)
- Configuration can be altered via setters through the CLI.
+134 -134
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-07-01T14:17:59+0000"
date: "2021-07-01T15:08:41+0000"
weight: 2
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/ocis/templates
@@ -108,37 +108,6 @@ Usage: `ocis [global options] command [command options] [arguments...]`
## Sub Commands
### ocis health
Check health status
Usage: `ocis health [command options] [arguments...]`
-debug-addr | $OCIS_DEBUG_ADDR
: Address to debug endpoint. Default: `0.0.0.0:9010`.
### ocis kill
Kill an extension by name
@@ -164,34 +133,6 @@ Usage: `ocis kill [command options] [arguments...]`
### ocis list
Lists running ocis extensions
Usage: `ocis list [command options] [arguments...]`
@@ -246,6 +187,34 @@ Usage: `ocis server [command options] [arguments...]`
-extensions | $OCIS_RUN_EXTENSIONS
: Run specific extensions during supervised mode.
### ocis list
Lists running ocis extensions
Usage: `ocis list [command options] [arguments...]`
### ocis run
@@ -272,6 +241,37 @@ Usage: `ocis run [command options] [arguments...]`
### ocis health
Check health status
Usage: `ocis health [command options] [arguments...]`
-debug-addr | $OCIS_DEBUG_ADDR
: Address to debug endpoint. Default: `0.0.0.0:9010`.
@@ -279,95 +279,95 @@ Usage: `ocis run [command options] [arguments...]`
There are more subcommands to start the individual extensions. Please check the documentation about their usage and options in the dedicated section of the documentation.
#### ocis storage-groupprovider
Start storage groupprovider service
#### ocis version
Lists running services with version
#### ocis glauth
Start glauth server
#### ocis storage-metadata
Start storage and data service for metadata
#### ocis storage-users
Start storage and data provider for /users mount
#### ocis thumbnails
Start thumbnails server
#### ocis webdav
Start webdav server
#### ocis storage-auth-bearer
Start storage auth-bearer service
#### ocis onlyoffice
Start onlyoffice server
#### ocis storage-userprovider
Start storage userprovider service
#### ocis accounts
Start accounts server
#### ocis storage-auth-basic
Start storage auth-basic service
#### ocis storage-gateway
Start storage gateway
#### ocis storage-public-link
Start storage public link storage
#### ocis store
Start a go-micro store
#### ocis web
#### ocis storage-groupprovider
Start web server
#### ocis storage-frontend
Start storage frontend
#### ocis storage-sharing
Start storage sharing service
#### ocis ocs
Start ocs server
#### ocis proxy
Start proxy server
#### ocis settings
Start settings server
Start storage groupprovider service
#### ocis storage-home
Start storage and data provider for /home mount
#### ocis storage-users
Start storage and data provider for /users mount
#### ocis version
Lists running services with version
#### ocis ocs
Start ocs server
#### ocis storage-sharing
Start storage sharing service
#### ocis glauth
Start glauth server
#### ocis proxy
Start proxy server
#### ocis storage-userprovider
Start storage userprovider service
#### ocis storage-frontend
Start storage frontend
#### ocis storage-public-link
Start storage public link storage
#### ocis storage-auth-basic
Start storage auth-basic service
#### ocis webdav
Start webdav server
#### ocis onlyoffice
Start onlyoffice server
#### ocis settings
Start settings server
#### ocis idp
Start idp server
#### ocis web
Start web server
#### ocis storage-auth-bearer
Start storage auth-bearer service
#### ocis storage-gateway
Start storage gateway
#### ocis thumbnails
Start thumbnails server
#### ocis accounts
Start accounts server