From e423b6135222dab8b2026dd2998fbb4d2d995d3f Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Fri, 10 Apr 2020 00:29:35 +0200 Subject: [PATCH] parse command usage and flagset usage from code --- Makefile | 10 +- docs/configuration.md | 1451 ++++++++++++++++++++++++++++++++++ docs/getting-started.md | 47 +- go.mod | 2 +- go.sum | 10 +- templates/CONFIGURATION.tmpl | 78 ++ tools.go | 1 + 7 files changed, 1585 insertions(+), 14 deletions(-) create mode 100644 docs/configuration.md create mode 100644 templates/CONFIGURATION.tmpl diff --git a/Makefile b/Makefile index fd1487c88b..511c344f59 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,8 @@ ifndef DATE endif LDFLAGS += -s -w -X "$(IMPORT)/pkg/version.String=$(VERSION)" -X "$(IMPORT)/pkg/version.Date=$(DATE)" +DEBUG_LDFLAGS += -X "$(IMPORT)/pkg/version.String=$(VERSION)" -X "$(IMPORT)/pkg/version.Date=$(DATE)" + GCFLAGS += all=-N -l .PHONY: all @@ -99,7 +101,7 @@ $(BIN)/$(EXECUTABLE): $(SOURCES) $(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $@ ./cmd/$(NAME) $(BIN)/$(EXECUTABLE)-debug: $(SOURCES) - $(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -gcflags '$(GCFLAGS)' -o $@ ./cmd/$(NAME) + $(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(DEBUG_LDFLAGS)' -gcflags '$(GCFLAGS)' -o $@ ./cmd/$(NAME) .PHONY: release release: release-dirs release-linux release-windows release-darwin release-copy release-check @@ -143,12 +145,16 @@ docs-copy: git checkout origin/source -f; \ rsync --delete -ax ../docs/ content/extensions/$(NAME) +.PHONY: config-docs-generate +config-docs-generate: + go run github.com/owncloud/flaex >| docs/configuration.md + .PHONY: docs-build docs-build: cd $(HUGO); hugo .PHONY: docs -docs: docs-copy docs-build +docs: config-docs-generate docs-copy docs-build .PHONY: watch watch: diff --git a/docs/configuration.md b/docs/configuration.md new file mode 100644 index 0000000000..f5fb58ac0d --- /dev/null +++ b/docs/configuration.md @@ -0,0 +1,1451 @@ +--- +title: "Configuration" +date: "2020-04-15T16:26:55+0200" +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis-reva +geekdocEditPath: edit/master/docs +geekdocFilePath: configuration.md +--- + +{{< toc >}} + +## Configuration + +oCIS Single Binary is not responsible for configuring extensions. Instead, each extension could either be configured by environment variables, cli flags or config files. + +Each extension has its dedicated documentation page (e.g. https://owncloud.github.io/extensions/ocis_proxy/configuration) which lists all possible configurations. Config files and environment variables are picked up if you use the `./bin/ocis server` command within the oCIS single binary. Command line flags must be set explicitly on the extensions subcommands. + +### Configuration using config files + +Out of the box extensions will attempt to read configuration details from: + +```console +/etc/ocis +$HOME/.ocis +./config +``` + +For this configuration to be picked up, have a look at your extension `root` command and look for which default config name it has assigned. *i.e: ocis-proxy reads `proxy.json | yaml | toml ...`*. + +So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis/tree/master/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/ocis.yml`, `${HOME}/.ocis/ocis.yml` or `$(pwd)/config/ocis.yml`. + +### Envrionment variables + +If you prefer to configure the service with environment variables you can see the available variables below. + +### 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. + +## Root Command + +Example service for Reva/oCIS + +Usage: `ocis-reva [global options] command [command options] [arguments...]` + +--config-file | $REVA_CONFIG_FILE +: Path to config file. + +--log-level | $REVA_LOG_LEVEL +: Set logging level. Default: `info`. + +--log-pretty | $REVA_LOG_PRETTY +: Enable pretty logging. + +--log-color | $REVA_LOG_COLOR +: Enable colored logging. + +## Sub Commands + +### ocis-reva gateway + +Start reva gateway + +Usage: `ocis-reva gateway [command options] [arguments...]` + +--tracing-enabled | $REVA_TRACING_ENABLED +: Enable sending traces. + +--tracing-type | $REVA_TRACING_TYPE +: Tracing backend type. Default: `jaeger`. + +--tracing-endpoint | $REVA_TRACING_ENDPOINT +: Endpoint for the agent. + +--tracing-collector | $REVA_TRACING_COLLECTOR +: Endpoint for the collector. + +--tracing-service | $REVA_TRACING_SERVICE +: Service name for tracing. Default: `reva`. + +--debug-addr | $REVA_GATEWAY_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9143`. + +--debug-token | $REVA_DEBUG_TOKEN +: Token to grant metrics access. + +--debug-pprof | $REVA_DEBUG_PPROF +: Enable pprof debugging. + +--debug-zpages | $REVA_DEBUG_ZPAGES +: Enable zpages debugging. + +--jwt-secret | $REVA_JWT_SECRET +: Shared jwt secret for reva service communication. Default: `Pive-Fumkiu4`. + +--transfer-secret | $REVA_TRANSFER_SECRET +: Transfer secret for datagateway. Default: `replace-me-with-a-transfer-secret`. + +--network | $REVA_GATEWAY_NETWORK +: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $REVA_GATEWAY_PROTOCOL +: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $REVA_GATEWAY_ADDR +: Address to bind reva service. Default: `0.0.0.0:9142`. + +--url | $REVA_GATEWAY_URL +: URL to use for the reva service. Default: `localhost:9142`. + +--commit-share-to-storage-grant | $REVA_GATEWAY_COMMIT_SHARE_TO_STORAGE_GRANT +: Commit shares to the share manager. Default: `true`. + +--commit-share-to-storage-ref | $REVA_GATEWAY_COMMIT_SHARE_TO_STORAGE_REF +: Commit shares to the storage. Default: `true`. + +--share-folder | $REVA_GATEWAY_SHARE_FOLDER +: mount shares in this folder of the home storage provider. Default: `Shares`. + +--disable-home-creation-on-login | $REVA_GATEWAY_DISABLE_HOME_CREATION_ON_LOGIN +: Disable creation of home folder on login. + +--storage-home-provider | $REVA_STORAGE_HOME_PROVIDER +: mount point of the storage provider for user homes in the global namespace. Default: `/home`. + +--frontend-url | $REVA_FRONTEND_URL +: URL to use for the reva service. Default: `localhost:9140`. + +--users-url | $REVA_USERS_URL +: URL to use for the reva service. Default: `localhost:9144`. + +--auth-basic-url | $REVA_AUTH_BASIC_URL +: URL to use for the reva service. Default: `localhost:9146`. + +--auth-bearer-url | $REVA_AUTH_BEARER_URL +: URL to use for the reva service. Default: `localhost:9148`. + +--sharing-url | $REVA_SHARING_URL +: URL to use for the reva service. Default: `localhost:9150`. + +--storage-root-url | $REVA_STORAGE_ROOT_URL +: URL to use for the reva service. Default: `localhost:9152`. + +--storage-root-mount-path | $REVA_STORAGE_ROOT_MOUNT_PATH +: mount path. Default: `/`. + +--storage-root-mount-id | $REVA_STORAGE_ROOT_MOUNT_ID +: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009152`. + +--storage-home-url | $REVA_STORAGE_HOME_URL +: URL to use for the reva service. Default: `localhost:9154`. + +--storage-home-mount-path | $REVA_STORAGE_HOME_MOUNT_PATH +: mount path. Default: `/home`. + +--storage-eos-url | $REVA_STORAGE_EOS_URL +: URL to use for the reva service. Default: `localhost:9158`. + +--storage-eos-mount-path | $REVA_STORAGE_EOS_MOUNT_PATH +: mount path. Default: `/eos`. + +--storage-eos-mount-id | $REVA_STORAGE_EOS_MOUNT_ID +: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009158`. + +--storage-oc-url | $REVA_STORAGE_OC_URL +: URL to use for the reva service. Default: `localhost:9162`. + +--storage-oc-mount-path | $REVA_STORAGE_OC_MOUNT_PATH +: mount path. Default: `/oc`. + +--storage-oc-mount-id | $REVA_STORAGE_OC_MOUNT_ID +: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009162`. + +### ocis-reva storage-oc-data + +Start reva storage-oc-data service + +Usage: `ocis-reva storage-oc-data [command options] [arguments...]` + +--tracing-enabled | $REVA_TRACING_ENABLED +: Enable sending traces. + +--tracing-type | $REVA_TRACING_TYPE +: Tracing backend type. Default: `jaeger`. + +--tracing-endpoint | $REVA_TRACING_ENDPOINT +: Endpoint for the agent. + +--tracing-collector | $REVA_TRACING_COLLECTOR +: Endpoint for the collector. + +--tracing-service | $REVA_TRACING_SERVICE +: Service name for tracing. Default: `reva`. + +--debug-addr | $REVA_STORAGE_OC_DATA_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9165`. + +--debug-token | $REVA_DEBUG_TOKEN +: Token to grant metrics access. + +--debug-pprof | $REVA_DEBUG_PPROF +: Enable pprof debugging. + +--debug-zpages | $REVA_DEBUG_ZPAGES +: Enable zpages debugging. + +--jwt-secret | $REVA_JWT_SECRET +: Shared jwt secret for reva service communication. Default: `Pive-Fumkiu4`. + +--network | $REVA_STORAGE_OC_DATA_NETWORK +: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $REVA_STORAGE_OC_DATA_PROTOCOL +: protocol for reva service, can be 'http' or 'grpc'. Default: `http`. + +--addr | $REVA_STORAGE_OC_DATA_ADDR +: Address to bind reva service. Default: `0.0.0.0:9164`. + +--url | $REVA_STORAGE_OC_DATA_URL +: URL to use for the reva service. Default: `localhost:9164`. + +--driver | $REVA_STORAGE_OC_DATA_DRIVER +: storage driver, eg. local, eos, owncloud or s3. Default: `owncloud`. + +--prefix | $REVA_STORAGE_OC_DATA_PREFIX +: prefix for the http endpoint, without leading slash. Default: `data`. + +--temp-folder | $REVA_STORAGE_OC_DATA_TEMP_FOLDER +: temp folder. Default: `/var/tmp/`. + +--storage-eos-namespace | $REVA_STORAGE_EOS_NAMESPACE +: Namespace for metadata operations. + +--storage-eos-shadow-namespace | $REVA_STORAGE_EOS_SHADOW_NAMESPACE +: Shadow namespace where share references are stored. + +--storage-eos-share-folder | $REVA_STORAGE_EOS_SHARE_FOLDER +: name of the share folder. + +--storage-eos-binary | $REVA_STORAGE_EOS_BINARY +: Location of the eos binary. Default: `/usr/bin/eos`. + +--storage-eos-xrdcopy-binary | $REVA_STORAGE_EOS_XRDCOPY_BINARY +: Location of the xrdcopy binary. Default: `/usr/bin/xrdcopy`. + +--storage-eos-master-url | $REVA_STORAGE_EOS_MASTER_URL +: URL of the Master EOS MGM. Default: `root://eos-example.org`. + +--storage-eos-slave-url | $REVA_STORAGE_EOS_SLAVE_URL +: URL of the Slave EOS MGM. Default: `root://eos-example.org`. + +--storage-eos-cache-directory | $REVA_STORAGE_EOS_CACHE_DIRECTORY +: Location on the local fs where to store reads. Default: `os.TempDir()`. + +--storage-eos-enable-logging | $REVA_STORAGE_EOS_ENABLE_LOGGING +: Enables logging of the commands executed. + +--storage-eos-show-hidden-sysfiles | $REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES +: show internal EOS files like .sys.v# and .sys.a# files.. + +--storage-eos-force-singleuser-mode | $REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE +: force connections to EOS to use SingleUsername. + +--storage-eos-use-keytab | $REVA_STORAGE_EOS_USE_KEYTAB +: authenticate requests by using an EOS keytab. + +--storage-eos-enable-home | $REVA_STORAGE_EOS_ENABLE_HOME +: enable the creation of home directories. + +--storage-eos-sec-protocol | $REVA_STORAGE_EOS_SEC_PROTOCOL +: the xrootd security protocol to use between the server and EOS. + +--storage-eos-keytab | $REVA_STORAGE_EOS_KEYTAB +: the location of the keytab to use to authenticate to EOS. + +--storage-eos-single-username | $REVA_STORAGE_EOS_SINGLE_USERNAME +: the username to use when SingleUserMode is enabled. + +--storage-eos-layout | $REVA_STORAGE_EOS_LAYOUT +: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `. Default: `{{substr 0 1 .Username}}/{{.Username}}`. + +--storage-local-root | $REVA_STORAGE_LOCAL_ROOT +: the path to the local storage root. Default: `/var/tmp/reva/root`. + +--storage-owncloud-datadir | $REVA_STORAGE_OWNCLOUD_DATADIR +: the path to the owncloud data directory. Default: `/var/tmp/reva/data`. + +--storage-owncloud-scan | $REVA_STORAGE_OWNCLOUD_SCAN +: scan files on startup to add fileids. Default: `true`. + +--storage-owncloud-redis | $REVA_STORAGE_OWNCLOUD_REDIS_ADDR +: the address of the redis server. Default: `:6379`. + +--storage-owncloud-enable-home | $REVA_STORAGE_OWNCLOUD_ENABLE_HOME +: enable the creation of home storages. Default: `false`. + +--storage-owncloud-layout | $REVA_STORAGE_OWNCLOUD_LAYOUT +: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `. Default: `{{.Username}}`. + +--gateway-url | $REVA_GATEWAY_URL +: URL to use for the reva gateway service. Default: `localhost:9142`. + +### ocis-reva sharing + +Start reva sharing service + +Usage: `ocis-reva sharing [command options] [arguments...]` + +--tracing-enabled | $REVA_TRACING_ENABLED +: Enable sending traces. + +--tracing-type | $REVA_TRACING_TYPE +: Tracing backend type. Default: `jaeger`. + +--tracing-endpoint | $REVA_TRACING_ENDPOINT +: Endpoint for the agent. + +--tracing-collector | $REVA_TRACING_COLLECTOR +: Endpoint for the collector. + +--tracing-service | $REVA_TRACING_SERVICE +: Service name for tracing. Default: `reva`. + +--debug-addr | $REVA_SHARING_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9151`. + +--debug-token | $REVA_DEBUG_TOKEN +: Token to grant metrics access. + +--debug-pprof | $REVA_DEBUG_PPROF +: Enable pprof debugging. + +--debug-zpages | $REVA_DEBUG_ZPAGES +: Enable zpages debugging. + +--jwt-secret | $REVA_JWT_SECRET +: Shared jwt secret for reva service communication. Default: `Pive-Fumkiu4`. + +--network | $REVA_SHARING_NETWORK +: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $REVA_SHARING_PROTOCOL +: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $REVA_SHARING_ADDR +: Address to bind reva service. Default: `0.0.0.0:9150`. + +--url | $REVA_SHARING_URL +: URL to use for the reva service. Default: `localhost:9150`. + +--user-driver | $REVA_SHARING_USER_DRIVER +: driver to use for the UserShareProvider. Default: `json`. + +--user-json-file | $REVA_SHARING_USER_JSON_FILE +: file used to persist shares for the UserShareProvider. Default: `/var/tmp/reva/shares.json`. + +--public-driver | $REVA_SHARING_PUBLIC_DRIVER +: driver to use for the PublicShareProvider. Default: `memory`. + +### ocis-reva health + +Check health status + +Usage: `ocis-reva health [command options] [arguments...]` + +--debug-addr | $REVA_DEBUG_ADDR +: Address to debug endpoint. Default: `0.0.0.0:9109`. + +### ocis-reva storage-home-data + +Start reva storage-home-data service + +Usage: `ocis-reva storage-home-data [command options] [arguments...]` + +--tracing-enabled | $REVA_TRACING_ENABLED +: Enable sending traces. + +--tracing-type | $REVA_TRACING_TYPE +: Tracing backend type. Default: `jaeger`. + +--tracing-endpoint | $REVA_TRACING_ENDPOINT +: Endpoint for the agent. + +--tracing-collector | $REVA_TRACING_COLLECTOR +: Endpoint for the collector. + +--tracing-service | $REVA_TRACING_SERVICE +: Service name for tracing. Default: `reva`. + +--debug-addr | $REVA_STORAGE_HOME_DATA_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9157`. + +--debug-token | $REVA_DEBUG_TOKEN +: Token to grant metrics access. + +--debug-pprof | $REVA_DEBUG_PPROF +: Enable pprof debugging. + +--debug-zpages | $REVA_DEBUG_ZPAGES +: Enable zpages debugging. + +--jwt-secret | $REVA_JWT_SECRET +: Shared jwt secret for reva service communication. Default: `Pive-Fumkiu4`. + +--network | $REVA_STORAGE_HOME_DATA_NETWORK +: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $REVA_STORAGE_HOME_DATA_PROTOCOL +: protocol for reva service, can be 'http' or 'grpc'. Default: `http`. + +--addr | $REVA_STORAGE_HOME_DATA_ADDR +: Address to bind reva service. Default: `0.0.0.0:9156`. + +--url | $REVA_STORAGE_HOME_DATA_URL +: URL to use for the reva service. Default: `localhost:9156`. + +--driver | $REVA_STORAGE_HOME_DATA_DRIVER +: storage driver, eg. local, eos, owncloud or s3. Default: `owncloud`. + +--prefix | $REVA_STORAGE_HOME_DATA_PREFIX +: prefix for the http endpoint, without leading slash. Default: `data`. + +--temp-folder | $REVA_STORAGE_HOME_DATA_TEMP_FOLDER +: temp folder. Default: `/var/tmp/`. + +--storage-eos-namespace | $REVA_STORAGE_EOS_NAMESPACE +: Namespace for metadata operations. Default: `/eos/dockertest/reva/users`. + +--storage-eos-shadow-namespace | $REVA_STORAGE_EOS_SHADOW_NAMESPACE +: Shadow namespace where share references are stored. + +--storage-eos-share-folder | $REVA_STORAGE_EOS_SHARE_FOLDER +: name of the share folder. Default: `/Shares`. + +--storage-eos-binary | $REVA_STORAGE_EOS_BINARY +: Location of the eos binary. Default: `/usr/bin/eos`. + +--storage-eos-xrdcopy-binary | $REVA_STORAGE_EOS_XRDCOPY_BINARY +: Location of the xrdcopy binary. Default: `/usr/bin/xrdcopy`. + +--storage-eos-master-url | $REVA_STORAGE_EOS_MASTER_URL +: URL of the Master EOS MGM. Default: `root://eos-mgm1.eoscluster.cern.ch:1094`. + +--storage-eos-slave-url | $REVA_STORAGE_EOS_SLAVE_URL +: URL of the Slave EOS MGM. Default: `root://eos-mgm1.eoscluster.cern.ch:1094`. + +--storage-eos-cache-directory | $REVA_STORAGE_EOS_CACHE_DIRECTORY +: Location on the local fs where to store reads. Default: `os.TempDir()`. + +--storage-eos-enable-logging | $REVA_STORAGE_EOS_ENABLE_LOGGING +: Enables logging of the commands executed. + +--storage-eos-show-hidden-sysfiles | $REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES +: show internal EOS files like .sys.v# and .sys.a# files.. + +--storage-eos-force-singleuser-mode | $REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE +: force connections to EOS to use SingleUsername. + +--storage-eos-use-keytab | $REVA_STORAGE_EOS_USE_KEYTAB +: authenticate requests by using an EOS keytab. + +--storage-eos-enable-home | $REVA_STORAGE_EOS_ENABLE_HOME +: enable the creation of home directories. Default: `true`. + +--storage-eos-sec-protocol | $REVA_STORAGE_EOS_SEC_PROTOCOL +: the xrootd security protocol to use between the server and EOS. + +--storage-eos-keytab | $REVA_STORAGE_EOS_KEYTAB +: the location of the keytab to use to authenticate to EOS. + +--storage-eos-single-username | $REVA_STORAGE_EOS_SINGLE_USERNAME +: the username to use when SingleUserMode is enabled. + +--storage-eos-layout | $REVA_STORAGE_EOS_LAYOUT +: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{substr 0 1 .Username}}/{{.Username}}" will turn "Einstein" into "E/Einstein" `. Default: `{{substr 0 1 .Username}}/{{.Username}}`. + +--storage-local-root | $REVA_STORAGE_LOCAL_ROOT +: the path to the local storage root. Default: `/var/tmp/reva/root`. + +--storage-owncloud-datadir | $REVA_STORAGE_OWNCLOUD_DATADIR +: the path to the owncloud data directory. Default: `/var/tmp/reva/data`. + +--storage-owncloud-scan | $REVA_STORAGE_OWNCLOUD_SCAN +: scan files on startup to add fileids. Default: `true`. + +--storage-owncloud-redis | $REVA_STORAGE_OWNCLOUD_REDIS_ADDR +: the address of the redis server. Default: `:6379`. + +--storage-owncloud-enable-home | $REVA_STORAGE_OWNCLOUD_ENABLE_HOME +: enable the creation of home storages. Default: `true`. + +--storage-owncloud-layout | $REVA_STORAGE_OWNCLOUD_LAYOUT +: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `. Default: `{{.Username}}`. + +--gateway-url | $REVA_GATEWAY_URL +: URL to use for the reva gateway service. Default: `localhost:9142`. + +### ocis-reva storage-oc + +Start reva storage-oc service + +Usage: `ocis-reva storage-oc [command options] [arguments...]` + +--tracing-enabled | $REVA_TRACING_ENABLED +: Enable sending traces. + +--tracing-type | $REVA_TRACING_TYPE +: Tracing backend type. Default: `jaeger`. + +--tracing-endpoint | $REVA_TRACING_ENDPOINT +: Endpoint for the agent. + +--tracing-collector | $REVA_TRACING_COLLECTOR +: Endpoint for the collector. + +--tracing-service | $REVA_TRACING_SERVICE +: Service name for tracing. Default: `reva`. + +--debug-addr | $REVA_STORAGE_OC_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9163`. + +--debug-token | $REVA_DEBUG_TOKEN +: Token to grant metrics access. + +--debug-pprof | $REVA_DEBUG_PPROF +: Enable pprof debugging. + +--debug-zpages | $REVA_DEBUG_ZPAGES +: Enable zpages debugging. + +--jwt-secret | $REVA_JWT_SECRET +: Shared jwt secret for reva service communication. Default: `Pive-Fumkiu4`. + +--network | $REVA_STORAGE_OC_NETWORK +: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $REVA_STORAGE_OC_PROTOCOL +: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $REVA_STORAGE_OC_ADDR +: Address to bind reva service. Default: `0.0.0.0:9162`. + +--url | $REVA_STORAGE_OC_URL +: URL to use for the reva service. Default: `localhost:9162`. + +--driver | $REVA_STORAGE_OC_DRIVER +: storage driver, eg. local, eos, owncloud or s3. Default: `owncloud`. + +--mount-path | $REVA_STORAGE_OC_MOUNT_PATH +: mount path. Default: `/oc`. + +--mount-id | $REVA_STORAGE_OC_MOUNT_ID +: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009162`. + +--expose-data-server | $REVA_STORAGE_OC_EXPOSE_DATA_SERVER +: exposes a dedicated data server. Default: `true`. + +--data-server-url | $REVA_STORAGE_OC_DATA_SERVER_URL +: data server url. Default: `http://localhost:9164/data`. + +--enable-home-creation | $REVA_STORAGE_OC_ENABLE_HOME_CREATION +: if enabled home dirs will be automatically created. Default: `false`. + +--storage-eos-namespace | $REVA_STORAGE_EOS_NAMESPACE +: Namespace for metadata operations. + +--storage-eos-shadow-namespace | $REVA_STORAGE_EOS_SHADOW_NAMESPACE +: Shadow namespace where share references are stored. + +--storage-eos-share-folder | $REVA_STORAGE_EOS_SHARE_FOLDER +: name of the share folder. + +--storage-eos-binary | $REVA_STORAGE_EOS_BINARY +: Location of the eos binary. Default: `/usr/bin/eos`. + +--storage-eos-xrdcopy-binary | $REVA_STORAGE_EOS_XRDCOPY_BINARY +: Location of the xrdcopy binary. Default: `/usr/bin/xrdcopy`. + +--storage-eos-master-url | $REVA_STORAGE_EOS_MASTER_URL +: URL of the Master EOS MGM. Default: `root://eos-example.org`. + +--storage-eos-slave-url | $REVA_STORAGE_EOS_SLAVE_URL +: URL of the Slave EOS MGM. Default: `root://eos-example.org`. + +--storage-eos-cache-directory | $REVA_STORAGE_EOS_CACHE_DIRECTORY +: Location on the local fs where to store reads. Default: `os.TempDir()`. + +--storage-eos-enable-logging | $REVA_STORAGE_EOS_ENABLE_LOGGING +: Enables logging of the commands executed. + +--storage-eos-show-hidden-sysfiles | $REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES +: show internal EOS files like .sys.v# and .sys.a# files.. + +--storage-eos-force-singleuser-mode | $REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE +: force connections to EOS to use SingleUsername. + +--storage-eos-use-keytab | $REVA_STORAGE_EOS_USE_KEYTAB +: authenticate requests by using an EOS keytab. + +--storage-eos-enable-home | $REVA_STORAGE_EOS_ENABLE_HOME +: enable the creation of home directories. + +--storage-eos-sec-protocol | $REVA_STORAGE_EOS_SEC_PROTOCOL +: the xrootd security protocol to use between the server and EOS. + +--storage-eos-keytab | $REVA_STORAGE_EOS_KEYTAB +: the location of the keytab to use to authenticate to EOS. + +--storage-eos-single-username | $REVA_STORAGE_EOS_SINGLE_USERNAME +: the username to use when SingleUserMode is enabled. + +--storage-eos-layout | $REVA_STORAGE_EOS_LAYOUT +: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `. Default: `{{substr 0 1 .Username}}/{{.Username}}`. + +--storage-local-root | $REVA_STORAGE_LOCAL_ROOT +: the path to the local storage root. Default: `/var/tmp/reva/root`. + +--storage-owncloud-datadir | $REVA_STORAGE_OWNCLOUD_DATADIR +: the path to the owncloud data directory. Default: `/var/tmp/reva/data`. + +--storage-owncloud-scan | $REVA_STORAGE_OWNCLOUD_SCAN +: scan files on startup to add fileids. Default: `true`. + +--storage-owncloud-redis | $REVA_STORAGE_OWNCLOUD_REDIS_ADDR +: the address of the redis server. Default: `:6379`. + +--storage-owncloud-enable-home | $REVA_STORAGE_OWNCLOUD_ENABLE_HOME +: enable the creation of home storages. Default: `false`. + +--storage-owncloud-layout | $REVA_STORAGE_OWNCLOUD_LAYOUT +: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `. Default: `{{.Username}}`. + +### ocis-reva users + +Start reva users service + +Usage: `ocis-reva users [command options] [arguments...]` + +--tracing-enabled | $REVA_TRACING_ENABLED +: Enable sending traces. + +--tracing-type | $REVA_TRACING_TYPE +: Tracing backend type. Default: `jaeger`. + +--tracing-endpoint | $REVA_TRACING_ENDPOINT +: Endpoint for the agent. + +--tracing-collector | $REVA_TRACING_COLLECTOR +: Endpoint for the collector. + +--tracing-service | $REVA_TRACING_SERVICE +: Service name for tracing. Default: `reva`. + +--debug-addr | $REVA_SHARING_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9145`. + +--debug-token | $REVA_DEBUG_TOKEN +: Token to grant metrics access. + +--debug-pprof | $REVA_DEBUG_PPROF +: Enable pprof debugging. + +--debug-zpages | $REVA_DEBUG_ZPAGES +: Enable zpages debugging. + +--jwt-secret | $REVA_JWT_SECRET +: Shared jwt secret for reva service communication. Default: `Pive-Fumkiu4`. + +--ldap-hostname | $REVA_LDAP_HOSTNAME +: LDAP hostname. Default: `localhost`. + +--ldap-base-dn | $REVA_LDAP_BASE_DN +: LDAP basedn. Default: `dc=example,dc=org`. + +--ldap-userfilter | $REVA_LDAP_USERFILTER +: LDAP userfilter. Default: `(&(objectclass=posixAccount)(cn=%s*))`. + +--ldap-groupfilter | $REVA_LDAP_GROUPFILTER +: LDAP groupfilter. Default: `(&(objectclass=posixGroup)(cn=%s*))`. + +--ldap-bind-dn | $REVA_LDAP_BIND_DN +: LDAP bind dn. Default: `cn=reva,ou=sysusers,dc=example,dc=org`. + +--ldap-bind-password | $REVA_LDAP_BIND_PASSWORD +: LDAP bind password. Default: `reva`. + +--ldap-idp | $REVA_LDAP_IDP +: Identity provider to use for users. Default: `https://localhost:9200`. + +--ldap-schema-uid | $REVA_LDAP_SCHEMA_UID +: LDAP schema uid. Default: `uid`. + +--ldap-schema-mail | $REVA_LDAP_SCHEMA_MAIL +: LDAP schema mail. Default: `mail`. + +--ldap-schema-displayName | $REVA_LDAP_SCHEMA_DISPLAYNAME +: LDAP schema displayName. Default: `sn`. + +--ldap-schema-cn | $REVA_LDAP_SCHEMA_CN +: LDAP schema cn. Default: `cn`. + +--network | $REVA_USERS_NETWORK +: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $REVA_USERS_PROTOCOL +: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $REVA_USERS_ADDR +: Address to bind reva service. Default: `0.0.0.0:9144`. + +--url | $REVA_USERS_URL +: URL to use for the reva service. Default: `localhost:9144`. + +--driver | $REVA_USERS_DRIVER +: user driver: 'demo', 'json' or 'ldap'. Default: `ldap`. + +--json-config | $REVA_USERS_JSON +: Path to users.json file. + +### ocis-reva auth-basic + +Start reva authprovider for basic auth + +Usage: `ocis-reva auth-basic [command options] [arguments...]` + +--tracing-enabled | $REVA_TRACING_ENABLED +: Enable sending traces. + +--tracing-type | $REVA_TRACING_TYPE +: Tracing backend type. Default: `jaeger`. + +--tracing-endpoint | $REVA_TRACING_ENDPOINT +: Endpoint for the agent. + +--tracing-collector | $REVA_TRACING_COLLECTOR +: Endpoint for the collector. + +--tracing-service | $REVA_TRACING_SERVICE +: Service name for tracing. Default: `reva`. + +--debug-addr | $REVA_AUTH_BASIC_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9147`. + +--debug-token | $REVA_DEBUG_TOKEN +: Token to grant metrics access. + +--debug-pprof | $REVA_DEBUG_PPROF +: Enable pprof debugging. + +--debug-zpages | $REVA_DEBUG_ZPAGES +: Enable zpages debugging. + +--jwt-secret | $REVA_JWT_SECRET +: Shared jwt secret for reva service communication. Default: `Pive-Fumkiu4`. + +--users-driver | $REVA_USERS_DRIVER +: user driver: 'demo', 'json' or 'ldap'. Default: `ldap`. + +--users-json | $REVA_USERS_JSON +: Path to users.json file. + +--ldap-hostname | $REVA_LDAP_HOSTNAME +: LDAP hostname. Default: `localhost`. + +--ldap-base-dn | $REVA_LDAP_BASE_DN +: LDAP basedn. Default: `dc=example,dc=org`. + +--ldap-userfilter | $REVA_LDAP_USERFILTER +: LDAP userfilter. Default: `(&(objectclass=posixAccount)(cn=%s))`. + +--ldap-groupfilter | $REVA_LDAP_GROUPFILTER +: LDAP groupfilter. Default: `(&(objectclass=posixGroup)(cn=%s))`. + +--ldap-bind-dn | $REVA_LDAP_BIND_DN +: LDAP bind dn. Default: `cn=reva,ou=sysusers,dc=example,dc=org`. + +--ldap-bind-password | $REVA_LDAP_BIND_PASSWORD +: LDAP bind password. Default: `reva`. + +--ldap-idp | $REVA_LDAP_IDP +: Identity provider to use for users. Default: `https://localhost:9200`. + +--ldap-schema-uid | $REVA_LDAP_SCHEMA_UID +: LDAP schema uid. Default: `uid`. + +--ldap-schema-mail | $REVA_LDAP_SCHEMA_MAIL +: LDAP schema mail. Default: `mail`. + +--ldap-schema-displayName | $REVA_LDAP_SCHEMA_DISPLAYNAME +: LDAP schema displayName. Default: `sn`. + +--ldap-schema-cn | $REVA_LDAP_SCHEMA_CN +: LDAP schema cn. Default: `cn`. + +--network | $REVA_AUTH_BASIC_NETWORK +: Network to use for the reva auth-basic service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $REVA_AUTH_BASIC_PROTOCOL +: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $REVA_AUTH_BASIC_ADDR +: Address to bind reva service. Default: `0.0.0.0:9146`. + +--url | $REVA_AUTH_BASIC_URL +: URL to use for the reva service. Default: `localhost:9146`. + +### ocis-reva storage-root + +Start reva storage-root service + +Usage: `ocis-reva storage-root [command options] [arguments...]` + +--tracing-enabled | $REVA_TRACING_ENABLED +: Enable sending traces. + +--tracing-type | $REVA_TRACING_TYPE +: Tracing backend type. Default: `jaeger`. + +--tracing-endpoint | $REVA_TRACING_ENDPOINT +: Endpoint for the agent. + +--tracing-collector | $REVA_TRACING_COLLECTOR +: Endpoint for the collector. + +--tracing-service | $REVA_TRACING_SERVICE +: Service name for tracing. Default: `reva`. + +--debug-addr | $REVA_STORAGE_ROOT_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9153`. + +--debug-token | $REVA_DEBUG_TOKEN +: Token to grant metrics access. + +--debug-pprof | $REVA_DEBUG_PPROF +: Enable pprof debugging. + +--debug-zpages | $REVA_DEBUG_ZPAGES +: Enable zpages debugging. + +--jwt-secret | $REVA_JWT_SECRET +: Shared jwt secret for reva service communication. Default: `Pive-Fumkiu4`. + +--network | $REVA_STORAGE_ROOT_NETWORK +: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $REVA_STORAGE_ROOT_PROTOCOL +: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $REVA_STORAGE_ROOT_ADDR +: Address to bind reva service. Default: `0.0.0.0:9152`. + +--url | $REVA_STORAGE_ROOT_URL +: URL to use for the reva service. Default: `localhost:9152`. + +--driver | $REVA_STORAGE_ROOT_DRIVER +: storage driver, eg. local, eos, owncloud or s3. Default: `local`. + +--mount-path | $REVA_STORAGE_ROOT_MOUNT_PATH +: mount path. Default: `/`. + +--mount-id | $REVA_STORAGE_ROOT_MOUNT_ID +: mount id. Default: `123e4567-e89b-12d3-a456-426655440001`. + +--expose-data-server | $REVA_STORAGE_ROOT_EXPOSE_DATA_SERVER +: exposes a dedicated data server. + +--data-server-url | $REVA_STORAGE_ROOT_DATA_SERVER_URL +: data server url. + +--enable-home-creation | $REVA_STORAGE_HOME_ENABLE_HOME_CREATION +: if enabled home dirs will be automatically created. + +--storage-eos-namespace | $REVA_STORAGE_EOS_NAMESPACE +: Namespace for metadata operations. + +--storage-eos-binary | $REVA_STORAGE_EOS_BINARY +: Location of the eos binary. Default: `/usr/bin/eos`. + +--storage-eos-xrdcopy-binary | $REVA_STORAGE_EOS_XRDCOPY_BINARY +: Location of the xrdcopy binary. Default: `/usr/bin/xrdcopy`. + +--storage-eos-master-url | $REVA_STORAGE_EOS_MASTER_URL +: URL of the Master EOS MGM. Default: `root://eos-example.org`. + +--storage-eos-slave-url | $REVA_STORAGE_EOS_SLAVE_URL +: URL of the Slave EOS MGM. Default: `root://eos-example.org`. + +--storage-eos-cache-directory | $REVA_STORAGE_EOS_CACHE_DIRECTORY +: Location on the local fs where to store reads. Default: `os.TempDir()`. + +--storage-eos-enable-logging | $REVA_STORAGE_EOS_ENABLE_LOGGING +: Enables logging of the commands executed. + +--storage-eos-show-hidden-sysfiles | $REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES +: show internal EOS files like .sys.v# and .sys.a# files.. + +--storage-eos-force-singleuser-mode | $REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE +: force connections to EOS to use SingleUsername. + +--storage-eos-use-keytab | $REVA_STORAGE_EOS_USE_KEYTAB +: authenticate requests by using an EOS keytab. + +--storage-eos-enable-home | $REVA_STORAGE_EOS_ENABLE_HOME +: enable the creation of home directories. + +--storage-eos-sec-protocol | $REVA_STORAGE_EOS_SEC_PROTOCOL +: the xrootd security protocol to use between the server and EOS. + +--storage-eos-keytab | $REVA_STORAGE_EOS_KEYTAB +: the location of the keytab to use to authenticate to EOS. + +--storage-eos-single-username | $REVA_STORAGE_EOS_SINGLE_USERNAME +: the username to use when SingleUserMode is enabled. + +--storage-eos-layout | $REVA_STORAGE_EOS_LAYOUT +: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `. Default: `{{substr 0 1 .Username}}/{{.Username}}`. + +--storage-local-root | $REVA_STORAGE_LOCAL_ROOT +: the path to the local storage root. Default: `/var/tmp/reva/root`. + +--storage-owncloud-datadir | $REVA_STORAGE_OWNCLOUD_DATADIR +: the path to the owncloud data directory. Default: `/var/tmp/reva/data`. + +--storage-owncloud-scan | $REVA_STORAGE_OWNCLOUD_SCAN +: scan files on startup to add fileids. Default: `true`. + +--storage-owncloud-redis | $REVA_STORAGE_OWNCLOUD_REDIS_ADDR +: the address of the redis server. Default: `:6379`. + +--storage-owncloud-enable-home | $REVA_STORAGE_OWNCLOUD_ENABLE_HOME +: enable the creation of home storages. Default: `false`. + +--storage-owncloud-layout | $REVA_STORAGE_OWNCLOUD_LAYOUT +: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `. Default: `{{.Username}}`. + +### ocis-reva auth-bearer + +Start reva authprovider for bearer auth + +Usage: `ocis-reva auth-bearer [command options] [arguments...]` + +--tracing-enabled | $REVA_TRACING_ENABLED +: Enable sending traces. + +--tracing-type | $REVA_TRACING_TYPE +: Tracing backend type. Default: `jaeger`. + +--tracing-endpoint | $REVA_TRACING_ENDPOINT +: Endpoint for the agent. + +--tracing-collector | $REVA_TRACING_COLLECTOR +: Endpoint for the collector. + +--tracing-service | $REVA_TRACING_SERVICE +: Service name for tracing. Default: `reva`. + +--debug-addr | $REVA_AUTH_BEARER_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9149`. + +--debug-token | $REVA_DEBUG_TOKEN +: Token to grant metrics access. + +--debug-pprof | $REVA_DEBUG_PPROF +: Enable pprof debugging. + +--debug-zpages | $REVA_DEBUG_ZPAGES +: Enable zpages debugging. + +--jwt-secret | $REVA_JWT_SECRET +: Shared jwt secret for reva service communication. Default: `Pive-Fumkiu4`. + +--oidc-issuer | $REVA_OIDC_ISSUER +: OIDC issuer. Default: `https://localhost:9200`. + +--oidc-insecure | $REVA_OIDC_INSECURE +: OIDC allow insecure communication. Default: `true`. + +--oidc-id-claim | $REVA_OIDC_ID_CLAIM +: OIDC id claim. Default: `preferred_username`. + +--network | $REVA_AUTH_BEARER_NETWORK +: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $REVA_AUTH_BEARER_PROTOCOL +: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $REVA_AUTH_BEARER_ADDR +: Address to bind reva service. Default: `0.0.0.0:9148`. + +--url | $REVA_AUTH_BEARER_URL +: URL to use for the reva service. Default: `localhost:9148`. + +### ocis-reva storage-eos + +Start reva storage-eos service + +Usage: `ocis-reva storage-eos [command options] [arguments...]` + +--tracing-enabled | $REVA_TRACING_ENABLED +: Enable sending traces. + +--tracing-type | $REVA_TRACING_TYPE +: Tracing backend type. Default: `jaeger`. + +--tracing-endpoint | $REVA_TRACING_ENDPOINT +: Endpoint for the agent. + +--tracing-collector | $REVA_TRACING_COLLECTOR +: Endpoint for the collector. + +--tracing-service | $REVA_TRACING_SERVICE +: Service name for tracing. Default: `reva`. + +--debug-addr | $REVA_STORAGE_EOS_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9159`. + +--debug-token | $REVA_DEBUG_TOKEN +: Token to grant metrics access. + +--debug-pprof | $REVA_DEBUG_PPROF +: Enable pprof debugging. + +--debug-zpages | $REVA_DEBUG_ZPAGES +: Enable zpages debugging. + +--jwt-secret | $REVA_JWT_SECRET +: Shared jwt secret for reva service communication. Default: `Pive-Fumkiu4`. + +--network | $REVA_STORAGE_EOS_NETWORK +: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $REVA_STORAGE_EOS_PROTOCOL +: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $REVA_STORAGE_EOS_ADDR +: Address to bind reva service. Default: `0.0.0.0:9158`. + +--url | $REVA_STORAGE_EOS_URL +: URL to use for the reva service. Default: `localhost:9158`. + +--driver | $REVA_STORAGE_EOS_DRIVER +: storage driver, eg. local, eos, owncloud or s3. Default: `eos`. + +--mount-path | $REVA_STORAGE_EOS_MOUNT_PATH +: mount path. Default: `/eos`. + +--mount-id | $REVA_STORAGE_EOS_MOUNT_ID +: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009158`. + +--expose-data-server | $REVA_STORAGE_EOS_EXPOSE_DATA_SERVER +: exposes a dedicated data server. Default: `true`. + +--data-server-url | $REVA_STORAGE_EOS_DATA_SERVER_URL +: data server url. Default: `http://localhost:9160/data`. + +--enable-home-creation | $REVA_STORAGE_EOS_ENABLE_HOME_CREATION +: if enabled home dirs will be automatically created. Default: `false`. + +--storage-eos-namespace | $REVA_STORAGE_EOS_NAMESPACE +: Namespace for metadata operations. Default: `/eos/dockertest/reva`. + +--storage-eos-shadow-namespace | $REVA_STORAGE_EOS_SHADOW_NAMESPACE +: Shadow namespace where share references are stored. + +--storage-eos-share-folder | $REVA_STORAGE_EOS_SHARE_FOLDER +: name of the share folder. Default: `/Shares`. + +--storage-eos-binary | $REVA_STORAGE_EOS_BINARY +: Location of the eos binary. Default: `/usr/bin/eos`. + +--storage-eos-xrdcopy-binary | $REVA_STORAGE_EOS_XRDCOPY_BINARY +: Location of the xrdcopy binary. Default: `/usr/bin/xrdcopy`. + +--storage-eos-master-url | $REVA_STORAGE_EOS_MASTER_URL +: URL of the Master EOS MGM. Default: `root://eos-mgm1.eoscluster.cern.ch:1094`. + +--storage-eos-slave-url | $REVA_STORAGE_EOS_SLAVE_URL +: URL of the Slave EOS MGM. Default: `root://eos-mgm1.eoscluster.cern.ch:1094`. + +--storage-eos-cache-directory | $REVA_STORAGE_EOS_CACHE_DIRECTORY +: Location on the local fs where to store reads. Default: `os.TempDir()`. + +--storage-eos-enable-logging | $REVA_STORAGE_EOS_ENABLE_LOGGING +: Enables logging of the commands executed. + +--storage-eos-show-hidden-sysfiles | $REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES +: show internal EOS files like .sys.v# and .sys.a# files.. + +--storage-eos-force-singleuser-mode | $REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE +: force connections to EOS to use SingleUsername. + +--storage-eos-use-keytab | $REVA_STORAGE_EOS_USE_KEYTAB +: authenticate requests by using an EOS keytab. + +--storage-eos-enable-home | $REVA_STORAGE_EOS_ENABLE_HOME +: enable the creation of home directories. + +--storage-eos-sec-protocol | $REVA_STORAGE_EOS_SEC_PROTOCOL +: the xrootd security protocol to use between the server and EOS. + +--storage-eos-keytab | $REVA_STORAGE_EOS_KEYTAB +: the location of the keytab to use to authenticate to EOS. + +--storage-eos-single-username | $REVA_STORAGE_EOS_SINGLE_USERNAME +: the username to use when SingleUserMode is enabled. + +--storage-eos-layout | $REVA_STORAGE_EOS_LAYOUT +: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `. Default: `{{substr 0 1 .Username}}/{{.Username}}`. + +--storage-local-root | $REVA_STORAGE_LOCAL_ROOT +: the path to the local storage root. Default: `/var/tmp/reva/root`. + +--storage-owncloud-datadir | $REVA_STORAGE_OWNCLOUD_DATADIR +: the path to the owncloud data directory. Default: `/var/tmp/reva/data`. + +--storage-owncloud-scan | $REVA_STORAGE_OWNCLOUD_SCAN +: scan files on startup to add fileids. Default: `true`. + +--storage-owncloud-redis | $REVA_STORAGE_OWNCLOUD_REDIS_ADDR +: the address of the redis server. Default: `:6379`. + +--storage-owncloud-enable-home | $REVA_STORAGE_OWNCLOUD_ENABLE_HOME +: enable the creation of home storages. Default: `false`. + +--storage-owncloud-layout | $REVA_STORAGE_OWNCLOUD_LAYOUT +: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `. Default: `{{.Username}}`. + +### ocis-reva frontend + +Start reva frontend service + +Usage: `ocis-reva frontend [command options] [arguments...]` + +--tracing-enabled | $REVA_TRACING_ENABLED +: Enable sending traces. + +--tracing-type | $REVA_TRACING_TYPE +: Tracing backend type. Default: `jaeger`. + +--tracing-endpoint | $REVA_TRACING_ENDPOINT +: Endpoint for the agent. + +--tracing-collector | $REVA_TRACING_COLLECTOR +: Endpoint for the collector. + +--tracing-service | $REVA_TRACING_SERVICE +: Service name for tracing. Default: `reva`. + +--debug-addr | $REVA_FRONTEND_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9141`. + +--debug-token | $REVA_DEBUG_TOKEN +: Token to grant metrics access. + +--debug-pprof | $REVA_DEBUG_PPROF +: Enable pprof debugging. + +--debug-zpages | $REVA_DEBUG_ZPAGES +: Enable zpages debugging. + +--jwt-secret | $REVA_JWT_SECRET +: Shared jwt secret for reva service communication. Default: `Pive-Fumkiu4`. + +--transfer-secret | $REVA_TRANSFER_SECRET +: Transfer secret for datagateway. Default: `replace-me-with-a-transfer-secret`. + +--webdav-namespace | $WEBDAV_NAMESPACE +: Namespace prefix for the /webdav endpoint. Default: `/home/`. + +--dav-files-namespace | $DAV_FILES_NAMESPACE +: Namespace prefix for the webdav /dav/files endpoint. Default: `/oc/`. + +--network | $REVA_FRONTEND_NETWORK +: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $REVA_FRONTEND_PROTOCOL +: protocol for reva service, can be 'http' or 'grpc'. Default: `http`. + +--addr | $REVA_FRONTEND_ADDR +: Address to bind reva service. Default: `0.0.0.0:9140`. + +--url | $REVA_FRONTEND_URL +: URL to use for the reva service. Default: `localhost:9140`. + +--gateway-url | $REVA_GATEWAY_URL +: URL to use for the reva gateway service. Default: `localhost:9142`. + +### ocis-reva storage-home + +Start reva storage-home service + +Usage: `ocis-reva storage-home [command options] [arguments...]` + +--tracing-enabled | $REVA_TRACING_ENABLED +: Enable sending traces. + +--tracing-type | $REVA_TRACING_TYPE +: Tracing backend type. Default: `jaeger`. + +--tracing-endpoint | $REVA_TRACING_ENDPOINT +: Endpoint for the agent. + +--tracing-collector | $REVA_TRACING_COLLECTOR +: Endpoint for the collector. + +--tracing-service | $REVA_TRACING_SERVICE +: Service name for tracing. Default: `reva`. + +--debug-addr | $REVA_STORAGE_HOME_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9155`. + +--debug-token | $REVA_DEBUG_TOKEN +: Token to grant metrics access. + +--debug-pprof | $REVA_DEBUG_PPROF +: Enable pprof debugging. + +--debug-zpages | $REVA_DEBUG_ZPAGES +: Enable zpages debugging. + +--jwt-secret | $REVA_JWT_SECRET +: Shared jwt secret for reva service communication. Default: `Pive-Fumkiu4`. + +--network | $REVA_STORAGE_HOME_NETWORK +: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $REVA_STORAGE_HOME_PROTOCOL +: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $REVA_STORAGE_HOME_ADDR +: Address to bind reva service. Default: `0.0.0.0:9154`. + +--url | $REVA_STORAGE_HOME_URL +: URL to use for the reva service. Default: `localhost:9154`. + +--driver | $REVA_STORAGE_HOME_DRIVER +: storage driver, eg. local, eos, owncloud or s3. Default: `owncloud`. + +--mount-path | $REVA_STORAGE_HOME_MOUNT_PATH +: mount path. Default: `/home`. + +--mount-id | $REVA_STORAGE_HOME_MOUNT_ID +: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009162`. + +--expose-data-server | $REVA_STORAGE_HOME_EXPOSE_DATA_SERVER +: exposes a dedicated data server. Default: `true`. + +--data-server-url | $REVA_STORAGE_HOME_DATA_SERVER_URL +: data server url. Default: `http://localhost:9156/data`. + +--enable-home-creation | $REVA_STORAGE_HOME_ENABLE_HOME_CREATION +: if enabled home dirs will be automatically created. Default: `true`. + +--storage-eos-namespace | $REVA_STORAGE_EOS_NAMESPACE +: Namespace for metadata operations. Default: `/eos/dockertest/reva/users`. + +--storage-eos-shadow-namespace | $REVA_STORAGE_EOS_SHADOW_NAMESPACE +: Shadow namespace where share references are stored. + +--storage-eos-share-folder | $REVA_STORAGE_EOS_SHARE_FOLDER +: name of the share folder. Default: `/Shares`. + +--storage-eos-binary | $REVA_STORAGE_EOS_BINARY +: Location of the eos binary. Default: `/usr/bin/eos`. + +--storage-eos-xrdcopy-binary | $REVA_STORAGE_EOS_XRDCOPY_BINARY +: Location of the xrdcopy binary. Default: `/usr/bin/xrdcopy`. + +--storage-eos-master-url | $REVA_STORAGE_EOS_MASTER_URL +: URL of the Master EOS MGM. Default: `root://eos-mgm1.eoscluster.cern.ch:1094`. + +--storage-eos-slave-url | $REVA_STORAGE_EOS_SLAVE_URL +: URL of the Slave EOS MGM. Default: `root://eos-mgm1.eoscluster.cern.ch:1094`. + +--storage-eos-cache-directory | $REVA_STORAGE_EOS_CACHE_DIRECTORY +: Location on the local fs where to store reads. Default: `os.TempDir()`. + +--storage-eos-enable-logging | $REVA_STORAGE_EOS_ENABLE_LOGGING +: Enables logging of the commands executed. + +--storage-eos-show-hidden-sysfiles | $REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES +: show internal EOS files like .sys.v# and .sys.a# files.. + +--storage-eos-force-singleuser-mode | $REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE +: force connections to EOS to use SingleUsername. + +--storage-eos-use-keytab | $REVA_STORAGE_EOS_USE_KEYTAB +: authenticate requests by using an EOS keytab. + +--storage-eos-enable-home | $REVA_STORAGE_EOS_ENABLE_HOME +: enable the creation of home directories. Default: `true`. + +--storage-eos-sec-protocol | $REVA_STORAGE_EOS_SEC_PROTOCOL +: the xrootd security protocol to use between the server and EOS. + +--storage-eos-keytab | $REVA_STORAGE_EOS_KEYTAB +: the location of the keytab to use to authenticate to EOS. + +--storage-eos-single-username | $REVA_STORAGE_EOS_SINGLE_USERNAME +: the username to use when SingleUserMode is enabled. + +--storage-eos-layout | $REVA_STORAGE_EOS_LAYOUT +: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{substr 0 1 .Username}}/{{.Username}}" will turn "Einstein" into "E/Einstein" `. Default: `{{substr 0 1 .Username}}/{{.Username}}`. + +--storage-local-root | $REVA_STORAGE_LOCAL_ROOT +: the path to the local storage root. Default: `/var/tmp/reva/root`. + +--storage-owncloud-datadir | $REVA_STORAGE_OWNCLOUD_DATADIR +: the path to the owncloud data directory. Default: `/var/tmp/reva/data`. + +--storage-owncloud-scan | $REVA_STORAGE_OWNCLOUD_SCAN +: scan files on startup to add fileids. Default: `true`. + +--storage-owncloud-redis | $REVA_STORAGE_OWNCLOUD_REDIS_ADDR +: the address of the redis server. Default: `:6379`. + +--storage-owncloud-enable-home | $REVA_STORAGE_OWNCLOUD_ENABLE_HOME +: enable the creation of home storages. Default: `true`. + +--storage-owncloud-layout | $REVA_STORAGE_OWNCLOUD_LAYOUT +: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `. Default: `{{.Username}}`. + +### ocis-reva storage-oc-data + +Start reva storage-oc-data service + +Usage: `ocis-reva storage-oc-data [command options] [arguments...]` + +--tracing-enabled | $REVA_TRACING_ENABLED +: Enable sending traces. + +--tracing-type | $REVA_TRACING_TYPE +: Tracing backend type. Default: `jaeger`. + +--tracing-endpoint | $REVA_TRACING_ENDPOINT +: Endpoint for the agent. + +--tracing-collector | $REVA_TRACING_COLLECTOR +: Endpoint for the collector. + +--tracing-service | $REVA_TRACING_SERVICE +: Service name for tracing. Default: `reva`. + +--debug-addr | $REVA_STORAGE_OC_DATA_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9161`. + +--debug-token | $REVA_DEBUG_TOKEN +: Token to grant metrics access. + +--debug-pprof | $REVA_DEBUG_PPROF +: Enable pprof debugging. + +--debug-zpages | $REVA_DEBUG_ZPAGES +: Enable zpages debugging. + +--jwt-secret | $REVA_JWT_SECRET +: Shared jwt secret for reva service communication. Default: `Pive-Fumkiu4`. + +--network | $REVA_STORAGE_EOS_DATA_NETWORK +: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $REVA_STORAGE_EOS_DATA_PROTOCOL +: protocol for reva service, can be 'http' or 'grpc'. Default: `http`. + +--addr | $REVA_STORAGE_EOS_DATA_ADDR +: Address to bind reva service. Default: `0.0.0.0:9160`. + +--url | $REVA_STORAGE_EOS_DATA_URL +: URL to use for the reva service. Default: `localhost:9160`. + +--driver | $REVA_STORAGE_EOS_DATA_DRIVER +: storage driver, eg. local, eos, owncloud or s3. Default: `eos`. + +--prefix | $REVA_STORAGE_EOS_DATA_PREFIX +: prefix for the http endpoint, without leading slash. Default: `data`. + +--temp-folder | $REVA_STORAGE_EOS_DATA_TEMP_FOLDER +: temp folder. Default: `/var/tmp/`. + +--storage-eos-namespace | $REVA_STORAGE_EOS_NAMESPACE +: Namespace for metadata operations. Default: `/eos/dockertest/reva`. + +--storage-eos-shadow-namespace | $REVA_STORAGE_EOS_SHADOW_NAMESPACE +: Shadow namespace where share references are stored. + +--storage-eos-share-folder | $REVA_STORAGE_EOS_SHARE_FOLDER +: name of the share folder. Default: `/Shares`. + +--storage-eos-binary | $REVA_STORAGE_EOS_BINARY +: Location of the eos binary. Default: `/usr/bin/eos`. + +--storage-eos-xrdcopy-binary | $REVA_STORAGE_EOS_XRDCOPY_BINARY +: Location of the xrdcopy binary. Default: `/usr/bin/xrdcopy`. + +--storage-eos-master-url | $REVA_STORAGE_EOS_MASTER_URL +: URL of the Master EOS MGM. Default: `root://eos-mgm1.eoscluster.cern.ch:1094`. + +--storage-eos-slave-url | $REVA_STORAGE_EOS_SLAVE_URL +: URL of the Slave EOS MGM. Default: `root://eos-mgm1.eoscluster.cern.ch:1094`. + +--storage-eos-cache-directory | $REVA_STORAGE_EOS_CACHE_DIRECTORY +: Location on the local fs where to store reads. Default: `os.TempDir()`. + +--storage-eos-enable-logging | $REVA_STORAGE_EOS_ENABLE_LOGGING +: Enables logging of the commands executed. + +--storage-eos-show-hidden-sysfiles | $REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES +: show internal EOS files like .sys.v# and .sys.a# files.. + +--storage-eos-force-singleuser-mode | $REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE +: force connections to EOS to use SingleUsername. + +--storage-eos-use-keytab | $REVA_STORAGE_EOS_USE_KEYTAB +: authenticate requests by using an EOS keytab. + +--storage-eos-enable-home | $REVA_STORAGE_EOS_ENABLE_HOME +: enable the creation of home directories. + +--storage-eos-sec-protocol | $REVA_STORAGE_EOS_SEC_PROTOCOL +: the xrootd security protocol to use between the server and EOS. + +--storage-eos-keytab | $REVA_STORAGE_EOS_KEYTAB +: the location of the keytab to use to authenticate to EOS. + +--storage-eos-single-username | $REVA_STORAGE_EOS_SINGLE_USERNAME +: the username to use when SingleUserMode is enabled. + +--storage-eos-layout | $REVA_STORAGE_EOS_LAYOUT +: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `. Default: `{{substr 0 1 .Username}}/{{.Username}}`. + +--storage-local-root | $REVA_STORAGE_LOCAL_ROOT +: the path to the local storage root. Default: `/var/tmp/reva/root`. + +--storage-owncloud-datadir | $REVA_STORAGE_OWNCLOUD_DATADIR +: the path to the owncloud data directory. Default: `/var/tmp/reva/data`. + +--storage-owncloud-scan | $REVA_STORAGE_OWNCLOUD_SCAN +: scan files on startup to add fileids. Default: `true`. + +--storage-owncloud-redis | $REVA_STORAGE_OWNCLOUD_REDIS_ADDR +: the address of the redis server. Default: `:6379`. + +--storage-owncloud-enable-home | $REVA_STORAGE_OWNCLOUD_ENABLE_HOME +: enable the creation of home storages. Default: `false`. + +--storage-owncloud-layout | $REVA_STORAGE_OWNCLOUD_LAYOUT +: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `. Default: `{{.Username}}`. + +--gateway-url | $REVA_GATEWAY_URL +: URL to use for the reva gateway service. Default: `localhost:9142`. + diff --git a/docs/getting-started.md b/docs/getting-started.md index 6c29217fe0..e7140676e0 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -1,27 +1,56 @@ --- title: "Getting Started" date: 2018-05-02T00:00:00+00:00 -weight: 20 +weight: 15 geekdocRepo: https://github.com/owncloud/ocis-reva geekdocEditPath: edit/master/docs geekdocFilePath: getting-started.md --- -### Installation +{{< toc >}} + +## Installation So far we are offering two different variants for the installation. You can choose between [Docker](https://www.docker.com/) or pre-built binaries which are stored on our download mirrors and GitHub releases. Maybe we will also provide system packages for the major distributions later if we see the need for it. -#### Docker +### Docker -TBD +Docker images for ocis-reva are hosted on https://hub.docker.com/r/owncloud/ocis-reva. -#### Binaries +The `latest` tag always reflects the current master branch. -TBD +```console +docker pull owncloud/ocis-reva +``` -### Configuration +#### Dependencies -We provide overall three different variants of configuration. The variant based on environment variables and commandline flags are split up into global values and command-specific values. +- Running ocis-reva currently needs a working Redis caching server +- The default storage location in the container is `/var/tmp/reva/data`. You may want to create a volume to persist the files in the primary storage -The configuration tries to map different configuration options from reva into dedicated services. For now please run `bin/ocis-reva {command} -h` to see the list of available options or have a look at [the flagsets](https://github.com/owncloud/ocis-reva/tree/master/pkg/flagset) and the mapping to a reva config in the corresponding [commands](https://github.com/owncloud/ocis-reva/tree/master/pkg/command). +### Binaries +The pre-built binaries for different platforms are downloadable at https://download.owncloud.com/ocis/ocis-reva/ . Specific releases are organized in separate folders. They are in sync which every release tag on GitHub. The binaries from the current master branch can be found in https://download.owncloud.com/ocis/ocis-reva/testing/ + +```console +curl https://download.owncloud.com/ocis/ocis/1.0.0-beta1/ocis-reva-1.0.0-beta1-darwin-amd64 --output ocis-reva +chmod +x ocis +./ocis-reva sharing +``` + +#### Dependencies + +- Running ocis currently needs a working Redis caching server +- The default promary storage location is `/var/tmp/reva/data`. You can change that value by configuration. + +## Usage + +The program provides a few sub-commands on execution. The available configuration methods have already been mentioned above. Generally you can always see a formated help output if you execute the binary via `ocis-reva --help`. + +### Health + +The health command is used to execute a health check, if the exit code equals zero the service should be up and running, if the exist code is greater than zero the service is not in a healthy state. Generally this command is used within our Docker containers, it could also be used within Kubernetes. + +{{< highlight txt >}} +ocis-reva health --help +{{< / highlight >}} diff --git a/go.mod b/go.mod index c481566131..21a3999166 100644 --- a/go.mod +++ b/go.mod @@ -11,6 +11,7 @@ require ( github.com/micro/go-micro v1.18.0 github.com/micro/go-micro/v2 v2.0.0 github.com/oklog/run v1.0.0 + github.com/owncloud/flaex v0.0.0-20200411150708-dce59891a203 github.com/owncloud/ocis-pkg/v2 v2.0.1 github.com/pelletier/go-toml v1.6.0 // indirect github.com/prometheus/client_model v0.0.0-20191202183732-d1d2010b5bee // indirect @@ -23,7 +24,6 @@ require ( github.com/uber/jaeger-client-go v2.20.1+incompatible // indirect golang.org/x/sys v0.0.0-20200103143344-a1369afcdac7 // indirect gopkg.in/ini.v1 v1.51.1 // indirect - gopkg.in/yaml.v2 v2.2.7 // indirect ) replace google.golang.org/grpc => google.golang.org/grpc v1.26.0 diff --git a/go.sum b/go.sum index 34e70bdc75..e1416c7880 100644 --- a/go.sum +++ b/go.sum @@ -444,6 +444,8 @@ github.com/ory/fosite v0.31.0/go.mod h1:lSSqjo8Kr/U1P3kJWxsNGHmq7TnH/7pS1ijvQRT7 github.com/ory/go-convenience v0.1.0 h1:zouLKfF2GoSGnJwGq+PE/nJAE6dj2Zj5QlTgmMTsTS8= github.com/ory/go-convenience v0.1.0/go.mod h1:uEY/a60PL5c12nYz4V5cHY03IBmwIAEm8TWB0yn9KNs= github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ= +github.com/owncloud/flaex v0.0.0-20200411150708-dce59891a203 h1:sXVTQ94GWeiBhlgN0kSbcyXQNmwzPuuhWyObxgTu/xE= +github.com/owncloud/flaex v0.0.0-20200411150708-dce59891a203/go.mod h1:jip86t4OVURJTf8CM/0e2qcji/Y4NG3l2lR8kex4JWw= github.com/owncloud/ocis-pkg/v2 v2.0.1 h1:3ISEtfjAz4pDFczTggIJwKuft3bVsAp1C7dFY9BBPEs= github.com/owncloud/ocis-pkg/v2 v2.0.1/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= @@ -644,6 +646,8 @@ golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a h1:R/qVym5WAxsZWQqZCwDY/8 golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200117160349-530e935923ad h1:Jh8cai0fqIK+f6nG0UgPW5wFk8wmiMhM3AyciDBdtQg= golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200320181102-891825fb96df h1:lDWgvUvNnaTnNBc/dwOty86cFeKoKWbwy2wQj0gIxbU= +golang.org/x/crypto v0.0.0-20200320181102-891825fb96df/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -771,6 +775,7 @@ golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 h1:hKsoRgsbwY1NafxrwTs+k64bikrLBkAgPir1TNCj3Zs= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361 h1:RIIXAeV6GvDBuADKumTODatUqANFZ+5BPMnzsy4hulY= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -846,14 +851,15 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/templates/CONFIGURATION.tmpl b/templates/CONFIGURATION.tmpl new file mode 100644 index 0000000000..060c8024fe --- /dev/null +++ b/templates/CONFIGURATION.tmpl @@ -0,0 +1,78 @@ +--- +title: "Configuration" +date: "{{ date "2006-01-02T15:04:05-0700" now }}" +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis-reva +geekdocEditPath: edit/master/docs +geekdocFilePath: configuration.md +--- +{{- define "options"}} +{{ $fnName := (last . ).Flags -}} +{{ range $opt := first . }}{{ with list $fnName $opt -}} +{{ $o := last . -}} +{{ if eq $o.FnName $fnName -}} +--{{ $o.Name }} | ${{ index $o.Env 0 }} +: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} + +{{ end -}} +{{ end -}} +{{ end -}} +{{ end }} + +{{`{{< toc >}}`}} + +## Configuration + +oCIS Single Binary is not responsible for configuring extensions. Instead, each extension could either be configured by environment variables, cli flags or config files. + +Each extension has its dedicated documentation page (e.g. https://owncloud.github.io/extensions/ocis_proxy/configuration) which lists all possible configurations. Config files and environment variables are picked up if you use the `./bin/ocis server` command within the oCIS single binary. Command line flags must be set explicitly on the extensions subcommands. + +### Configuration using config files + +Out of the box extensions will attempt to read configuration details from: + +```console +/etc/ocis +$HOME/.ocis +./config +``` + +For this configuration to be picked up, have a look at your extension `root` command and look for which default config name it has assigned. *i.e: ocis-proxy reads `proxy.json | yaml | toml ...`*. + +So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis/tree/master/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/ocis.yml`, `${HOME}/.ocis/ocis.yml` or `$(pwd)/config/ocis.yml`. + +### Envrionment variables + +If you prefer to configure the service with environment variables you can see the available variables below. + +### 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. + +{{ $options := .Options -}} +{{ range $com := .Commands }}{{ with (list $options $com) -}} +{{ $c := last . -}} +{{ if eq $c.Name "ocis-reva" -}} +## Root Command + +{{ $c.Usage }} + +Usage: `ocis-reva [global options] command [command options] [arguments...]` +{{ template "options" . -}} +## Sub Commands + +{{ end -}} +{{ end -}} +{{ end -}} +{{- range $com := .Commands }}{{ with (list $options $com) -}} +{{- $c := last . }} +{{- if ne $c.Name "ocis-reva" -}} +### ocis-reva {{ $c.Name }} + +{{ $c.Usage }} + +Usage: `ocis-reva {{ $c.Name }} [command options] [arguments...]` +{{ template "options" . }} +{{- end -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/tools.go b/tools.go index f1911ffdcb..fce36f2420 100644 --- a/tools.go +++ b/tools.go @@ -3,5 +3,6 @@ package main import ( + _ "github.com/owncloud/flaex" _ "github.com/restic/calens" )