update flaex template

This commit is contained in:
Michael Barz
2020-04-14 21:14:28 +02:00
parent 454d29e7d8
commit fe16ff6e73
4 changed files with 66 additions and 293 deletions

View File

@@ -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

4
go.mod
View File

@@ -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

9
go.sum
View File

@@ -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=

View File

@@ -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 -}}