Restructure project similar to hello and graph
This commit is contained in:
@@ -5,27 +5,30 @@ anchor: "getting-started"
|
||||
weight: 20
|
||||
---
|
||||
|
||||
## Installation
|
||||
### Installation
|
||||
|
||||
So far we are offering two different variants for the installation. You can choose between [Docker](docker) 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.
|
||||
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
|
||||
|
||||
### Binaries
|
||||
#### Binaries
|
||||
|
||||
TBD
|
||||
|
||||
## Configuration
|
||||
### Configuration
|
||||
|
||||
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.
|
||||
|
||||
### Envrionment variables
|
||||
#### Envrionment variables
|
||||
|
||||
If you prefer to configure the service with environment variables you can see the available variables below.
|
||||
|
||||
#### Global
|
||||
##### Global
|
||||
|
||||
WEBDAV_CONFIG_FILE
|
||||
: Path to config file, empty default value
|
||||
|
||||
WEBDAV_LOG_LEVEL
|
||||
: Set logging level, defaults to `info`
|
||||
@@ -36,10 +39,25 @@ WEBDAV_LOG_COLOR
|
||||
WEBDAV_LOG_PRETTY
|
||||
: Enable pretty logging, defaults to `true`
|
||||
|
||||
#### Server
|
||||
##### Server
|
||||
|
||||
WEBDAV_TRACING_ENABLED
|
||||
: Enable sending traces, defaults to `false`
|
||||
|
||||
WEBDAV_TRACING_TYPE
|
||||
: Tracing backend type, defaults to `jaeger`
|
||||
|
||||
WEBDAV_TRACING_ENDPOINT
|
||||
: Endpoint for the agent, empty default value
|
||||
|
||||
WEBDAV_TRACING_COLLECTOR
|
||||
: Endpoint for the collector, empty default value
|
||||
|
||||
WEBDAV_TRACING_SERVICE
|
||||
: Service name for tracing, defaults to `webdav`
|
||||
|
||||
WEBDAV_DEBUG_ADDR
|
||||
: Address to bind debug server, defaults to `0.0.0.0:8190`
|
||||
: Address to bind debug server, defaults to `0.0.0.0:9119`
|
||||
|
||||
WEBDAV_DEBUG_TOKEN
|
||||
: Token to grant metrics access, empty default value
|
||||
@@ -47,22 +65,25 @@ WEBDAV_DEBUG_TOKEN
|
||||
WEBDAV_DEBUG_PPROF
|
||||
: Enable pprof debugging, defaults to `false`
|
||||
|
||||
WEBDAV_DEBUG_ZPAGES
|
||||
: Enable zpages debugging, defaults to `false`
|
||||
|
||||
WEBDAV_HTTP_ADDR
|
||||
: Address to bind http server, defaults to `0.0.0.0:8180`
|
||||
: Address to bind http server, defaults to `0.0.0.0:9115`
|
||||
|
||||
WEBDAV_HTTP_ROOT
|
||||
: Root path for http endpoint, defaults to `/`
|
||||
|
||||
#### Health
|
||||
##### Health
|
||||
|
||||
WEBDAV_DEBUG_ADDR
|
||||
: Address to debug endpoint, defaults to `0.0.0.0:8190`
|
||||
: Address to debug endpoint, defaults to `0.0.0.0:9119`
|
||||
|
||||
### Commandline flags
|
||||
#### Commandline flags
|
||||
|
||||
If you prefer to configure the service with commandline flags you can see the available variables below.
|
||||
|
||||
#### Global
|
||||
##### Global
|
||||
|
||||
--config-file
|
||||
: Path to config file, empty default value
|
||||
|
||||
--log-level
|
||||
: Set logging level, defaults to `info`
|
||||
@@ -73,10 +94,25 @@ If you prefer to configure the service with commandline flags you can see the av
|
||||
--log-pretty
|
||||
: Enable pretty logging, defaults to `true`
|
||||
|
||||
#### Server
|
||||
##### Server
|
||||
|
||||
--tracing-enabled
|
||||
: Enable sending traces, defaults to `false`
|
||||
|
||||
--tracing-type
|
||||
: Tracing backend type, defaults to `jaeger`
|
||||
|
||||
--tracing-endpoint
|
||||
: Endpoint for the agent, empty default value
|
||||
|
||||
--tracing-collector
|
||||
: Endpoint for the collector, empty default value
|
||||
|
||||
--tracing-service
|
||||
: Service name for tracing, defaults to `webdav`
|
||||
|
||||
--debug-addr
|
||||
: Address to bind debug server, defaults to `0.0.0.0:8190`
|
||||
: Address to bind debug server, defaults to `0.0.0.0:9119`
|
||||
|
||||
--debug-token
|
||||
: Token to grant metrics access, empty default value
|
||||
@@ -84,26 +120,26 @@ If you prefer to configure the service with commandline flags you can see the av
|
||||
--debug-pprof
|
||||
: Enable pprof debugging, defaults to `false`
|
||||
|
||||
--debug-zpages
|
||||
: Enable zpages debugging, defaults to `false`
|
||||
|
||||
--http-addr
|
||||
: Address to bind http server, defaults to `0.0.0.0:8180`
|
||||
: Address to bind http server, defaults to `0.0.0.0:9115`
|
||||
|
||||
--http-root
|
||||
: Root path for http endpoint, defaults to `/`
|
||||
|
||||
#### Health
|
||||
##### Health
|
||||
|
||||
--debug-addr
|
||||
: Address to debug endpoint, defaults to `0.0.0.0:8190`
|
||||
: Address to debug endpoint, defaults to `0.0.0.0:9119`
|
||||
|
||||
### Configuration file
|
||||
#### 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](repo), 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/webdav.yml`, `${HOME}/.ocis/webdav.yml` or `$(pwd)/config/webdav.yml`.
|
||||
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-webdav/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/webdav.yml`, `${HOME}/.ocis/webdav.yml` or `$(pwd)/config/webdav.yml`.
|
||||
|
||||
## Usage
|
||||
### 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-webdav --help`.
|
||||
|
||||
### Server
|
||||
#### Server
|
||||
|
||||
The server command is used to start the http and debug server on two addresses within a single process. The http server is serving the general webservice while the debug server is used for health check, readiness check and to server the metrics mentioned below. For further help please execute:
|
||||
|
||||
@@ -111,7 +147,7 @@ The server command is used to start the http and debug server on two addresses w
|
||||
ocis-webdav server --help
|
||||
{{< / highlight >}}
|
||||
|
||||
### Health
|
||||
#### 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.
|
||||
|
||||
@@ -119,9 +155,9 @@ The health command is used to execute a health check, if the exit code equals ze
|
||||
ocis-webdav health --help
|
||||
{{< / highlight >}}
|
||||
|
||||
## Metrics
|
||||
### Metrics
|
||||
|
||||
This service provides some [Prometheus](prom) metrics through the debug endpoint, you can optionally secure the metrics endpoint by some random token, which got to be configured through one of the flag `--debug-token` or the environment variable `WEBDAV_DEBUG_TOKEN` mentioned above. By default the metrics endpoint is bound to `http://0.0.0.0:8190/metrics`.
|
||||
This service provides some [Prometheus](https://prometheus.io/) metrics through the debug endpoint, you can optionally secure the metrics endpoint by some random token, which got to be configured through one of the flag `--debug-token` or the environment variable `WEBDAV_DEBUG_TOKEN` mentioned above. By default the metrics endpoint is bound to `http://0.0.0.0:9119/metrics`.
|
||||
|
||||
go_gc_duration_seconds
|
||||
: A summary of the GC invocation durations
|
||||
@@ -218,7 +254,3 @@ promhttp_metric_handler_requests_in_flight
|
||||
|
||||
promhttp_metric_handler_requests_total
|
||||
: Total number of scrapes by HTTP status code
|
||||
|
||||
[docker]: https://www.docker.com/
|
||||
[repo]: https://github.com/owncloud/ocis-webdav/tree/master/config
|
||||
[prom]: https://prometheus.io/
|
||||
|
||||
Reference in New Issue
Block a user