Restructure based on hello reference

This commit is contained in:
Thomas Boerger
2019-12-06 13:18:26 +01:00
parent ac202d5458
commit dfa78aff7c
53 changed files with 774 additions and 3041 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
baseURL = "https://owncloud.github.io/ocis-graph/"
languageCode = "en-us"
title = "ownCloud Infinite Scale: graph"
title = "ownCloud Infinite Scale: Graph"
pygmentsUseClasses = true
disableKinds = ["taxonomy", "taxonomyTerm", "RSS", "sitemap"]
@@ -14,5 +14,5 @@ disableKinds = ["taxonomy", "taxonomyTerm", "RSS", "sitemap"]
[params]
author = "ownCloud GmbH"
description = "Example service for Reva/oCIS"
description = "Serve Graph API for oCIS"
keywords = "reva, ocis"
+1 -1
View File
@@ -5,4 +5,4 @@ anchor: "about"
weight: 10
---
This service provides a simple graph world example API to show the integration of custom plugins within [Phoenix](https://github.com/owncloud/phoenix).
This service provides a simple graph world API which can be used by clients or other extensions.
+3 -16
View File
@@ -5,23 +5,14 @@ anchor: "building"
weight: 30
---
As this project is built with Go and NodeJS, so you need to install that first. The installation of Go and NodeJS is out of the scope of this document, please follow the official documentation for [Go](golang), [NodeJS](nodejs) and [Yarn](yarn), to build this project you have to install Go >= v1.12. After the installation of the required tools you need to get the sources:
As this project is built with Go, so you need to install that first. The installation of Go is out of the scope of this document, please follow the official documentation for [Go](https://golang.org/doc/install), to build this project you have to install Go >= v1.12. After the installation of the required tools you need to get the sources:
{{< highlight txt >}}
git clone https://github.com/owncloud/ocis-graph.git
cd ocis-graph
{{< / highlight >}}
All required tool besides Go itself and make are bundled or getting automatically installed within the `GOPATH`. All commands to build this project are part of our `Makefile` and respectively our `package.json`.
### Frontend
{{< highlight txt >}}
yarn install
yarn build
{{< / highlight >}}
The above commands will install the required build dependencies and build the whole frontend bundle. This bundle will we embeded into the binary later on.
All required tool besides Go itself and make are bundled or getting automatically installed within the `GOPATH`. All commands to build this project are part of our `Makefile`.
### Backend
@@ -30,8 +21,4 @@ make generate
make build
{{< / highlight >}}
The above commands will embed the frontend bundle into the binary. Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis-graph -h` to see all available options.
[golang]: https://golang.org/doc/install
[nodejs]: https://nodejs.org/en/download/package-manager/
[yarn]: https://yarnpkg.com/lang/en/docs/install/
Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis-graph -h` to see all available options.
+51 -19
View File
@@ -7,7 +7,7 @@ weight: 20
### 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
@@ -27,6 +27,9 @@ If you prefer to configure the service with environment variables you can see th
##### Global
GRAPH_CONFIG_FILE
: Path to config file, empty default value
GRAPH_LOG_LEVEL
: Set logging level, defaults to `info`
@@ -38,8 +41,23 @@ GRAPH_LOG_PRETTY
##### Server
GRAPH_TRACING_ENABLED
: Enable sending traces, defaults to `false`
GRAPH_TRACING_TYPE
: Tracing backend type, defaults to `jaeger`
GRAPH_TRACING_ENDPOINT
: Endpoint for the agent, empty default value
GRAPH_TRACING_COLLECTOR
: Endpoint for the collector, empty default value
GRAPH_TRACING_SERVICE
: Service name for tracing, defaults to `graph`
GRAPH_DEBUG_ADDR
: Address to bind debug server, defaults to `0.0.0.0:8390`
: Address to bind debug server, defaults to `0.0.0.0:9124`
GRAPH_DEBUG_TOKEN
: Token to grant metrics access, empty default value
@@ -47,16 +65,16 @@ GRAPH_DEBUG_TOKEN
GRAPH_DEBUG_PPROF
: Enable pprof debugging, defaults to `false`
GRAPH_HTTP_ADDR
: Address to bind http server, defaults to `0.0.0.0:8380`
GRAPH_DEBUG_ZPAGES
: Enable zpages debugging, defaults to `false`
GRAPH_HTTP_ROOT
: Root path for http endpoint, defaults to `/`
GRAPH_HTTP_ADDR
: Address to bind http server, defaults to `0.0.0.0:9120`
##### Health
GRAPH_DEBUG_ADDR
: Address to debug endpoint, defaults to `0.0.0.0:8390`
: Address to debug endpoint, defaults to `0.0.0.0:9124`
#### Commandline flags
@@ -64,6 +82,9 @@ If you prefer to configure the service with commandline flags you can see the av
##### Global
--config-file
: Path to config file, empty default value
--log-level
: Set logging level, defaults to `info`
@@ -75,8 +96,23 @@ If you prefer to configure the service with commandline flags you can see the av
##### 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 `graph`
--debug-addr
: Address to bind debug server, defaults to `0.0.0.0:8390`
: Address to bind debug server, defaults to `0.0.0.0:9124`
--debug-token
: Token to grant metrics access, empty default value
@@ -84,20 +120,20 @@ If you prefer to configure the service with commandline flags you can see the av
--debug-pprof
: Enable pprof debugging, defaults to `false`
--http-addr
: Address to bind http server, defaults to `0.0.0.0:8380`
--debug-zpages
: Enable zpages debugging, defaults to `false`
--http-root
: Root path for http endpoint, defaults to `/`
--http-addr
: Address to bind http server, defaults to `0.0.0.0:9120`
##### Health
--debug-addr
: Address to debug endpoint, defaults to `0.0.0.0:8390`
: Address to debug endpoint, defaults to `0.0.0.0:9124`
#### 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/graph.yml`, `${HOME}/.ocis/graph.yml` or `$(pwd)/config/graph.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-graph/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/graph.yml`, `${HOME}/.ocis/graph.yml` or `$(pwd)/config/graph.yml`.
### Usage
@@ -121,7 +157,7 @@ ocis-graph health --help
### 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 `GRAPH_DEBUG_TOKEN` mentioned above. By default the metrics endpoint is bound to `http://0.0.0.0:8390/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 `GRAPH_DEBUG_TOKEN` mentioned above. By default the metrics endpoint is bound to `http://0.0.0.0:9124/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-graph/tree/master/config
[prom]: https://prometheus.io/
+1 -3
View File
@@ -5,6 +5,4 @@ anchor: "license"
weight: 40
---
This project is licensed under the [Apache 2.0](license) license. For the license of the used libraries you have to check the respective sources.
[license]: https://github.com/owncloud/ocis-graph/blob/master/LICENSE
This project is licensed under the [Apache 2.0](https://github.com/owncloud/ocis-graph/blob/master/LICENSE) license. For the license of the used libraries you have to check the respective sources.