From 454d29e7d8a25b126d9739a083178b9726cd3a86 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Sat, 28 Mar 2020 23:33:10 +0100 Subject: [PATCH 1/2] Add Flagset extractor, generate configuration docs --- docs/configuration.md | 182 ++++++++++++++++++++++++++++++++++- go.mod | 4 + go.sum | 10 ++ templates/CONFIGURATION.tmpl | 79 +++++++++++++++ 4 files changed, 274 insertions(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index 24a3567e06..b4991172d7 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1,6 +1,10 @@ --- title: "Configuration" +<<<<<<< HEAD date: "2020-04-03T21:39:56" +======= +date: "2020-04-13T22:12:41+0200" +>>>>>>> Add Flagset extractor, generate configuration docs weight: 20 geekdocRepo: https://github.com/owncloud/ocis geekdocEditPath: edit/master/docs @@ -17,7 +21,11 @@ oCIS Single Binary is not responsible for configuring extensions. Instead, each 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. +<<<<<<< HEAD ## Configuration using config files +======= +### Configuration using config files +>>>>>>> Add Flagset extractor, generate configuration docs Out of the box extensions will attempt to read configuration details from: @@ -29,6 +37,7 @@ $HOME/.ocis 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 ...`*. +<<<<<<< HEAD ### Configuration file 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`. @@ -149,8 +158,179 @@ If you prefer to configure the service with commandline flags you can see the av --log-color : Enable colored logging. Default: `true`. +======= +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`. -### Health +### 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 + +ownCloud Infinite Scale Stack + +Usage: `ocis [global options] command [command options] [arguments...]` + +--config-file | $OCIS_CONFIG_FILE +: Path to config file. + +--log-level | $OCIS_LOG_LEVEL +: Set logging level. Default: `info`. + +--log-pretty | $OCIS_LOG_PRETTY +: Enable pretty logging. Default: `true`. + +--log-color | $OCIS_LOG_COLOR +: Enable colored logging. Default: `true`. + +## Sub Commands + +### ocis server + +Start fullstack server + +Usage: `ocis server [command options] [arguments...]` + +--tracing-enabled | $OCIS_TRACING_ENABLED +: Enable sending traces. + +--tracing-type | $OCIS_TRACING_TYPE +: Tracing backend type. Default: `jaeger`. + +--tracing-endpoint | $OCIS_TRACING_ENDPOINT +: Endpoint for the agent. + +--tracing-collector | $OCIS_TRACING_COLLECTOR +: Endpoint for the collector. + +--tracing-service | $OCIS_TRACING_SERVICE +: Service name for tracing. Default: `ocis`. + +--debug-addr | $OCIS_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9010`. + +--debug-token | $OCIS_DEBUG_TOKEN +: Token to grant metrics access. + +--debug-pprof | $OCIS_DEBUG_PPROF +: Enable pprof debugging. + +--debug-zpages | $OCIS_DEBUG_ZPAGES +: Enable zpages debugging. + +--http-addr | $OCIS_HTTP_ADDR +: Address to bind http server. Default: `0.0.0.0:9000`. + +--http-root | $OCIS_HTTP_ROOT +: Root path of http server. Default: `/`. + +--grpc-addr | $OCIS_GRPC_ADDR +: Address to bind grpc server. Default: `0.0.0.0:9001`. + +### 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`. + +### List of available Extension subcommands + +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 reva-gateway + +Start reva gateway + +#### ocis konnectd + +Start konnectd server + +#### ocis thumbnails + +Start thumbnails server +>>>>>>> Add Flagset extractor, generate configuration docs + +#### ocis phoenix + +<<<<<<< HEAD --debug-addr : Address to debug endpoint. Default: `0.0.0.0:9010`. +======= +Start phoenix server + +#### ocis reva-storage-home + +Start reva home storage + +#### ocis reva-auth-bearer + +Start reva auth-bearer service + +#### ocis reva-sharing + +Start reva sharing service + +#### ocis reva-auth-basic + +Start reva auth-basic service + +#### ocis reva-storage-oc + +Start reva oc storage + +#### ocis glauth + +Start glauth server + +#### ocis reva-storage-oc-data + +Start reva oc storage dataprovider + +#### ocis graph + +Start graph server + +#### ocis graph-explorer + +Start graph explorer + +#### ocis webdav + +Start webdav server + +#### ocis ocs + +Start ocs server + +#### ocis reva-storage-home-data + +Start reva home storage dataprovider + +#### ocis hello + +Start hello server + +#### ocis reva-frontend + +Start reva frontend + +#### ocis reva-storage-root + +Start reva root storage + +#### ocis proxy + +Start proxy server + +#### ocis reva-users + +Start reva users service + +>>>>>>> Add Flagset extractor, generate configuration docs diff --git a/go.mod b/go.mod index 0ced202bb0..6b9cc91d47 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,11 @@ require ( github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e github.com/micro/micro/v2 v2.0.1-0.20200210100719-f38a1d8d5348 github.com/openzipkin/zipkin-go v0.2.2 +<<<<<<< HEAD github.com/owncloud/flaex v0.0.0-20200403112718-56e2e067dd26 +======= + github.com/owncloud/flaex v0.2.0 +>>>>>>> Add Flagset extractor, generate configuration docs github.com/owncloud/ocis-glauth v0.4.0 github.com/owncloud/ocis-graph v0.0.0-20200318175820-9a5a6e029db7 github.com/owncloud/ocis-graph-explorer v0.0.0-20200210111049-017eeb40dc0c diff --git a/go.sum b/go.sum index 76e607ec35..f1b116f8a9 100644 --- a/go.sum +++ b/go.sum @@ -711,8 +711,15 @@ github.com/ory/fosite v0.30.4/go.mod h1:Lq9qQ9Sl6mcea2Tt8J7PU+wUeFYPZ+vg7N3zPVKG 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= +<<<<<<< HEAD github.com/owncloud/flaex v0.0.0-20200403112718-56e2e067dd26 h1:ofIXmzOjPRH3Rr/iGaPoTXDnlIc0tsaG1kJqXB+Hb94= github.com/owncloud/flaex v0.0.0-20200403112718-56e2e067dd26/go.mod h1:E/0AQ3JGUVeEQxf2IxZoysUXpE0IEL/O9Rrd13dVEyU= +======= +github.com/owncloud/flaex v0.1.0 h1:3WTWhH3fWqtvkcEfTlXLykgUF9Saww7UU9fQeNsANOg= +github.com/owncloud/flaex v0.1.0/go.mod h1:jip86t4OVURJTf8CM/0e2qcji/Y4NG3l2lR8kex4JWw= +github.com/owncloud/flaex v0.2.0 h1:3FLf8oyMgA6HLK7w4+VJ5N1oVA8G7MptLCVjfxxIaww= +github.com/owncloud/flaex v0.2.0/go.mod h1:jip86t4OVURJTf8CM/0e2qcji/Y4NG3l2lR8kex4JWw= +>>>>>>> Add Flagset extractor, generate configuration docs github.com/owncloud/ocis-accounts v0.1.0 h1:6YjvRWNW26QHOqOFONg0HeogxhxaVGS1S2AoCUgzE3M= github.com/owncloud/ocis-accounts v0.1.0/go.mod h1:eoOPfuFCJ23n2csSMzapfjzVhG2kt8sQ2tu/9J+SwsA= github.com/owncloud/ocis-glauth v0.4.0 h1:L+S2UzkJJv5NWBVnTIZObdFz5zvKz8L0crIWbXtTF8o= @@ -1166,6 +1173,7 @@ golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 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= @@ -1283,6 +1291,8 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh 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 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20191109101513-0171b7c15da1/go.mod h1:VJq7+38rpM4TSUbRiZX4P5UVAKK2UQpNQLZClkFQkpE= k8s.io/apimachinery v0.0.0-20191109100837-dffb012825f2/go.mod h1:+6CX7hP4aLfX2sb91JYDMIp0VqDSog2kZu0BHe+lP+s= k8s.io/apimachinery v0.0.0-20191111054156-6eb29fdf75dc/go.mod h1:+6CX7hP4aLfX2sb91JYDMIp0VqDSog2kZu0BHe+lP+s= diff --git a/templates/CONFIGURATION.tmpl b/templates/CONFIGURATION.tmpl index 83858ea04c..673775bccd 100644 --- a/templates/CONFIGURATION.tmpl +++ b/templates/CONFIGURATION.tmpl @@ -1,23 +1,49 @@ --- title: "Configuration" +<<<<<<< HEAD date: "{{ dateInZone "2006-01-02T15:04:05" (now) "UTC"}}" +======= +date: "{{ date "2006-01-02T15:04:05-0700" now }}" +>>>>>>> Add Flagset extractor, generate configuration docs weight: 20 geekdocRepo: https://github.com/owncloud/ocis geekdocEditPath: edit/master/docs geekdocFilePath: configuration.md --- +<<<<<<< HEAD +======= +{{- 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 }} +>>>>>>> Add Flagset extractor, generate configuration docs {{`{{< toc >}}`}} ## Configuration +<<<<<<< HEAD ## Configuration of extensions +======= +>>>>>>> Add Flagset extractor, generate configuration docs 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. +<<<<<<< HEAD ## Configuration using config files +======= +### Configuration using config files +>>>>>>> Add Flagset extractor, generate configuration docs Out of the box extensions will attempt to read configuration details from: @@ -29,6 +55,7 @@ $HOME/.ocis 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 ...`*. +<<<<<<< HEAD ### Configuration file 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`. @@ -86,6 +113,58 @@ If you prefer to configure the service with commandline flags you can see the av {{- if eq .FnName "HealthWithConfig"}} --{{ .Name}} : {{ .Usage }}. {{- if .Default }} Default: `{{ .Default }}`.{{ end }} +======= +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" -}} +## Root Command + +{{ $c.Usage }} + +Usage: `ocis [global options] command [command options] [arguments...]` +{{ template "options" . -}} +## Sub Commands + +{{ end -}} +{{ end -}} +{{ end -}} +{{- range $com := .Commands }}{{ with (list $options $com) -}} +{{- $c := last . }} +{{- if eq $c.Name "server" "health" -}} +{{- if ne $c.FnName "Simple" -}} +### ocis {{ $c.Name }} + +{{ $c.Usage }} + +Usage: `ocis {{ $c.Name }} [command options] [arguments...]` +{{ template "options" . }} +{{- end -}} +{{- end -}} +{{- end -}} +{{- end -}} + +### List of available Extension subcommands + +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. + +{{ range $com := .Commands }}{{ with $com -}} +{{ if and (ne .Name "health") (ne .Name "server") (ne .Name "ocis") -}} +#### ocis {{ .Name }} + +{{ .Usage }} + +>>>>>>> Add Flagset extractor, generate configuration docs {{ end -}} {{- end -}} {{- end -}} \ No newline at end of file From fe16ff6e7356a5c24b0788b55e302fbb2fdbc4c4 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Tue, 14 Apr 2020 21:14:28 +0200 Subject: [PATCH 2/2] update flaex template --- docs/configuration.md | 270 +++++++++-------------------------- go.mod | 4 - go.sum | 9 -- templates/CONFIGURATION.tmpl | 76 ---------- 4 files changed, 66 insertions(+), 293 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index b4991172d7..b9fda6d317 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1,10 +1,6 @@ --- title: "Configuration" -<<<<<<< HEAD -date: "2020-04-03T21:39:56" -======= -date: "2020-04-13T22:12:41+0200" ->>>>>>> Add Flagset extractor, generate configuration docs +date: "2020-04-14T22:00:52+0200" weight: 20 geekdocRepo: https://github.com/owncloud/ocis geekdocEditPath: edit/master/docs @@ -15,17 +11,11 @@ geekdocFilePath: configuration.md ## Configuration -## Configuration of extensions - 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. -<<<<<<< HEAD -## Configuration using config files -======= ### Configuration using config files ->>>>>>> Add Flagset extractor, generate configuration docs Out of the box extensions will attempt to read configuration details from: @@ -37,128 +27,6 @@ $HOME/.ocis 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 ...`*. -<<<<<<< HEAD -### Configuration file - -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. - -### Server - -OCIS_TRACING_ENABLED -: Enable sending traces. - -OCIS_TRACING_TYPE -: Tracing backend type. Default: `jaeger`. - -OCIS_TRACING_ENDPOINT -: Endpoint for the agent. - -OCIS_TRACING_COLLECTOR -: Endpoint for the collector. - -OCIS_TRACING_SERVICE -: Service name for tracing. Default: `ocis`. - -OCIS_DEBUG_ADDR -: Address to bind debug server. Default: `0.0.0.0:9010`. - -OCIS_DEBUG_TOKEN -: Token to grant metrics access. - -OCIS_DEBUG_PPROF -: Enable pprof debugging. - -OCIS_DEBUG_ZPAGES -: Enable zpages debugging. - -OCIS_HTTP_ADDR -: Address to bind http server. Default: `0.0.0.0:9000`. - -OCIS_HTTP_ROOT -: Root path of http server. Default: `/`. - -OCIS_GRPC_ADDR -: Address to bind grpc server. Default: `0.0.0.0:9001`. - -### Root Command - -OCIS_CONFIG_FILE -: Path to config file. - -OCIS_LOG_LEVEL -: Set logging level. Default: `info`. - -OCIS_LOG_PRETTY -: Enable pretty logging. Default: `true`. - -OCIS_LOG_COLOR -: Enable colored logging. Default: `true`. - -### Health - -OCIS_DEBUG_ADDR -: Address to debug endpoint. Default: `0.0.0.0:9010`. - -## Commandline flags - -If you prefer to configure the service with commandline flags you can see the available variables below. - -### Server - ---tracing-enabled -: Enable sending traces. - ---tracing-type -: Tracing backend type. Default: `jaeger`. - ---tracing-endpoint -: Endpoint for the agent. - ---tracing-collector -: Endpoint for the collector. - ---tracing-service -: Service name for tracing. Default: `ocis`. - ---debug-addr -: Address to bind debug server. Default: `0.0.0.0:9010`. - ---debug-token -: Token to grant metrics access. - ---debug-pprof -: Enable pprof debugging. - ---debug-zpages -: Enable zpages debugging. - ---http-addr -: Address to bind http server. Default: `0.0.0.0:9000`. - ---http-root -: Root path of http server. Default: `/`. - ---grpc-addr -: Address to bind grpc server. Default: `0.0.0.0:9001`. - -### Root Command - ---config-file -: Path to config file. - ---log-level -: Set logging level. Default: `info`. - ---log-pretty -: Enable pretty logging. Default: `true`. - ---log-color -: Enable colored logging. Default: `true`. -======= 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 @@ -189,6 +57,15 @@ 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 server Start fullstack server @@ -231,23 +108,66 @@ Usage: `ocis server [command options] [arguments...]` --grpc-addr | $OCIS_GRPC_ADDR : Address to bind grpc server. Default: `0.0.0.0:9001`. -### 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`. - ### List of available Extension subcommands 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 proxy + +Start proxy server + +#### ocis reva-storage-oc-data + +Start reva oc storage dataprovider + +#### ocis reva-auth-bearer + +Start reva auth-bearer service + +#### ocis webdav + +Start webdav server + +#### ocis reva-sharing + +Start reva sharing service + #### ocis reva-gateway Start reva gateway +#### ocis graph-explorer + +Start graph explorer + +#### ocis reva-auth-basic + +Start reva auth-basic service + +#### ocis hello + +Start hello server + +#### ocis reva-storage-home + +Start reva home storage + +#### ocis reva-storage-oc + +Start reva oc storage + +#### ocis reva-frontend + +Start reva frontend + +#### ocis reva-storage-home-data + +Start reva home storage dataprovider + +#### ocis graph + +Start graph server + #### ocis konnectd Start konnectd server @@ -255,82 +175,24 @@ Start konnectd server #### ocis thumbnails Start thumbnails server ->>>>>>> Add Flagset extractor, generate configuration docs - -#### ocis phoenix - -<<<<<<< HEAD ---debug-addr -: Address to debug endpoint. Default: `0.0.0.0:9010`. -======= -Start phoenix server - -#### ocis reva-storage-home - -Start reva home storage - -#### ocis reva-auth-bearer - -Start reva auth-bearer service - -#### ocis reva-sharing - -Start reva sharing service - -#### ocis reva-auth-basic - -Start reva auth-basic service - -#### ocis reva-storage-oc - -Start reva oc storage #### ocis glauth Start glauth server -#### ocis reva-storage-oc-data +#### ocis phoenix -Start reva oc storage dataprovider - -#### ocis graph - -Start graph server - -#### ocis graph-explorer - -Start graph explorer - -#### ocis webdav - -Start webdav server +Start phoenix server #### ocis ocs Start ocs server -#### ocis reva-storage-home-data +#### ocis reva-users -Start reva home storage dataprovider - -#### ocis hello - -Start hello server - -#### ocis reva-frontend - -Start reva frontend +Start reva users service #### ocis reva-storage-root Start reva root storage -#### ocis proxy - -Start proxy server - -#### ocis reva-users - -Start reva users service - ->>>>>>> Add Flagset extractor, generate configuration docs diff --git a/go.mod b/go.mod index 6b9cc91d47..512c7fc40d 100644 --- a/go.mod +++ b/go.mod @@ -15,11 +15,7 @@ require ( github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e github.com/micro/micro/v2 v2.0.1-0.20200210100719-f38a1d8d5348 github.com/openzipkin/zipkin-go v0.2.2 -<<<<<<< HEAD - github.com/owncloud/flaex v0.0.0-20200403112718-56e2e067dd26 -======= github.com/owncloud/flaex v0.2.0 ->>>>>>> Add Flagset extractor, generate configuration docs github.com/owncloud/ocis-glauth v0.4.0 github.com/owncloud/ocis-graph v0.0.0-20200318175820-9a5a6e029db7 github.com/owncloud/ocis-graph-explorer v0.0.0-20200210111049-017eeb40dc0c diff --git a/go.sum b/go.sum index f1b116f8a9..03a2dc55c1 100644 --- a/go.sum +++ b/go.sum @@ -711,15 +711,8 @@ github.com/ory/fosite v0.30.4/go.mod h1:Lq9qQ9Sl6mcea2Tt8J7PU+wUeFYPZ+vg7N3zPVKG 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= -<<<<<<< HEAD -github.com/owncloud/flaex v0.0.0-20200403112718-56e2e067dd26 h1:ofIXmzOjPRH3Rr/iGaPoTXDnlIc0tsaG1kJqXB+Hb94= -github.com/owncloud/flaex v0.0.0-20200403112718-56e2e067dd26/go.mod h1:E/0AQ3JGUVeEQxf2IxZoysUXpE0IEL/O9Rrd13dVEyU= -======= -github.com/owncloud/flaex v0.1.0 h1:3WTWhH3fWqtvkcEfTlXLykgUF9Saww7UU9fQeNsANOg= -github.com/owncloud/flaex v0.1.0/go.mod h1:jip86t4OVURJTf8CM/0e2qcji/Y4NG3l2lR8kex4JWw= github.com/owncloud/flaex v0.2.0 h1:3FLf8oyMgA6HLK7w4+VJ5N1oVA8G7MptLCVjfxxIaww= github.com/owncloud/flaex v0.2.0/go.mod h1:jip86t4OVURJTf8CM/0e2qcji/Y4NG3l2lR8kex4JWw= ->>>>>>> Add Flagset extractor, generate configuration docs github.com/owncloud/ocis-accounts v0.1.0 h1:6YjvRWNW26QHOqOFONg0HeogxhxaVGS1S2AoCUgzE3M= github.com/owncloud/ocis-accounts v0.1.0/go.mod h1:eoOPfuFCJ23n2csSMzapfjzVhG2kt8sQ2tu/9J+SwsA= github.com/owncloud/ocis-glauth v0.4.0 h1:L+S2UzkJJv5NWBVnTIZObdFz5zvKz8L0crIWbXtTF8o= @@ -903,7 +896,6 @@ github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRci github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= @@ -1289,7 +1281,6 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81 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 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= diff --git a/templates/CONFIGURATION.tmpl b/templates/CONFIGURATION.tmpl index 673775bccd..f25878eaff 100644 --- a/templates/CONFIGURATION.tmpl +++ b/templates/CONFIGURATION.tmpl @@ -1,17 +1,11 @@ --- title: "Configuration" -<<<<<<< HEAD -date: "{{ dateInZone "2006-01-02T15:04:05" (now) "UTC"}}" -======= date: "{{ date "2006-01-02T15:04:05-0700" now }}" ->>>>>>> Add Flagset extractor, generate configuration docs weight: 20 geekdocRepo: https://github.com/owncloud/ocis geekdocEditPath: edit/master/docs geekdocFilePath: configuration.md --- -<<<<<<< HEAD -======= {{- define "options"}} {{ $fnName := (last . ).Flags -}} {{ range $opt := first . }}{{ with list $fnName $opt -}} @@ -24,26 +18,16 @@ geekdocFilePath: configuration.md {{ end -}} {{ end -}} {{ end }} ->>>>>>> Add Flagset extractor, generate configuration docs {{`{{< toc >}}`}} ## Configuration -<<<<<<< HEAD -## Configuration of extensions - -======= ->>>>>>> Add Flagset extractor, generate configuration docs 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. -<<<<<<< HEAD -## Configuration using config files -======= ### Configuration using config files ->>>>>>> Add Flagset extractor, generate configuration docs Out of the box extensions will attempt to read configuration details from: @@ -55,65 +39,6 @@ $HOME/.ocis 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 ...`*. -<<<<<<< HEAD -### Configuration file - -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. - -### Server -{{ range $opts := . }}{{ with $opts }} -{{- if eq .FnName "ServerWithConfig"}} -{{ index .Env 0 }} -: {{ .Usage }}. {{- if .Default }} Default: `{{ .Default }}`.{{ end }} -{{ end }} -{{- end }} -{{- end }} -### Root Command -{{ range $opts := . }}{{ with $opts }} -{{- if eq .FnName "RootWithConfig"}} -{{ index .Env 0 }} -: {{ .Usage }}. {{- if .Default }} Default: `{{ .Default }}`.{{ end }} -{{ end }} -{{- end }} -{{- end }} -### Health -{{ range $opts := . }}{{ with $opts }} -{{- if eq .FnName "HealthWithConfig"}} -{{ index .Env 0 }} -: {{ .Usage }}. {{- if .Default }} Default: `{{ .Default }}`.{{ end }} -{{ end }} -{{- end }} -{{- end }} -## Commandline flags - -If you prefer to configure the service with commandline flags you can see the available variables below. - -### Server -{{ range $opts := . }}{{ with $opts }} -{{- if eq .FnName "ServerWithConfig"}} ---{{ .Name}} -: {{ .Usage }}. {{- if .Default }} Default: `{{ .Default }}`.{{ end }} -{{ end }} -{{- end }} -{{- end }} -### Root Command -{{ range $opts := . }}{{ with $opts }} -{{- if eq .FnName "RootWithConfig"}} ---{{ .Name}} -: {{ .Usage }}. {{- if .Default }} Default: `{{ .Default }}`.{{ end }} -{{ end }} -{{- end }} -{{- end }} -### Health -{{ range $opts := . }}{{ with $opts }} -{{- if eq .FnName "HealthWithConfig"}} ---{{ .Name}} -: {{ .Usage }}. {{- if .Default }} Default: `{{ .Default }}`.{{ end }} -======= 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 @@ -164,7 +89,6 @@ There are more subcommands to start the individual extensions. Please check the {{ .Usage }} ->>>>>>> Add Flagset extractor, generate configuration docs {{ end -}} {{- end -}} {{- end -}} \ No newline at end of file