Merge branch 'master' into ocis-1132
This commit is contained in:
+20
-18
@@ -3,19 +3,21 @@ config = {
|
||||
'accounts': 'frontend',
|
||||
'glauth':'',
|
||||
'konnectd':'',
|
||||
'ocis': '',
|
||||
'ocis-phoenix':'',
|
||||
'ocis-pkg':'',
|
||||
'storage':'',
|
||||
'ocs':'',
|
||||
'proxy':'',
|
||||
'settings':'frontend',
|
||||
'storage':'',
|
||||
'store':'',
|
||||
'thumbnails':'',
|
||||
'webdav':'',
|
||||
'onlyoffice':'frontend'
|
||||
},
|
||||
'apiTests': {
|
||||
'coreBranch': 'master',
|
||||
'coreCommit': 'a5df08ca512c3c8e65a01d018c9eec81b9cfccaa',
|
||||
'coreCommit': 'b1e3888c39de7f450ce782f598d97867f4f50120',
|
||||
'numberOfParts': 10
|
||||
},
|
||||
'uiTests': {
|
||||
@@ -1255,13 +1257,6 @@ def docs(ctx):
|
||||
'arch': 'amd64',
|
||||
},
|
||||
'steps': [
|
||||
{
|
||||
'name': 'prepare',
|
||||
'image': 'owncloudci/alpine:latest',
|
||||
'commands': [
|
||||
'make -C docs docs-copy'
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'generate-config-docs',
|
||||
'image': 'webhippie/golang:1.14',
|
||||
@@ -1273,6 +1268,13 @@ def docs(ctx):
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'prepare',
|
||||
'image': 'owncloudci/alpine:latest',
|
||||
'commands': [
|
||||
'make -C docs docs-copy'
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'test',
|
||||
'image': 'owncloudci/hugo:0.71.0',
|
||||
@@ -1281,14 +1283,6 @@ def docs(ctx):
|
||||
'hugo',
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'list and remove temporary files',
|
||||
'image': 'owncloudci/alpine:latest',
|
||||
'commands': [
|
||||
'tree hugo/public',
|
||||
'rm -rf docs/hugo',
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'publish',
|
||||
'image': 'plugins/gh-pages:1',
|
||||
@@ -1300,7 +1294,7 @@ def docs(ctx):
|
||||
'password': {
|
||||
'from_secret': 'github_token',
|
||||
},
|
||||
'pages_directory': 'docs/',
|
||||
'pages_directory': 'docs/hugo/content',
|
||||
'target_branch': 'docs',
|
||||
},
|
||||
'when': {
|
||||
@@ -1311,6 +1305,14 @@ def docs(ctx):
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'name': 'list and remove temporary files',
|
||||
'image': 'owncloudci/alpine:latest',
|
||||
'commands': [
|
||||
'tree hugo/public',
|
||||
'rm -rf docs/hugo',
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'downstream',
|
||||
'image': 'plugins/downstream',
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/onlyoffice/ @LukasHirt
|
||||
@@ -76,6 +76,7 @@
|
||||
* Enhancement - Add the webdav service: [#244](https://github.com/owncloud/product/issues/244)
|
||||
* Enhancement - Better adopt Go-Micro: [#840](https://github.com/owncloud/ocis/pull/840)
|
||||
* Enhancement - Add permission check when assigning and removing roles: [#879](https://github.com/owncloud/ocis/issues/879)
|
||||
* Enhancement - Create OnlyOffice extension: [#857](https://github.com/owncloud/ocis/pull/857)
|
||||
* Enhancement - Show basic-auth warning only once: [#886](https://github.com/owncloud/ocis/pull/886)
|
||||
* Enhancement - Add glauth fallback backend: [#649](https://github.com/owncloud/ocis/pull/649)
|
||||
* Enhancement - Tidy dependencies: [#845](https://github.com/owncloud/ocis/pull/845)
|
||||
@@ -1645,6 +1646,15 @@
|
||||
|
||||
https://github.com/owncloud/ocis/issues/879
|
||||
|
||||
* Enhancement - Create OnlyOffice extension: [#857](https://github.com/owncloud/ocis/pull/857)
|
||||
|
||||
Tags: OnlyOffice
|
||||
|
||||
We've created an OnlyOffice extension which enables users to create and edit docx documents
|
||||
and open spreadsheets and presentations.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/857
|
||||
|
||||
* Enhancement - Show basic-auth warning only once: [#886](https://github.com/owncloud/ocis/pull/886)
|
||||
|
||||
Show basic-auth warning only on startup instead on every request.
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@ WORKDIR /ocis/ocis
|
||||
RUN make clean generate build
|
||||
|
||||
|
||||
FROM amd64/alpine:3
|
||||
FROM alpine:3
|
||||
|
||||
RUN apk update && \
|
||||
apk upgrade && \
|
||||
@@ -29,4 +29,4 @@ LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
|
||||
ENTRYPOINT ["/usr/bin/ocis"]
|
||||
CMD ["server"]
|
||||
|
||||
COPY --from=build /ocis/ocis/bin/ocis /usr/bin/ocis
|
||||
COPY --from=build /ocis/ocis/bin/ocis /usr/bin/ocis
|
||||
|
||||
@@ -5,97 +5,22 @@
|
||||
[](https://www.codacy.com/gh/owncloud/ocis/dashboard?utm_source=github.com&utm_medium=referral&utm_content=owncloud/ocis&utm_campaign=Badge_Grade)
|
||||
[](https://www.codacy.com/gh/owncloud/ocis/dashboard?utm_source=github.com&utm_medium=referral&utm_content=owncloud/ocis&utm_campaign=Badge_Coverage)
|
||||
[](http://godoc.org/github.com/owncloud/ocis)
|
||||
[](http://goreportcard.com/report/github.com/owncloud/ocis)
|
||||
[](http://microbadger.com/images/owncloud/ocis "Get your own image badge on microbadger.com")
|
||||
[](https://goreportcard.com/report/github.com/owncloud/ocis)
|
||||
[](https://hub.docker.com/r/owncloud/ocis "oCIS docker image")
|
||||
|
||||
**This project is under heavy development, it's not in a working state yet!**
|
||||
**ownCloud Infinite Scale is currently in a technical preview state. It will be subject to a lot of changes and is not yet ready for general production deployments.**
|
||||
|
||||
## Install
|
||||
## Run ownCloud Infinite Scale
|
||||
|
||||
You can download prebuilt binaries from the GitHub releases or from our [download mirrors](http://download.owncloud.com/ocis/ocis/). For instructions how to install this on your platform you should take a look at our [documentation](https://owncloud.github.io/ocis/)
|
||||
Please see [Getting Started](https://owncloud.github.io/ocis/getting-started/)
|
||||
|
||||
## Development
|
||||
|
||||
Make sure you have a working Go environment, for further reference or a guide take a look at the [install instructions](http://golang.org/doc/install.html). This project requires Go >= v1.13.
|
||||
|
||||
```console
|
||||
git clone https://github.com/owncloud/ocis.git
|
||||
cd ocis/ocis
|
||||
|
||||
make generate build
|
||||
|
||||
./bin/ocis -h
|
||||
```
|
||||
|
||||
### Folder Structure
|
||||
|
||||
This is a monorepo for multiple microservices. The individual services are located in subfolders like `accounts`. The code in the `ocis` subfolder aggregates all the go modules and implements commands to start the individual services or the full-stack server with a default config. It also builds a single binary and docker images.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### Redis server
|
||||
|
||||
You will need to start a redis server as a cache. The ownCloud storage driver currently will try to connect to the default port.
|
||||
A quick way to start one for testing is using this docker instance: `docker run -e REDIS_DATABASES=1 -p 6379:6379 -d webhippie/redis:latest`
|
||||
|
||||
### Root storage
|
||||
|
||||
To prepare the root storage you should fill it with two folders. They are necessary for resolving the home and ownCloud storages. This is subject to change.
|
||||
|
||||
```console
|
||||
mkdir -p /var/tmp/reva/root/{home,oc}
|
||||
```
|
||||
|
||||
## Quickstart
|
||||
|
||||
- Make sure that the binary was built with the above steps.
|
||||
- Now start all services with the following command
|
||||
|
||||
```console
|
||||
./bin/ocis server
|
||||
```
|
||||
|
||||
- Open <https://localhost:9200>
|
||||
- Accept the self-signed certificate (it is regenerated every time the server starts)
|
||||
- Login using one of the demo accounts:
|
||||
|
||||
```console
|
||||
einstein:relativity
|
||||
marie:radioactivity
|
||||
richard:superfluidity
|
||||
```
|
||||
|
||||
## Create a local Docker image for testing
|
||||
|
||||
Navigate into the root folder of the repository and execute
|
||||
|
||||
```console
|
||||
docker build -t owncloud/ocis:dev .
|
||||
```
|
||||
|
||||
To run it, execute
|
||||
|
||||
```console
|
||||
docker run --rm -ti owncloud/ocis:dev
|
||||
```
|
||||
|
||||
The image can be tagged however you like, just make sure you run the right one then
|
||||
|
||||
## Running single extensions
|
||||
|
||||
The list of available extensions can be found in the "Extensions" section when running `./bin/ocis`.
|
||||
|
||||
For example to run the "phoenix" extension:
|
||||
|
||||
```console
|
||||
./bin/ocis --log-level debug phoenix
|
||||
```
|
||||
|
||||
⚠ do not use the **run** subcommand for running extensions
|
||||
Please see [Development - Getting Started](https://owncloud.github.io/ocis/development/getting-started/)
|
||||
|
||||
## Security
|
||||
|
||||
If you find a security issue please contact [security@owncloud.com](mailto:security@owncloud.com) first.
|
||||
If you find a security issue please contact [security@owncloud.com](mailto:security@owncloud.com) first
|
||||
|
||||
## Contributing
|
||||
|
||||
|
||||
@@ -23,10 +23,6 @@ geekdocFilePath: CONFIGURATION.tmpl
|
||||
|
||||
## 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_accounts/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:
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
Enhancement: Create OnlyOffice extension
|
||||
|
||||
Tags: OnlyOffice
|
||||
|
||||
We've created an OnlyOffice extension which enables users to create and edit docx documents and open spreadsheets and presentations.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/857
|
||||
@@ -0,0 +1 @@
|
||||
hugo/
|
||||
+25
-2
@@ -1,11 +1,34 @@
|
||||
config-docs-generate:
|
||||
make -C ../accounts config-docs-generate
|
||||
make -C ../glauth config-docs-generate
|
||||
make -C ../konnectd config-docs-generate
|
||||
make -C ../ocis config-docs-generate
|
||||
make -C ../ocis-phoenix config-docs-generate
|
||||
make -C ../ocis-pkg config-docs-generate
|
||||
make -C ../ocs config-docs-generate
|
||||
make -C ../proxy config-docs-generate
|
||||
make -C ../settings config-docs-generate
|
||||
make -C ../storage config-docs-generate
|
||||
make -C ../store config-docs-generate
|
||||
make -C ../thumbnails config-docs-generate
|
||||
make -C ../webdav config-docs-generate
|
||||
|
||||
.PHONY: docs-copy
|
||||
docs-copy:
|
||||
mkdir -p hugo/content/; \
|
||||
mkdir -p hugo/content/
|
||||
cd hugo; \
|
||||
git init; \
|
||||
git config advice.detachedHead false; \
|
||||
git remote rm origin; \
|
||||
git remote add origin https://github.com/owncloud/owncloud.github.io; \
|
||||
git fetch --depth=1; \
|
||||
git checkout origin/source -f; \
|
||||
rsync -ax --delete --exclude hugo/ --exclude Makefile ../. content/; \
|
||||
rsync -ax --delete --exclude hugo/ --exclude Makefile --exclude .gitignore --exclude README.md ../. content/; \
|
||||
|
||||
.PHONY: docs-serve
|
||||
docs-serve: config-docs-generate docs-copy
|
||||
docker run --rm --network host -v $(shell pwd)/hugo:/src owncloudci/hugo:0 server
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf hugo
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# documentation
|
||||
|
||||
To contribute to documentation please see also: [Documentation](http://owncloud.github.io/ocis/development/build-docs/)
|
||||
@@ -2,6 +2,8 @@
|
||||
title: ownCloud
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Developer Documentation
|
||||
|
||||
Welcome to our developer documentation. Here you can find developer documentation on:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Accounts
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 10
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/accounts
|
||||
geekdocFilePath: _index.md
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: "Building"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 30
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/accounts
|
||||
geekdocFilePath: building.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
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.13. After the installation of the required tools you need to get the sources:
|
||||
|
||||
{{< highlight txt >}}
|
||||
git clone https://github.com/owncloud/ocis-accounts.git
|
||||
cd ocis-accounts
|
||||
{{< / 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`.
|
||||
|
||||
## Backend
|
||||
|
||||
{{< highlight txt >}}
|
||||
make generate
|
||||
make build
|
||||
{{< / highlight >}}
|
||||
|
||||
Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis-accounts -h` to see all available options and subcommands.
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
title: "Getting Started"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/accounts
|
||||
geekdocFilePath: getting-started.md
|
||||
---
|
||||
|
||||
{{< 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
|
||||
|
||||
TBD
|
||||
|
||||
### Binaries
|
||||
|
||||
TBD
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "GLAuth"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 10
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/glauth
|
||||
geekdocFilePath: _index.md
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: "Building"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 30
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/glauth
|
||||
geekdocFilePath: building.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
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.13. After the installation of the required tools you need to get the sources:
|
||||
|
||||
{{< highlight txt >}}
|
||||
git clone https://github.com/owncloud/ocis-glauth.git
|
||||
cd ocis-glauth
|
||||
{{< / 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`.
|
||||
|
||||
## Backend
|
||||
|
||||
{{< highlight txt >}}
|
||||
make generate
|
||||
make build
|
||||
{{< / highlight >}}
|
||||
|
||||
Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis-glauth -h` to see all available options.
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
title: "Configuration Hints"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/glauth
|
||||
geekdocFilePath: configuration-hints.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Configuration hints
|
||||
|
||||
The default setup does not use a fallback backend. It can be enabled by setting the `GLAUTH_FALLBACK_DATASTORE` environment variable.
|
||||
|
||||
When using `owncloud` make sure to use the full URL to the [ownCloud 10 graph api app](https://github.com/owncloud/graphapi) endpoint, eg.: `GLAUTH_FALLBACK_SERVERS="https://demo.owncloud.com/apps/graphapi/v1.0"`
|
||||
@@ -1,14 +0,0 @@
|
||||
---
|
||||
title: "Getting Started"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/glauth
|
||||
geekdocFilePath: getting-started.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Configuration Tips
|
||||
|
||||
The default setup does not use a fallback backend. It can be enabled by setting the `GLAUTH_FALLBACK_DATASTORE` environment variable. When using `owncloud` make sure to use the full URL to the [ownCloud 10 graph api app](https://github.com/owncloud/graphapi) endpoint, eg.: `GLAUTH_FALLBACK_SERVERS="https://demo.owncloud.com/apps/graphapi/v1.0"`
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
title: "License"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 40
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/glauth
|
||||
geekdocFilePath: license.md
|
||||
---
|
||||
|
||||
This project is licensed under the [Apache 2.0](https://github.com/owncloud/ocis/glauth/blob/master/LICENSE) license. For the license of the used libraries you have to check the respective sources.
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
title: Konnectd
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/konnectd
|
||||
geekdocFilePath: _index.md
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: "Building"
|
||||
date: 2020-02-21T00:00:00+00:00
|
||||
weight: 30
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/konnectd
|
||||
geekdocFilePath: building.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
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.13. After the installation of the required tools you need to get the sources:
|
||||
|
||||
{{< highlight txt >}}
|
||||
git clone https://github.com/owncloud/ocis-konnectd.git
|
||||
cd ocis-konnectd
|
||||
{{< / 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`.
|
||||
|
||||
## Backend
|
||||
|
||||
{{< highlight txt >}}
|
||||
make generate
|
||||
make build
|
||||
{{< / highlight >}}
|
||||
|
||||
Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis-konnectd -h` to see all available options and subcommands.
|
||||
@@ -1,161 +0,0 @@
|
||||
---
|
||||
title: "Getting Started"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 10
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/konnectd
|
||||
geekdocFilePath: getting-started.md
|
||||
---
|
||||
|
||||
{{< 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 images for ocis-reva are hosted on https://hub.docker.com/r/owncloud/ocis-konnectd.
|
||||
|
||||
The `latest` tag always reflects the current master branch.
|
||||
|
||||
```console
|
||||
docker pull owncloud/ocis-konnectd
|
||||
```
|
||||
|
||||
### Binaries
|
||||
|
||||
The pre-built binaries for different platforms are downloadable at https://download.owncloud.com/ocis/ocis-konnectd/ . 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-konnectd/testing/
|
||||
|
||||
```console
|
||||
curl https://download.owncloud.com/ocis/ocis-konnectd/1.0.0-beta1/ocis-konnectd-1.0.0-beta1-darwin-amd64 --output ocis-konnectd
|
||||
chmod +x ocis-konnectd
|
||||
./ocis-konnectd server
|
||||
```
|
||||
|
||||
## 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-konnectd --help`.
|
||||
|
||||
### 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:
|
||||
|
||||
{{< highlight txt >}}
|
||||
konnectd server --help
|
||||
{{< / highlight >}}
|
||||
|
||||
### 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 >}}
|
||||
konnectd health --help
|
||||
{{< / highlight >}}
|
||||
|
||||
### Version
|
||||
The version command lists the versions of all running instances. For further help please execute:
|
||||
|
||||
{{< highlight txt >}}
|
||||
konnectd version --help
|
||||
{{< /highlight >}}
|
||||
|
||||
## 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 `KONNECTD_DEBUG_TOKEN` mentioned above. By default the metrics endpoint is bound to `http://0.0.0.0:9134/metrics`.
|
||||
|
||||
go_gc_duration_seconds
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_gc_duration_seconds_sum
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_gc_duration_seconds_count
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_goroutines
|
||||
: Number of goroutines that currently exist
|
||||
|
||||
go_info
|
||||
: Information about the Go environment
|
||||
|
||||
go_memstats_alloc_bytes
|
||||
: Number of bytes allocated and still in use
|
||||
|
||||
go_memstats_alloc_bytes_total
|
||||
: Total number of bytes allocated, even if freed
|
||||
|
||||
go_memstats_buck_hash_sys_bytes
|
||||
: Number of bytes used by the profiling bucket hash table
|
||||
|
||||
go_memstats_frees_total
|
||||
: Total number of frees
|
||||
|
||||
go_memstats_gc_cpu_fraction
|
||||
: The fraction of this program's available CPU time used by the GC since the program started
|
||||
|
||||
go_memstats_gc_sys_bytes
|
||||
: Number of bytes used for garbage collection system metadata
|
||||
|
||||
go_memstats_heap_alloc_bytes
|
||||
: Number of heap bytes allocated and still in use
|
||||
|
||||
go_memstats_heap_idle_bytes
|
||||
: Number of heap bytes waiting to be used
|
||||
|
||||
go_memstats_heap_inuse_bytes
|
||||
: Number of heap bytes that are in use
|
||||
|
||||
go_memstats_heap_objects
|
||||
: Number of allocated objects
|
||||
|
||||
go_memstats_heap_released_bytes
|
||||
: Number of heap bytes released to OS
|
||||
|
||||
go_memstats_heap_sys_bytes
|
||||
: Number of heap bytes obtained from system
|
||||
|
||||
go_memstats_last_gc_time_seconds
|
||||
: Number of seconds since 1970 of last garbage collection
|
||||
|
||||
go_memstats_lookups_total
|
||||
: Total number of pointer lookups
|
||||
|
||||
go_memstats_mallocs_total
|
||||
: Total number of mallocs
|
||||
|
||||
go_memstats_mcache_inuse_bytes
|
||||
: Number of bytes in use by mcache structures
|
||||
|
||||
go_memstats_mcache_sys_bytes
|
||||
: Number of bytes used for mcache structures obtained from system
|
||||
|
||||
go_memstats_mspan_inuse_bytes
|
||||
: Number of bytes in use by mspan structures
|
||||
|
||||
go_memstats_mspan_sys_bytes
|
||||
: Number of bytes used for mspan structures obtained from system
|
||||
|
||||
go_memstats_next_gc_bytes
|
||||
: Number of heap bytes when next garbage collection will take place
|
||||
|
||||
go_memstats_other_sys_bytes
|
||||
: Number of bytes used for other system allocations
|
||||
|
||||
go_memstats_stack_inuse_bytes
|
||||
: Number of bytes in use by the stack allocator
|
||||
|
||||
go_memstats_stack_sys_bytes
|
||||
: Number of bytes obtained from system for stack allocator
|
||||
|
||||
go_memstats_sys_bytes
|
||||
: Number of bytes obtained from system
|
||||
|
||||
go_threads
|
||||
: Number of OS threads created
|
||||
|
||||
promhttp_metric_handler_requests_in_flight
|
||||
: Current number of scrapes being served
|
||||
|
||||
promhttp_metric_handler_requests_total
|
||||
: Total number of scrapes by HTTP status code
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "oCIS Web"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 10
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/ocis-phoenix
|
||||
geekdocFilePath: _index.md
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
title: "Building"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 30
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/ocis-phoenix
|
||||
geekdocFilePath: building.md
|
||||
---
|
||||
|
||||
## Backend
|
||||
|
||||
{{< highlight txt >}}
|
||||
cd ocis-phoenix
|
||||
make generate
|
||||
make build
|
||||
{{< / highlight >}}
|
||||
|
||||
The above commands will download a [Phoenix](https://github.com/owncloud/phoenix) release and embed it into the binary. Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis-phoenix -h` to see all available options.
|
||||
@@ -1,339 +0,0 @@
|
||||
---
|
||||
title: "Getting Started"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/ocis-phoenix
|
||||
geekdocFilePath: getting-started.md
|
||||
---
|
||||
|
||||
{{< 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
|
||||
|
||||
TBD
|
||||
|
||||
### Binaries
|
||||
|
||||
TBD
|
||||
|
||||
## 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.
|
||||
|
||||
### Environment variables
|
||||
|
||||
If you prefer to configure the service with environment variables you can see the available variables below.
|
||||
|
||||
#### Global
|
||||
|
||||
PHOENIX_CONFIG_FILE
|
||||
: Path to config file, empty default value
|
||||
|
||||
PHOENIX_LOG_LEVEL
|
||||
: Set logging level, defaults to `info`
|
||||
|
||||
PHOENIX_LOG_COLOR
|
||||
: Enable colored logging, defaults to `true`
|
||||
|
||||
PHOENIX_LOG_PRETTY
|
||||
: Enable pretty logging, defaults to `true`
|
||||
|
||||
#### Server
|
||||
|
||||
PHOENIX_TRACING_ENABLED
|
||||
: Enable sending traces, defaults to `false`
|
||||
|
||||
PHOENIX_TRACING_TYPE
|
||||
: Tracing backend type, defaults to `jaeger`
|
||||
|
||||
PHOENIX_TRACING_ENDPOINT
|
||||
: Endpoint for the agent, empty default value
|
||||
|
||||
PHOENIX_TRACING_COLLECTOR
|
||||
: Endpoint for the collector, empty default value
|
||||
|
||||
PHOENIX_TRACING_SERVICE
|
||||
: Service name for tracing, defaults to `phoenix`
|
||||
|
||||
PHOENIX_DEBUG_ADDR
|
||||
: Address to bind debug server, defaults to `0.0.0.0:9104`
|
||||
|
||||
PHOENIX_DEBUG_TOKEN
|
||||
: Token to grant metrics access, empty default value
|
||||
|
||||
PHOENIX_DEBUG_PPROF
|
||||
: Enable pprof debugging, defaults to `false`
|
||||
|
||||
PHOENIX_DEBUG_ZPAGES
|
||||
: Enable zpages debugging, defaults to `false`
|
||||
|
||||
PHOENIX_HTTP_ADDR
|
||||
: Address to bind http server, defaults to `0.0.0.0:9100`
|
||||
|
||||
PHOENIX_HTTP_ROOT
|
||||
: Root path of http server, defaults to `/`
|
||||
|
||||
PHOENIX_ASSET_PATH
|
||||
: Path to custom assets, empty default value
|
||||
|
||||
PHOENIX_WEB_CONFIG
|
||||
: Path to phoenix config, empty default value
|
||||
|
||||
PHOENIX_WEB_CONFIG_SERVER
|
||||
: Server URL, defaults to `http://localhost:9135`
|
||||
|
||||
PHOENIX_WEB_CONFIG_THEME
|
||||
: Theme, defaults to `owncloud`
|
||||
|
||||
PHOENIX_WEB_CONFIG_VERSION
|
||||
: Version, defaults to `0.1.0`
|
||||
|
||||
PHOENIX_APPS
|
||||
: Use multiple times to provide multiple apps
|
||||
|
||||
PHOENIX_EXTERNAL_APPS
|
||||
: Not supported yet, specify a config.json file via `PHOENIX_WEB_CONFIG`
|
||||
|
||||
PHOENIX_OIDC_METADATA_URL
|
||||
: OpenID Connect metadata URL, defaults to `http://localhost:9130/.well-known/openid-configuration`
|
||||
|
||||
PHOENIX_OIDC_AUTHORITY
|
||||
: OpenID Connect authority, defaults to `http://localhost:9130`
|
||||
|
||||
PHOENIX_OIDC_CLIENT_ID
|
||||
: OpenID Connect client ID, defaults to `phoenix`
|
||||
|
||||
PHOENIX_OIDC_RESPONSE_TYPE
|
||||
: OpenID Connect response type, defaults to `code`
|
||||
|
||||
PHOENIX_OIDC_SCOPE
|
||||
: OpenID Connect scope, defaults to `openid profile email`
|
||||
|
||||
In case you want to render any additional properties in the config.json you can provide a custom config.json using eg. `PHOENIX_WEB_CONFIG=/path/to/config.json ocis-phoenix server`
|
||||
|
||||
#### Health
|
||||
|
||||
PHOENIX_DEBUG_ADDR
|
||||
: Address to debug endpoint, defaults to `0.0.0.0:9104`
|
||||
|
||||
### Commandline flags
|
||||
|
||||
If you prefer to configure the service with commandline flags you can see the available variables below.
|
||||
|
||||
#### Global
|
||||
|
||||
--config-file
|
||||
: Path to config file, empty default value
|
||||
|
||||
--log-level
|
||||
: Set logging level, defaults to `info`
|
||||
|
||||
--log-color
|
||||
: Enable colored logging, defaults to `true`
|
||||
|
||||
--log-pretty
|
||||
: Enable pretty logging, defaults to `true`
|
||||
|
||||
#### 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 `phoenix`
|
||||
|
||||
--debug-addr
|
||||
: Address to bind debug server, defaults to `0.0.0.0:9104`
|
||||
|
||||
--debug-token
|
||||
: Token to grant metrics access, empty default value
|
||||
|
||||
--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:9100`
|
||||
|
||||
--http-root
|
||||
: Root path of http server, defaults to `/`
|
||||
|
||||
--asset-path
|
||||
: Path to custom assets, empty default value
|
||||
|
||||
--web-config
|
||||
: Path to phoenix config, empty default value
|
||||
|
||||
--web-config-server
|
||||
: Server URL, defaults to `http://localhost:9135`
|
||||
|
||||
--web-config-theme
|
||||
: Theme, defaults to `owncloud`
|
||||
|
||||
--web-config-version
|
||||
: Version, defaults to `0.1.0`
|
||||
|
||||
--web-config-app
|
||||
: Provide multiple apps, defaults to `""`. Usage: `phoenix --web-config-app files --web-config-app media-viewer`
|
||||
|
||||
--oidc-metadata-url
|
||||
: OpenID Connect metadata URL, defaults to `http://localhost:9130/.well-known/openid-configuration`
|
||||
|
||||
--oidc-authority
|
||||
: OpenID Connect authority, defaults to `http://localhost:9130`
|
||||
|
||||
--oidc-client-id
|
||||
: OpenID Connect client ID, defaults to `phoenix`
|
||||
|
||||
--oidc-response-type
|
||||
: OpenID Connect response type, defaults to `code`
|
||||
|
||||
--oidc-scope
|
||||
: OpenID Connect scope, defaults to `openid profile email`
|
||||
|
||||
In case you want to render any additional properties in the config.json you can provide a custom config.json using eg. `ocis-phoenix server --web-config=/path/to/config.json`
|
||||
|
||||
#### Health
|
||||
|
||||
--debug-addr
|
||||
: Address to debug endpoint, defaults to `0.0.0.0:9104`
|
||||
|
||||
### 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/ocis-phoenix/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/phoenix.yml`, `${HOME}/.ocis/phoenix.yml` or `$(pwd)/config/phoenix.yml`.
|
||||
|
||||
## 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-phoenix --help`.
|
||||
|
||||
### 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:
|
||||
|
||||
{{< highlight txt >}}
|
||||
ocis-phoenix server --help
|
||||
{{< / highlight >}}
|
||||
|
||||
### 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-phoenix health --help
|
||||
{{< / highlight >}}
|
||||
|
||||
## 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 `PHOENIX_DEBUG_TOKEN` mentioned above. By default the metrics endpoint is bound to `http://0.0.0.0:9104/metrics`.
|
||||
|
||||
go_gc_duration_seconds
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_gc_duration_seconds_sum
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_gc_duration_seconds_count
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_goroutines
|
||||
: Number of goroutines that currently exist
|
||||
|
||||
go_info
|
||||
: Information about the Go environment
|
||||
|
||||
go_memstats_alloc_bytes
|
||||
: Number of bytes allocated and still in use
|
||||
|
||||
go_memstats_alloc_bytes_total
|
||||
: Total number of bytes allocated, even if freed
|
||||
|
||||
go_memstats_buck_hash_sys_bytes
|
||||
: Number of bytes used by the profiling bucket hash table
|
||||
|
||||
go_memstats_frees_total
|
||||
: Total number of frees
|
||||
|
||||
go_memstats_gc_cpu_fraction
|
||||
: The fraction of this program's available CPU time used by the GC since the program started
|
||||
|
||||
go_memstats_gc_sys_bytes
|
||||
: Number of bytes used for garbage collection system metadata
|
||||
|
||||
go_memstats_heap_alloc_bytes
|
||||
: Number of heap bytes allocated and still in use
|
||||
|
||||
go_memstats_heap_idle_bytes
|
||||
: Number of heap bytes waiting to be used
|
||||
|
||||
go_memstats_heap_inuse_bytes
|
||||
: Number of heap bytes that are in use
|
||||
|
||||
go_memstats_heap_objects
|
||||
: Number of allocated objects
|
||||
|
||||
go_memstats_heap_released_bytes
|
||||
: Number of heap bytes released to OS
|
||||
|
||||
go_memstats_heap_sys_bytes
|
||||
: Number of heap bytes obtained from system
|
||||
|
||||
go_memstats_last_gc_time_seconds
|
||||
: Number of seconds since 1970 of last garbage collection
|
||||
|
||||
go_memstats_lookups_total
|
||||
: Total number of pointer lookups
|
||||
|
||||
go_memstats_mallocs_total
|
||||
: Total number of mallocs
|
||||
|
||||
go_memstats_mcache_inuse_bytes
|
||||
: Number of bytes in use by mcache structures
|
||||
|
||||
go_memstats_mcache_sys_bytes
|
||||
: Number of bytes used for mcache structures obtained from system
|
||||
|
||||
go_memstats_mspan_inuse_bytes
|
||||
: Number of bytes in use by mspan structures
|
||||
|
||||
go_memstats_mspan_sys_bytes
|
||||
: Number of bytes used for mspan structures obtained from system
|
||||
|
||||
go_memstats_next_gc_bytes
|
||||
: Number of heap bytes when next garbage collection will take place
|
||||
|
||||
go_memstats_other_sys_bytes
|
||||
: Number of bytes used for other system allocations
|
||||
|
||||
go_memstats_stack_inuse_bytes
|
||||
: Number of bytes in use by the stack allocator
|
||||
|
||||
go_memstats_stack_sys_bytes
|
||||
: Number of bytes obtained from system for stack allocator
|
||||
|
||||
go_memstats_sys_bytes
|
||||
: Number of bytes obtained from system
|
||||
|
||||
go_threads
|
||||
: Number of OS threads created
|
||||
|
||||
promhttp_metric_handler_requests_in_flight
|
||||
: Current number of scrapes being served
|
||||
|
||||
promhttp_metric_handler_requests_total
|
||||
: Total number of scrapes by HTTP status code
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
title: "License"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 50
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/ocis-phoenix
|
||||
geekdocFilePath: license.md
|
||||
---
|
||||
|
||||
This project is licensed under the [Apache 2.0](https://github.com/owncloud/ocis/ocis-phoenix/blob/master/LICENSE) license. For the license of the used libraries you have to check the respective sources.
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "Ocs"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 10
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/ocs
|
||||
geekdocFilePath: _index.md
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: "Building"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 30
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/ocs
|
||||
geekdocFilePath: building.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
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-ocs.git
|
||||
cd ocis-ocs
|
||||
{{< / 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`.
|
||||
|
||||
## Backend
|
||||
|
||||
{{< highlight txt >}}
|
||||
make generate
|
||||
make build
|
||||
{{< / highlight >}}
|
||||
|
||||
Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis-ocs -h` to see all available options.
|
||||
@@ -1,161 +0,0 @@
|
||||
---
|
||||
title: "Getting Started"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 10
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/ocs
|
||||
geekdocFilePath: getting-started.md
|
||||
---
|
||||
|
||||
{{< 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 images for ocis-ocs are hosted on https://hub.docker.com/r/owncloud/ocis-ocs.
|
||||
|
||||
The `latest` tag always reflects the current master branch.
|
||||
|
||||
```console
|
||||
docker pull owncloud/ocis-ocs
|
||||
```
|
||||
|
||||
### Binaries
|
||||
|
||||
The pre-built binaries for different platforms are downloadable at https://download.owncloud.com/ocis/ocs/ . 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/ocs/testing/
|
||||
|
||||
```console
|
||||
curl https://download.owncloud.com/ocis/ocis-ocs/1.0.0-beta1/ocis-ocs-1.0.0-beta1-darwin-amd64 --output ocis-ocs
|
||||
chmod +x ocis-ocs
|
||||
./ocis-ocs server
|
||||
```
|
||||
|
||||
## 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-ocs --help`.
|
||||
|
||||
### 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:
|
||||
|
||||
{{< highlight txt >}}
|
||||
ocs server --help
|
||||
{{< / highlight >}}
|
||||
|
||||
### 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 >}}
|
||||
ocs health --help
|
||||
{{< / highlight >}}
|
||||
|
||||
### Version
|
||||
The version command lists the versions of all running instances. For further help please execute:
|
||||
|
||||
{{< highlight txt >}}
|
||||
ocs version --help
|
||||
{{< /highlight >}}
|
||||
|
||||
## 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 `OCS_DEBUG_TOKEN` mentioned above. By default the metrics endpoint is bound to `http://0.0.0.0:9114/metrics`.
|
||||
|
||||
go_gc_duration_seconds
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_gc_duration_seconds_sum
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_gc_duration_seconds_count
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_goroutines
|
||||
: Number of goroutines that currently exist
|
||||
|
||||
go_info
|
||||
: Information about the Go environment
|
||||
|
||||
go_memstats_alloc_bytes
|
||||
: Number of bytes allocated and still in use
|
||||
|
||||
go_memstats_alloc_bytes_total
|
||||
: Total number of bytes allocated, even if freed
|
||||
|
||||
go_memstats_buck_hash_sys_bytes
|
||||
: Number of bytes used by the profiling bucket hash table
|
||||
|
||||
go_memstats_frees_total
|
||||
: Total number of frees
|
||||
|
||||
go_memstats_gc_cpu_fraction
|
||||
: The fraction of this program's available CPU time used by the GC since the program started
|
||||
|
||||
go_memstats_gc_sys_bytes
|
||||
: Number of bytes used for garbage collection system metadata
|
||||
|
||||
go_memstats_heap_alloc_bytes
|
||||
: Number of heap bytes allocated and still in use
|
||||
|
||||
go_memstats_heap_idle_bytes
|
||||
: Number of heap bytes waiting to be used
|
||||
|
||||
go_memstats_heap_inuse_bytes
|
||||
: Number of heap bytes that are in use
|
||||
|
||||
go_memstats_heap_objects
|
||||
: Number of allocated objects
|
||||
|
||||
go_memstats_heap_released_bytes
|
||||
: Number of heap bytes released to OS
|
||||
|
||||
go_memstats_heap_sys_bytes
|
||||
: Number of heap bytes obtained from system
|
||||
|
||||
go_memstats_last_gc_time_seconds
|
||||
: Number of seconds since 1970 of last garbage collection
|
||||
|
||||
go_memstats_lookups_total
|
||||
: Total number of pointer lookups
|
||||
|
||||
go_memstats_mallocs_total
|
||||
: Total number of mallocs
|
||||
|
||||
go_memstats_mcache_inuse_bytes
|
||||
: Number of bytes in use by mcache structures
|
||||
|
||||
go_memstats_mcache_sys_bytes
|
||||
: Number of bytes used for mcache structures obtained from system
|
||||
|
||||
go_memstats_mspan_inuse_bytes
|
||||
: Number of bytes in use by mspan structures
|
||||
|
||||
go_memstats_mspan_sys_bytes
|
||||
: Number of bytes used for mspan structures obtained from system
|
||||
|
||||
go_memstats_next_gc_bytes
|
||||
: Number of heap bytes when next garbage collection will take place
|
||||
|
||||
go_memstats_other_sys_bytes
|
||||
: Number of bytes used for other system allocations
|
||||
|
||||
go_memstats_stack_inuse_bytes
|
||||
: Number of bytes in use by the stack allocator
|
||||
|
||||
go_memstats_stack_sys_bytes
|
||||
: Number of bytes obtained from system for stack allocator
|
||||
|
||||
go_memstats_sys_bytes
|
||||
: Number of bytes obtained from system
|
||||
|
||||
go_threads
|
||||
: Number of OS threads created
|
||||
|
||||
promhttp_metric_handler_requests_in_flight
|
||||
: Current number of scrapes being served
|
||||
|
||||
promhttp_metric_handler_requests_total
|
||||
: Total number of scrapes by HTTP status code
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
title: "License"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 40
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/ocs
|
||||
geekdocFilePath: license.md
|
||||
---
|
||||
|
||||
This project is licensed under the [Apache 2.0](https://github.com/owncloud/ocis/ocs/blob/master/LICENSE) license. For the license of the used libraries you have to check the respective sources.
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: "OnlyOffice"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 10
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/onlyoffice
|
||||
geekdocFilePath: _index.md
|
||||
---
|
||||
|
||||
This service enables users open documents, spreadsheets and presentations in the OnlyOffice app installed in ownCloud 10.
|
||||
@@ -3,7 +3,7 @@ title: "Building"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 30
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/store
|
||||
geekdocEditPath: edit/master/docs/extensions/onlyoffice
|
||||
geekdocFilePath: building.md
|
||||
---
|
||||
|
||||
@@ -12,8 +12,8 @@ geekdocFilePath: building.md
|
||||
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-store.git
|
||||
cd ocis-store
|
||||
git clone https://github.com/owncloud/ocis/onlyoffice.git
|
||||
cd ocis-onlyoffice
|
||||
{{< / 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`.
|
||||
@@ -25,4 +25,4 @@ make generate
|
||||
make build
|
||||
{{< / highlight >}}
|
||||
|
||||
Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis-store -h` to see all available options.
|
||||
Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/onlyoffice -h` to see all available options.
|
||||
+82
-88
@@ -3,7 +3,7 @@ title: "Getting Started"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/thumbnails
|
||||
geekdocEditPath: edit/master/docs/extensions/onlyoffice
|
||||
geekdocFilePath: getting-started.md
|
||||
---
|
||||
|
||||
@@ -25,75 +25,82 @@ TBD
|
||||
|
||||
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.
|
||||
|
||||
### Environment variables
|
||||
### ownCloud Web configuration
|
||||
|
||||
When loading the extension in the ownCloud Web, it is necessary to specify to which ownCloud 10 server the extension is supposed to connect to. This can be done via `config` object when registering the extension in `config.json`. For more details, you can take a look at the following example:
|
||||
|
||||
```json
|
||||
"external_apps": [
|
||||
{
|
||||
"id": "onlyoffice",
|
||||
"path": "https://localhost:9200/onlyoffice.js",
|
||||
"config": {
|
||||
"server": "https://oc10.example.org"
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Envrionment variables
|
||||
|
||||
If you prefer to configure the service with environment variables you can see the available variables below.
|
||||
|
||||
#### Global
|
||||
|
||||
THUMBNAILS_CONFIG_FILE
|
||||
ONLYOFFICE_CONFIG_FILE
|
||||
: Path to config file, empty default value
|
||||
|
||||
THUMBNAILS_LOG_LEVEL
|
||||
ONLYOFFICE_LOG_LEVEL
|
||||
: Set logging level, defaults to `info`
|
||||
|
||||
THUMBNAILS_LOG_COLOR
|
||||
ONLYOFFICE_LOG_COLOR
|
||||
: Enable colored logging, defaults to `true`
|
||||
|
||||
THUMBNAILS_LOG_PRETTY
|
||||
ONLYOFFICE_LOG_PRETTY
|
||||
: Enable pretty logging, defaults to `true`
|
||||
|
||||
#### Server
|
||||
|
||||
THUMBNAILS_TRACING_ENABLED
|
||||
ONLYOFFICE_TRACING_ENABLED
|
||||
: Enable sending traces, defaults to `false`
|
||||
|
||||
THUMBNAILS_TRACING_TYPE
|
||||
ONLYOFFICE_TRACING_TYPE
|
||||
: Tracing backend type, defaults to `jaeger`
|
||||
|
||||
THUMBNAILS_TRACING_ENDPOINT
|
||||
ONLYOFFICE_TRACING_ENDPOINT
|
||||
: Endpoint for the agent, empty default value
|
||||
|
||||
THUMBNAILS_TRACING_COLLECTOR
|
||||
ONLYOFFICE_TRACING_COLLECTOR
|
||||
: Endpoint for the collector, empty default value
|
||||
|
||||
THUMBNAILS_TRACING_SERVICE
|
||||
: Service name for tracing, defaults to `ocis-thumbnails`
|
||||
ONLYOFFICE_TRACING_SERVICE
|
||||
: Service name for tracing, defaults to `onlyoffice`
|
||||
|
||||
THUMBNAILS_DEBUG_ADDR
|
||||
: Address to bind debug server, defaults to `0.0.0.0:9114`
|
||||
ONLYOFFICE_DEBUG_ADDR
|
||||
: Address to bind debug server, defaults to `0.0.0.0:9224`
|
||||
|
||||
THUMBNAILS_DEBUG_TOKEN
|
||||
ONLYOFFICE_DEBUG_TOKEN
|
||||
: Token to grant metrics access, empty default value
|
||||
|
||||
THUMBNAILS_DEBUG_PPROF
|
||||
ONLYOFFICE_DEBUG_PPROF
|
||||
: Enable pprof debugging, defaults to `false`
|
||||
|
||||
THUMBNAILS_DEBUG_ZPAGES
|
||||
ONLYOFFICE_DEBUG_ZPAGES
|
||||
: Enable zpages debugging, defaults to `false`
|
||||
|
||||
THUMBNAILS_GRPC_NAME
|
||||
: Name of the service, defaults to `thumbnails`
|
||||
ONLYOFFICE_HTTP_ADDR
|
||||
: Address to bind http server, defaults to `0.0.0.0:9220`
|
||||
|
||||
THUMBNAILS_GRPC_ADDR
|
||||
: Address to bind grpc server, defaults to `0.0.0.0:9185`
|
||||
ONLYOFFICE_HTTP_NAMESPACE
|
||||
: The http namespace
|
||||
|
||||
THUMBNAILS_GRPC_NAMESPACE
|
||||
: Set the base namespace for the grpc namespace", defaults to `com.owncloud.api`
|
||||
|
||||
THUMBNAILS_FILESYSTEMSTORAGE_ROOT
|
||||
: Root path of the filesystem storage directory, defaults to `<os tempdir>/ocis-thumbnails/`
|
||||
|
||||
THUMBNAILS_WEBDAVSOURCE_BASEURL
|
||||
: Base url for a webdav api, defaults to `https://localhost:9200/remote.php/webdav/`
|
||||
|
||||
THUMBNAILS_RESOLUTIONS
|
||||
: List of resolutions supported by the service, defaults to `["16x16", "32x32", "64x64", "128x128"]
|
||||
ONLYOFFICE_HTTP_ROOT
|
||||
: Root path of http server, defaults to `/`
|
||||
|
||||
#### Health
|
||||
|
||||
THUMBNAILS_DEBUG_ADDR
|
||||
: Address to debug endpoint, defaults to `0.0.0.0:9189`
|
||||
ONLYOFFICE_DEBUG_ADDR
|
||||
: Address to debug endpoint, defaults to `0.0.0.0:9224`
|
||||
|
||||
### Commandline flags
|
||||
|
||||
@@ -101,84 +108,78 @@ 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
|
||||
--config-file | $ONLYOFFICE_CONFIG_FILE
|
||||
: Path to config file.
|
||||
|
||||
--log-level
|
||||
: Set logging level, defaults to `info`
|
||||
--log-level | $ONLYOFFICE_LOG_LEVEL
|
||||
: Set logging level. Default: `info`.
|
||||
|
||||
--log-color
|
||||
: Enable colored logging, defaults to `true`
|
||||
--log-pretty | $ONLYOFFICE_LOG_PRETTY
|
||||
: Enable pretty logging. Default: `true`.
|
||||
|
||||
--log-pretty
|
||||
: Enable pretty logging, defaults to `true`
|
||||
--log-color | $ONLYOFFICE_LOG_COLOR
|
||||
: Enable colored logging. Default: `true`.
|
||||
|
||||
#### Server
|
||||
|
||||
--tracing-enabled
|
||||
: Enable sending traces, defaults to `false`
|
||||
--tracing-enabled | $ONLYOFFICE_TRACING_ENABLED
|
||||
: Enable sending traces.
|
||||
|
||||
--tracing-type
|
||||
: Tracing backend type, defaults to `jaeger`
|
||||
--tracing-type | $ONLYOFFICE_TRACING_TYPE
|
||||
: Tracing backend type. Default: `jaeger`.
|
||||
|
||||
--tracing-endpoint
|
||||
: Endpoint for the agent, empty default value
|
||||
--tracing-endpoint | $ONLYOFFICE_TRACING_ENDPOINT
|
||||
: Endpoint for the agent.
|
||||
|
||||
--tracing-collector
|
||||
: Endpoint for the collector, empty default value
|
||||
--tracing-collector | $ONLYOFFICE_TRACING_COLLECTOR
|
||||
: Endpoint for the collector.
|
||||
|
||||
--tracing-service
|
||||
: Service name for tracing, defaults to `thumbnails`
|
||||
--tracing-service | $ONLYOFFICE_TRACING_SERVICE
|
||||
: Service name for tracing. Default: `onlyoffice`.
|
||||
|
||||
--debug-addr
|
||||
: Address to bind debug server, defaults to `0.0.0.0:9189`
|
||||
--debug-addr | $ONLYOFFICE_DEBUG_ADDR
|
||||
: Address to bind debug server. Default: `0.0.0.0:9224`.
|
||||
|
||||
--debug-token
|
||||
: Token to grant metrics access, empty default value
|
||||
--debug-token | $ONLYOFFICE_DEBUG_TOKEN
|
||||
: Token to grant metrics access.
|
||||
|
||||
--debug-pprof
|
||||
: Enable pprof debugging, defaults to `false`
|
||||
--debug-pprof | $ONLYOFFICE_DEBUG_PPROF
|
||||
: Enable pprof debugging.
|
||||
|
||||
--debug-zpages
|
||||
: Enable zpages debugging, defaults to `false`
|
||||
--debug-zpages | $ONLYOFFICE_DEBUG_ZPAGES
|
||||
: Enable zpages debugging.
|
||||
|
||||
--grpc-name
|
||||
: Name of the service, defaults to `thumbnails`
|
||||
--http-addr | $ONLYOFFICE_HTTP_ADDR
|
||||
: Address to bind http server. Default: `0.0.0.0:9220`.
|
||||
|
||||
--grpc-addr
|
||||
: Address to bind grpc server, defaults to `0.0.0.0:9185`
|
||||
--http-namespace | $ONLYOFFICE_HTTP_NAMESPACE
|
||||
: Set the base namespace for the http namespace. Default: `com.owncloud.web`.
|
||||
|
||||
--grpc-namespace
|
||||
: Set the base namespace for the grpc namespace", defaults to `com.owncloud.api`
|
||||
--http-root | $ONLYOFFICE_HTTP_ROOT
|
||||
: Root path of http server. Default: `/`.
|
||||
|
||||
--filesystemstorage-root
|
||||
: Root path of the filesystem storage directory, defaults to `<os tempdir>/ocis-thumbnails/`
|
||||
|
||||
--webdavsource-baseurl
|
||||
: Base url for a webdav api, defaults to `https://localhost:9200/remote.php/webdav/`
|
||||
|
||||
--thumbnail-resolution
|
||||
: List of resolutions supported by the service, defaults to `["16x16", "32x32", "64x64", "128x128"]
|
||||
--asset-path | $ONLYOFFICE_ASSET_PATH
|
||||
: Path to custom assets.
|
||||
|
||||
#### Health
|
||||
|
||||
--debug-addr
|
||||
: Address to debug endpoint, defaults to `0.0.0.0:9189`
|
||||
--debug-addr | $ONLYOFFICE_DEBUG_ADDR
|
||||
: Address to debug endpoint. Default: `0.0.0.0:9224`.
|
||||
|
||||
### 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/thumbnails/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/thumbnails.yml`, `${HOME}/.ocis/thumbnails.yml` or `$(pwd)/config/thumbnails.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/onlyoffice/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/onlyoffice.yml`, `${HOME}/.ocis/onlyoffice.yml` or `$(pwd)/config/onlyoffice.yml`.
|
||||
|
||||
## 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-thumbnails --help`.
|
||||
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-onlyoffice --help`.
|
||||
|
||||
### 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:
|
||||
|
||||
{{< highlight txt >}}
|
||||
{{ Name }} server --help
|
||||
ocis-onlyoffice server --help
|
||||
{{< / highlight >}}
|
||||
|
||||
### Health
|
||||
@@ -186,19 +187,12 @@ The server command is used to start the http and debug server on two addresses w
|
||||
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 >}}
|
||||
{{ Name }} health --help
|
||||
ocis-onlyoffice health --help
|
||||
{{< / highlight >}}
|
||||
|
||||
### Version
|
||||
The version command lists the versions of all running instances. For further help please execute:
|
||||
|
||||
{{< highlight txt >}}
|
||||
{{ Name }} version --help
|
||||
{{< /highlight >}}
|
||||
|
||||
## 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 `THUMBNAILS_DEBUG_TOKEN` mentioned above. By default the metrics endpoint is bound to `http://0.0.0.0:9114/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 `ONLYOFFICE_DEBUG_TOKEN` mentioned above. By default the metrics endpoint is bound to `http://0.0.0.0:9224/metrics`.
|
||||
|
||||
go_gc_duration_seconds
|
||||
: A summary of the GC invocation durations
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
title: "License"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 60
|
||||
weight: 40
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/thumbnails
|
||||
geekdocEditPath: edit/master/docs/extensions/onlyoffice
|
||||
geekdocFilePath: license.md
|
||||
---
|
||||
|
||||
This project is licensed under the [Apache 2.0](https://github.com/owncloud/ocis/thumbnails/blob/master/LICENSE) license. For the license of the used libraries you have to check the respective sources.
|
||||
This project is licensed under the [Apache 2.0](https://github.com/owncloud/ocis/onlyoffice/blob/master/LICENSE) license. For the license of the used libraries you have to check the respective sources.
|
||||
@@ -1,8 +1,9 @@
|
||||
---
|
||||
title: Proxy
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/proxy
|
||||
geekdocFilePath: _index.md
|
||||
---
|
||||
|
||||
This service provides a basic proxy in front of the public oCIS services.
|
||||
This service provides a proxy service that routes requests to the correct extensions.
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
title: "About"
|
||||
date: 2020-02-07T00:00:00+00:00
|
||||
weight: 10
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/proxy
|
||||
geekdocFilePath: about.md
|
||||
---
|
||||
|
||||
This service provides an proxy service that routes requests to the correct services.
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: "Building"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 30
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/proxy
|
||||
geekdocFilePath: building.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
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.13. After the installation of the required tools you need to get the sources:
|
||||
|
||||
{{< highlight txt >}}
|
||||
git clone https://github.com/owncloud/ocis-proxy.git
|
||||
cd ocis-proxy
|
||||
{{< / 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`.
|
||||
|
||||
## Backend
|
||||
|
||||
{{< highlight txt >}}
|
||||
make generate
|
||||
make build
|
||||
{{< / highlight >}}
|
||||
|
||||
Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis-proxy -h` to see all available options and subcommands.
|
||||
@@ -1,53 +0,0 @@
|
||||
---
|
||||
title: "Getting Started"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 15
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/proxy
|
||||
geekdocFilePath: getting-started.md
|
||||
---
|
||||
|
||||
{{< 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 images for ocis-reva are hosted on https://hub.docker.com/r/owncloud/ocis-proxy.
|
||||
|
||||
The `latest` tag always reflects the current master branch.
|
||||
|
||||
```console
|
||||
docker pull owncloud/ocis-proxy
|
||||
```
|
||||
|
||||
### Binaries
|
||||
|
||||
The pre-built binaries for different platforms are downloadable at https://download.owncloud.com/ocis/ocis-proxy/ . 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-proxy/testing/
|
||||
|
||||
```console
|
||||
curl https://download.owncloud.com/ocis/ocis-proxy/1.0.0-beta1/ocis-proxy-1.0.0-beta1-darwin-amd64 --output ocis-proxy
|
||||
chmod +x ocis-proxy
|
||||
./ocis-proxy server
|
||||
```
|
||||
|
||||
## 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-proxy --help`.
|
||||
|
||||
### Server
|
||||
|
||||
The server command is used to start the http server. For further help please execute:
|
||||
|
||||
{{< highlight txt >}}
|
||||
proxy server --help
|
||||
{{< / highlight >}}
|
||||
|
||||
### Version
|
||||
The version command lists the versions of all running instances. For further help please execute:
|
||||
|
||||
{{< highlight txt >}}
|
||||
proxy version --help
|
||||
{{< /highlight >}}
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "Settings"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 10
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/settings
|
||||
geekdocFilePath: _index.md
|
||||
@@ -14,7 +14,7 @@ for other extensions to register new settings within oCIS. It is responsible for
|
||||
settings values as well.
|
||||
|
||||
For ease of use, this extension provides an ocis-web extension which allows users to change their settings values.
|
||||
Please refer to the [ocis-web extension docs](https://owncloud.github.io/ocis/extensions/#external-phoenix-apps)
|
||||
Please refer to the [ocis-web extension docs]({{< relref "../../ocis/development/extensions/#external-phoenix-apps" >}})
|
||||
for running ocis-web extensions.
|
||||
|
||||
{{< mermaid class="text-center">}}
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: "Building"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 30
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/settings
|
||||
geekdocFilePath: building.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
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-settings.git
|
||||
cd ocis-settings
|
||||
{{< / 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`.
|
||||
|
||||
## Backend
|
||||
|
||||
{{< highlight txt >}}
|
||||
make generate
|
||||
make build
|
||||
{{< / highlight >}}
|
||||
|
||||
Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis-settings -h` to see all available options.
|
||||
@@ -1,279 +0,0 @@
|
||||
---
|
||||
title: "Getting Started"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 25
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/settings
|
||||
geekdocFilePath: getting-started.md
|
||||
---
|
||||
|
||||
{{< 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
|
||||
|
||||
TBD
|
||||
|
||||
### Binaries
|
||||
|
||||
TBD
|
||||
|
||||
## 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.
|
||||
|
||||
### Environment variables
|
||||
|
||||
If you prefer to configure the service with environment variables you can see the available variables below.
|
||||
|
||||
#### Global
|
||||
|
||||
SETTINGS_CONFIG_FILE
|
||||
: Path to config file, empty default value
|
||||
|
||||
SETTINGS_LOG_LEVEL
|
||||
: Set logging level, defaults to `info`
|
||||
|
||||
SETTINGS_LOG_COLOR
|
||||
: Enable colored logging, defaults to `true`
|
||||
|
||||
SETTINGS_LOG_PRETTY
|
||||
: Enable pretty logging, defaults to `true`
|
||||
|
||||
#### Server
|
||||
|
||||
SETTINGS_TRACING_ENABLED
|
||||
: Enable sending traces, defaults to `false`
|
||||
|
||||
SETTINGS_TRACING_TYPE
|
||||
: Tracing backend type, defaults to `jaeger`
|
||||
|
||||
SETTINGS_TRACING_ENDPOINT
|
||||
: Endpoint for the agent, empty default value
|
||||
|
||||
SETTINGS_TRACING_COLLECTOR
|
||||
: Endpoint for the collector, empty default value
|
||||
|
||||
SETTINGS_TRACING_SERVICE
|
||||
: Service name for tracing, defaults to `settings`
|
||||
|
||||
SETTINGS_DEBUG_ADDR
|
||||
: Address to bind debug server, defaults to `0.0.0.0:9194`
|
||||
|
||||
SETTINGS_DEBUG_TOKEN
|
||||
: Token to grant metrics access, empty default value
|
||||
|
||||
SETTINGS_DEBUG_PPROF
|
||||
: Enable pprof debugging, defaults to `false`
|
||||
|
||||
SETTINGS_DEBUG_ZPAGES
|
||||
: Enable zpages debugging, defaults to `false`
|
||||
|
||||
SETTINGS_HTTP_ADDR
|
||||
: Address to bind http server, defaults to `0.0.0.0:9190`
|
||||
|
||||
SETTINGS_HTTP_NAMESPACE
|
||||
: The http namespace
|
||||
|
||||
SETTINGS_HTTP_ROOT
|
||||
: Root path of http server, defaults to `/`
|
||||
|
||||
#### Health
|
||||
|
||||
SETTINGS_DEBUG_ADDR
|
||||
: Address to debug endpoint, defaults to `0.0.0.0:9194`
|
||||
|
||||
### Commandline flags
|
||||
|
||||
If you prefer to configure the service with commandline flags you can see the available variables below.
|
||||
|
||||
#### Global
|
||||
|
||||
--config-file
|
||||
: Path to config file, empty default value
|
||||
|
||||
--log-level
|
||||
: Set logging level, defaults to `info`
|
||||
|
||||
--log-color
|
||||
: Enable colored logging, defaults to `true`
|
||||
|
||||
--log-pretty
|
||||
: Enable pretty logging, defaults to `true`
|
||||
|
||||
#### 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 `settings`
|
||||
|
||||
--debug-addr
|
||||
: Address to bind debug server, defaults to `0.0.0.0:9194`
|
||||
|
||||
--debug-token
|
||||
: Token to grant metrics access, empty default value
|
||||
|
||||
--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:9190`
|
||||
|
||||
--http-namespace
|
||||
: Namespace for internal services communication, defaults to `com.owncloud.web`
|
||||
|
||||
--http-root
|
||||
: Root path of http server, defaults to `/`
|
||||
|
||||
#### Health
|
||||
|
||||
--debug-addr
|
||||
: Address to debug endpoint, defaults to `0.0.0.0:9194`
|
||||
|
||||
### 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/settings/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/settings.yml`, `${HOME}/.ocis/settings.yml` or `$(pwd)/config/settings.yml`.
|
||||
|
||||
## 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-settings --help`.
|
||||
|
||||
### 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:
|
||||
|
||||
{{< highlight txt >}}
|
||||
settings server --help
|
||||
{{< / highlight >}}
|
||||
|
||||
### 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 >}}
|
||||
settings health --help
|
||||
{{< / highlight >}}
|
||||
|
||||
### Version
|
||||
The version command lists the versions of all running instances. For further help please execute:
|
||||
|
||||
{{< highlight txt >}}
|
||||
settings version --help
|
||||
{{< /highlight >}}
|
||||
|
||||
## 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 `SETTINGS_DEBUG_TOKEN` mentioned above. By default the metrics endpoint is bound to `http://0.0.0.0:9194/metrics`.
|
||||
|
||||
go_gc_duration_seconds
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_gc_duration_seconds_sum
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_gc_duration_seconds_count
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_goroutines
|
||||
: Number of goroutines that currently exist
|
||||
|
||||
go_info
|
||||
: Information about the Go environment
|
||||
|
||||
go_memstats_alloc_bytes
|
||||
: Number of bytes allocated and still in use
|
||||
|
||||
go_memstats_alloc_bytes_total
|
||||
: Total number of bytes allocated, even if freed
|
||||
|
||||
go_memstats_buck_hash_sys_bytes
|
||||
: Number of bytes used by the profiling bucket hash table
|
||||
|
||||
go_memstats_frees_total
|
||||
: Total number of frees
|
||||
|
||||
go_memstats_gc_cpu_fraction
|
||||
: The fraction of this program's available CPU time used by the GC since the program started
|
||||
|
||||
go_memstats_gc_sys_bytes
|
||||
: Number of bytes used for garbage collection system metadata
|
||||
|
||||
go_memstats_heap_alloc_bytes
|
||||
: Number of heap bytes allocated and still in use
|
||||
|
||||
go_memstats_heap_idle_bytes
|
||||
: Number of heap bytes waiting to be used
|
||||
|
||||
go_memstats_heap_inuse_bytes
|
||||
: Number of heap bytes that are in use
|
||||
|
||||
go_memstats_heap_objects
|
||||
: Number of allocated objects
|
||||
|
||||
go_memstats_heap_released_bytes
|
||||
: Number of heap bytes released to OS
|
||||
|
||||
go_memstats_heap_sys_bytes
|
||||
: Number of heap bytes obtained from system
|
||||
|
||||
go_memstats_last_gc_time_seconds
|
||||
: Number of seconds since 1970 of last garbage collection
|
||||
|
||||
go_memstats_lookups_total
|
||||
: Total number of pointer lookups
|
||||
|
||||
go_memstats_mallocs_total
|
||||
: Total number of mallocs
|
||||
|
||||
go_memstats_mcache_inuse_bytes
|
||||
: Number of bytes in use by mcache structures
|
||||
|
||||
go_memstats_mcache_sys_bytes
|
||||
: Number of bytes used for mcache structures obtained from system
|
||||
|
||||
go_memstats_mspan_inuse_bytes
|
||||
: Number of bytes in use by mspan structures
|
||||
|
||||
go_memstats_mspan_sys_bytes
|
||||
: Number of bytes used for mspan structures obtained from system
|
||||
|
||||
go_memstats_next_gc_bytes
|
||||
: Number of heap bytes when next garbage collection will take place
|
||||
|
||||
go_memstats_other_sys_bytes
|
||||
: Number of bytes used for other system allocations
|
||||
|
||||
go_memstats_stack_inuse_bytes
|
||||
: Number of bytes in use by the stack allocator
|
||||
|
||||
go_memstats_stack_sys_bytes
|
||||
: Number of bytes obtained from system for stack allocator
|
||||
|
||||
go_memstats_sys_bytes
|
||||
: Number of bytes obtained from system
|
||||
|
||||
go_threads
|
||||
: Number of OS threads created
|
||||
|
||||
promhttp_metric_handler_requests_in_flight
|
||||
: Current number of scrapes being served
|
||||
|
||||
promhttp_metric_handler_requests_total
|
||||
: Total number of scrapes by HTTP status code
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
title: "License"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 90
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/settings
|
||||
geekdocFilePath: license.md
|
||||
---
|
||||
|
||||
This project is licensed under the [Apache 2.0](https://github.com/owncloud/ocis/settings/blob/master/LICENSE) license. For the license of the used libraries you have to check the respective sources.
|
||||
@@ -14,7 +14,7 @@ provided by this service.
|
||||
## Identifying settings values
|
||||
|
||||
A *settings value* is uniquely identified by four attributes. Three of them are coming from the definition of
|
||||
the setting within it's settings bundle (see [Settings Bundles](https://owncloud.github.io/extensions/ocis_settings/bundles/)
|
||||
the setting within it's settings bundle (see [Settings Bundles]({{< relref "bundles.md" >}})
|
||||
for an example). The fourth identifies the user.
|
||||
- extension: Key of the extension that registered the settings bundle,
|
||||
- bundleKey: Key of the settings bundle,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "Reva"
|
||||
title: "Storage"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 10
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/storage
|
||||
geekdocFilePath: _index.md
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
title: "Building"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 30
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/storage
|
||||
geekdocFilePath: building.md
|
||||
---
|
||||
|
||||
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.13. After the installation of the required tools you need to get the sources:
|
||||
|
||||
{{< highlight txt >}}
|
||||
git clone https://github.com/owncloud/ocis.git
|
||||
cd ocis/storage
|
||||
{{< / 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`.
|
||||
|
||||
|
||||
### Backend
|
||||
|
||||
{{< highlight txt >}}
|
||||
make build
|
||||
{{< / highlight >}}
|
||||
|
||||
The above command should produce the binary within the `bin/` folder now, give it a try with `./bin/ocis-reva -h` to see all available options.
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
title: "License"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 40
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/storage
|
||||
geekdocFilePath: license.md
|
||||
---
|
||||
|
||||
This project is licensed under the [Apache 2.0](https://github.com/owncloud/ocis/ocis-revablob/master/LICENSE) license. For the license of the used libraries you have to check the respective sources.
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "Store"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 10
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/store
|
||||
geekdocFilePath: _index.md
|
||||
|
||||
@@ -1,279 +0,0 @@
|
||||
---
|
||||
title: "Getting Started"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/store
|
||||
geekdocFilePath: getting-started.md
|
||||
---
|
||||
|
||||
{{< 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
|
||||
|
||||
TBD
|
||||
|
||||
### Binaries
|
||||
|
||||
TBD
|
||||
|
||||
## 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.
|
||||
|
||||
### Environment variables
|
||||
|
||||
If you prefer to configure the service with environment variables you can see the available variables below.
|
||||
|
||||
#### Global
|
||||
|
||||
STORE_CONFIG_FILE
|
||||
: Path to config file, empty default value
|
||||
|
||||
STORE_LOG_LEVEL
|
||||
: Set logging level, defaults to `info`
|
||||
|
||||
STORE_LOG_COLOR
|
||||
: Enable colored logging, defaults to `true`
|
||||
|
||||
STORE_LOG_PRETTY
|
||||
: Enable pretty logging, defaults to `true`
|
||||
|
||||
#### Server
|
||||
|
||||
STORE_TRACING_ENABLED
|
||||
: Enable sending traces, defaults to `false`
|
||||
|
||||
STORE_TRACING_TYPE
|
||||
: Tracing backend type, defaults to `jaeger`
|
||||
|
||||
STORE_TRACING_ENDPOINT
|
||||
: Endpoint for the agent, empty default value
|
||||
|
||||
STORE_TRACING_COLLECTOR
|
||||
: Endpoint for the collector, empty default value
|
||||
|
||||
STORE_TRACING_SERVICE
|
||||
: Service name for tracing, defaults to `store`
|
||||
|
||||
STORE_DEBUG_ADDR
|
||||
: Address to bind debug server
|
||||
|
||||
STORE_DEBUG_TOKEN
|
||||
: Token to grant metrics access, empty default value
|
||||
|
||||
STORE_DEBUG_PPROF
|
||||
: Enable pprof debugging, defaults to `false`
|
||||
|
||||
STORE_DEBUG_ZPAGES
|
||||
: Enable zpages debugging, defaults to `false`
|
||||
|
||||
STORE_HTTP_ADDR
|
||||
: Address to bind http server, defaults to `0.0.0.0:9461`
|
||||
|
||||
STORE_HTTP_NAMESPACE
|
||||
: The http namespace
|
||||
|
||||
STORE_HTTP_ROOT
|
||||
: Root path of http server, defaults to `/`
|
||||
|
||||
#### Health
|
||||
|
||||
STORE_DEBUG_ADDR
|
||||
: Address to debug endpoint
|
||||
|
||||
### Commandline flags
|
||||
|
||||
If you prefer to configure the service with commandline flags you can see the available variables below.
|
||||
|
||||
#### Global
|
||||
|
||||
--config-file
|
||||
: Path to config file, empty default value
|
||||
|
||||
--log-level
|
||||
: Set logging level, defaults to `info`
|
||||
|
||||
--log-color
|
||||
: Enable colored logging, defaults to `true`
|
||||
|
||||
--log-pretty
|
||||
: Enable pretty logging, defaults to `true`
|
||||
|
||||
#### 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 `store`
|
||||
|
||||
--debug-addr
|
||||
: Address to bind debug server
|
||||
|
||||
--debug-token
|
||||
: Token to grant metrics access, empty default value
|
||||
|
||||
--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:9461`
|
||||
|
||||
--http-namespace
|
||||
: Namespace for internal services communication, defaults to `com.owncloud.web`
|
||||
|
||||
--http-root
|
||||
: Root path of http server, defaults to `/`
|
||||
|
||||
#### Health
|
||||
|
||||
--debug-addr
|
||||
: Address to debug endpoint
|
||||
|
||||
### 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/store/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/store.yml`, `${HOME}/.ocis/store.yml` or `$(pwd)/config/store.yml`.
|
||||
|
||||
## 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-store --help`.
|
||||
|
||||
### 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:
|
||||
|
||||
{{< highlight txt >}}
|
||||
store server --help
|
||||
{{< / highlight >}}
|
||||
|
||||
### 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 >}}
|
||||
store health --help
|
||||
{{< / highlight >}}
|
||||
|
||||
### Version
|
||||
The version command lists the versions of all running instances. For further help please execute:
|
||||
|
||||
{{< highlight txt >}}
|
||||
store version --help
|
||||
{{< /highlight >}}
|
||||
|
||||
## 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 `STORE_DEBUG_TOKEN` mentioned above. By default the metrics endpoint is bound to `http://0.0.0.0:9460/metrics`.
|
||||
|
||||
go_gc_duration_seconds
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_gc_duration_seconds_sum
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_gc_duration_seconds_count
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_goroutines
|
||||
: Number of goroutines that currently exist
|
||||
|
||||
go_info
|
||||
: Information about the Go environment
|
||||
|
||||
go_memstats_alloc_bytes
|
||||
: Number of bytes allocated and still in use
|
||||
|
||||
go_memstats_alloc_bytes_total
|
||||
: Total number of bytes allocated, even if freed
|
||||
|
||||
go_memstats_buck_hash_sys_bytes
|
||||
: Number of bytes used by the profiling bucket hash table
|
||||
|
||||
go_memstats_frees_total
|
||||
: Total number of frees
|
||||
|
||||
go_memstats_gc_cpu_fraction
|
||||
: The fraction of this program's available CPU time used by the GC since the program started
|
||||
|
||||
go_memstats_gc_sys_bytes
|
||||
: Number of bytes used for garbage collection system metadata
|
||||
|
||||
go_memstats_heap_alloc_bytes
|
||||
: Number of heap bytes allocated and still in use
|
||||
|
||||
go_memstats_heap_idle_bytes
|
||||
: Number of heap bytes waiting to be used
|
||||
|
||||
go_memstats_heap_inuse_bytes
|
||||
: Number of heap bytes that are in use
|
||||
|
||||
go_memstats_heap_objects
|
||||
: Number of allocated objects
|
||||
|
||||
go_memstats_heap_released_bytes
|
||||
: Number of heap bytes released to OS
|
||||
|
||||
go_memstats_heap_sys_bytes
|
||||
: Number of heap bytes obtained from system
|
||||
|
||||
go_memstats_last_gc_time_seconds
|
||||
: Number of seconds since 1970 of last garbage collection
|
||||
|
||||
go_memstats_lookups_total
|
||||
: Total number of pointer lookups
|
||||
|
||||
go_memstats_mallocs_total
|
||||
: Total number of mallocs
|
||||
|
||||
go_memstats_mcache_inuse_bytes
|
||||
: Number of bytes in use by mcache structures
|
||||
|
||||
go_memstats_mcache_sys_bytes
|
||||
: Number of bytes used for mcache structures obtained from system
|
||||
|
||||
go_memstats_mspan_inuse_bytes
|
||||
: Number of bytes in use by mspan structures
|
||||
|
||||
go_memstats_mspan_sys_bytes
|
||||
: Number of bytes used for mspan structures obtained from system
|
||||
|
||||
go_memstats_next_gc_bytes
|
||||
: Number of heap bytes when next garbage collection will take place
|
||||
|
||||
go_memstats_other_sys_bytes
|
||||
: Number of bytes used for other system allocations
|
||||
|
||||
go_memstats_stack_inuse_bytes
|
||||
: Number of bytes in use by the stack allocator
|
||||
|
||||
go_memstats_stack_sys_bytes
|
||||
: Number of bytes obtained from system for stack allocator
|
||||
|
||||
go_memstats_sys_bytes
|
||||
: Number of bytes obtained from system
|
||||
|
||||
go_threads
|
||||
: Number of OS threads created
|
||||
|
||||
promhttp_metric_handler_requests_in_flight
|
||||
: Current number of scrapes being served
|
||||
|
||||
promhttp_metric_handler_requests_total
|
||||
: Total number of scrapes by HTTP status code
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
title: "License"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 40
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/store
|
||||
geekdocFilePath: license.md
|
||||
---
|
||||
|
||||
This project is licensed under the [Apache 2.0](https://github.com/owncloud/ocis/store/blob/master/LICENSE) license. For the license of the used libraries you have to check the respective sources.
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "Thumbnails"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 10
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/thumbnails
|
||||
geekdocFilePath: _index.md
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: "Building"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 30
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/thumbnails
|
||||
geekdocFilePath: building.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
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-thubnails.git
|
||||
cd {{ Name }}
|
||||
{{< / 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`.
|
||||
|
||||
## Backend
|
||||
|
||||
{{< highlight txt >}}
|
||||
make generate
|
||||
make build
|
||||
{{< / highlight >}}
|
||||
|
||||
Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis-thumbnails -h` to see all available options.
|
||||
@@ -1,45 +0,0 @@
|
||||
---
|
||||
title: "Releasing"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 40
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/thumbnails
|
||||
geekdocFilePath: releasing.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
To release a new version of ocis-thumbnails, you have to follow a few simple steps.
|
||||
|
||||
## Preperation
|
||||
|
||||
1. Create a new branch e.g. `release-x.x.x` where `x.x.x` is the version you want to release.
|
||||
2. Checkout the preparation branch.
|
||||
3. Create a new changelog folder and move the unreleased snippets there.
|
||||
{{< highlight txt >}}
|
||||
mkdir changelog/x.x.x_yyyy-MM-dd/ # yyyy-MM-dd is the current date
|
||||
mv changelog/unreleased/* changelog/x.x.x_yyyy-MM-dd/
|
||||
{{< / highlight >}}
|
||||
4. Commit and push the changes
|
||||
{{< highlight txt >}}
|
||||
git add --all
|
||||
git commit -m "prepare release x.x.x"
|
||||
git push
|
||||
{{< / highlight >}}
|
||||
5. Create a pull request to the master branch.
|
||||
|
||||
## Release
|
||||
1. After the preparation branch has been merged update your local master.
|
||||
{{< highlight txt >}}
|
||||
git checkout master
|
||||
git pull
|
||||
{{< / highlight >}}
|
||||
2. Create a new tag (preferably signed).
|
||||
{{< highlight txt >}}
|
||||
git tag -s vx.x.x -m "release vx.x.x"
|
||||
git push --tags
|
||||
{{< / highlight >}}
|
||||
3. Wait for CI and check that the GitHub release was published.
|
||||
|
||||
|
||||
Congratulations, you just released ocis-thumbnails!
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: WebDaV
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 10
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/webdav
|
||||
geekdocFilePath: _index.md
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: "Building"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 30
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/webdav
|
||||
geekdocFilePath: building.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
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-webdav.git
|
||||
cd ocis-webdav
|
||||
{{< / 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`.
|
||||
|
||||
### Backend
|
||||
|
||||
{{< highlight txt >}}
|
||||
make generate
|
||||
make build
|
||||
{{< / highlight >}}
|
||||
|
||||
Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis-webdav -h` to see all available options.
|
||||
@@ -1,276 +0,0 @@
|
||||
---
|
||||
title: "Getting Started"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/webdav
|
||||
geekdocFilePath: getting-started.md
|
||||
---
|
||||
|
||||
{{< 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
|
||||
|
||||
TBD
|
||||
|
||||
#### Binaries
|
||||
|
||||
TBD
|
||||
|
||||
### 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.
|
||||
|
||||
#### Environment variables
|
||||
|
||||
If you prefer to configure the service with environment variables you can see the available variables below.
|
||||
|
||||
##### Global
|
||||
|
||||
WEBDAV_CONFIG_FILE
|
||||
: Path to config file, empty default value
|
||||
|
||||
WEBDAV_LOG_LEVEL
|
||||
: Set logging level, defaults to `info`
|
||||
|
||||
WEBDAV_LOG_COLOR
|
||||
: Enable colored logging, defaults to `true`
|
||||
|
||||
WEBDAV_LOG_PRETTY
|
||||
: Enable pretty logging, defaults to `true`
|
||||
|
||||
##### 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:9119`
|
||||
|
||||
WEBDAV_DEBUG_TOKEN
|
||||
: Token to grant metrics access, empty default value
|
||||
|
||||
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:9115`
|
||||
|
||||
WEBDAV_HTTP_ROOT
|
||||
: Root path of http server, defaults to `/`
|
||||
|
||||
##### Health
|
||||
|
||||
WEBDAV_DEBUG_ADDR
|
||||
: Address to debug endpoint, defaults to `0.0.0.0:9119`
|
||||
|
||||
#### Commandline flags
|
||||
|
||||
If you prefer to configure the service with commandline flags you can see the available variables below.
|
||||
|
||||
##### Global
|
||||
|
||||
--config-file
|
||||
: Path to config file, empty default value
|
||||
|
||||
--log-level
|
||||
: Set logging level, defaults to `info`
|
||||
|
||||
--log-color
|
||||
: Enable colored logging, defaults to `true`
|
||||
|
||||
--log-pretty
|
||||
: Enable pretty logging, defaults to `true`
|
||||
|
||||
##### 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:9119`
|
||||
|
||||
--debug-token
|
||||
: Token to grant metrics access, empty default value
|
||||
|
||||
--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:9115`
|
||||
|
||||
--http-namespace
|
||||
: Namespace for internal services communication, defaults to `com.owncloud.web`
|
||||
|
||||
--http-root
|
||||
: Root path of http server, defaults to `/`
|
||||
|
||||
##### Health
|
||||
|
||||
--debug-addr
|
||||
: Address to debug endpoint, defaults to `0.0.0.0:9119`
|
||||
|
||||
#### 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/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
|
||||
|
||||
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
|
||||
|
||||
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:
|
||||
|
||||
{{< highlight txt >}}
|
||||
webdav server --help
|
||||
{{< / highlight >}}
|
||||
|
||||
#### 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 >}}
|
||||
webdav health --help
|
||||
{{< / highlight >}}
|
||||
|
||||
### Version
|
||||
The version command lists the versions of all running instances. For further help please execute:
|
||||
|
||||
{{< highlight txt >}}
|
||||
webdav version --help
|
||||
{{< /highlight >}}
|
||||
|
||||
### 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
|
||||
|
||||
go_gc_duration_seconds_sum
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_gc_duration_seconds_count
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_goroutines
|
||||
: Number of goroutines that currently exist
|
||||
|
||||
go_info
|
||||
: Information about the Go environment
|
||||
|
||||
go_memstats_alloc_bytes
|
||||
: Number of bytes allocated and still in use
|
||||
|
||||
go_memstats_alloc_bytes_total
|
||||
: Total number of bytes allocated, even if freed
|
||||
|
||||
go_memstats_buck_hash_sys_bytes
|
||||
: Number of bytes used by the profiling bucket hash table
|
||||
|
||||
go_memstats_frees_total
|
||||
: Total number of frees
|
||||
|
||||
go_memstats_gc_cpu_fraction
|
||||
: The fraction of this program's available CPU time used by the GC since the program started
|
||||
|
||||
go_memstats_gc_sys_bytes
|
||||
: Number of bytes used for garbage collection system metadata
|
||||
|
||||
go_memstats_heap_alloc_bytes
|
||||
: Number of heap bytes allocated and still in use
|
||||
|
||||
go_memstats_heap_idle_bytes
|
||||
: Number of heap bytes waiting to be used
|
||||
|
||||
go_memstats_heap_inuse_bytes
|
||||
: Number of heap bytes that are in use
|
||||
|
||||
go_memstats_heap_objects
|
||||
: Number of allocated objects
|
||||
|
||||
go_memstats_heap_released_bytes
|
||||
: Number of heap bytes released to OS
|
||||
|
||||
go_memstats_heap_sys_bytes
|
||||
: Number of heap bytes obtained from system
|
||||
|
||||
go_memstats_last_gc_time_seconds
|
||||
: Number of seconds since 1970 of last garbage collection
|
||||
|
||||
go_memstats_lookups_total
|
||||
: Total number of pointer lookups
|
||||
|
||||
go_memstats_mallocs_total
|
||||
: Total number of mallocs
|
||||
|
||||
go_memstats_mcache_inuse_bytes
|
||||
: Number of bytes in use by mcache structures
|
||||
|
||||
go_memstats_mcache_sys_bytes
|
||||
: Number of bytes used for mcache structures obtained from system
|
||||
|
||||
go_memstats_mspan_inuse_bytes
|
||||
: Number of bytes in use by mspan structures
|
||||
|
||||
go_memstats_mspan_sys_bytes
|
||||
: Number of bytes used for mspan structures obtained from system
|
||||
|
||||
go_memstats_next_gc_bytes
|
||||
: Number of heap bytes when next garbage collection will take place
|
||||
|
||||
go_memstats_other_sys_bytes
|
||||
: Number of bytes used for other system allocations
|
||||
|
||||
go_memstats_stack_inuse_bytes
|
||||
: Number of bytes in use by the stack allocator
|
||||
|
||||
go_memstats_stack_sys_bytes
|
||||
: Number of bytes obtained from system for stack allocator
|
||||
|
||||
go_memstats_sys_bytes
|
||||
: Number of bytes obtained from system
|
||||
|
||||
go_threads
|
||||
: Number of OS threads created
|
||||
|
||||
promhttp_metric_handler_requests_in_flight
|
||||
: Current number of scrapes being served
|
||||
|
||||
promhttp_metric_handler_requests_total
|
||||
: Total number of scrapes by HTTP status code
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "Deployment"
|
||||
date: 2020-10-01T20:35:00+01:00
|
||||
weight: -10
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/deployment
|
||||
geekdocFilePath: _index.md
|
||||
@@ -10,7 +10,7 @@ geekdocFilePath: _index.md
|
||||
{{< toc >}}
|
||||
|
||||
## Deployments scenarios and examples
|
||||
This section handles deployments and operations for admins. If you are looking for a development setup, start with [Getting started](https://owncloud.github.io/ocis/getting-started/).
|
||||
This section handles deployments and operations for admins. If want to just try oCIS you may also follow [Getting started]({{< ref "../getting-started.md" >}}).
|
||||
|
||||
### Setup oCIS on your server
|
||||
oCIS deployments are super simple, yet there are many configurations possible for advanced setups.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Bridge"
|
||||
date: 2022-02-27T20:35:00+01:00
|
||||
date: 2020-02-27T20:35:00+01:00
|
||||
weight: 30
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/deployment
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
---
|
||||
title: "Development"
|
||||
date: 2020-10-01T20:35:00+01:00
|
||||
weight: -12
|
||||
weight: 10
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/development
|
||||
geekdocFilePath: _index.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: "Documentation"
|
||||
date: 2020-07-27T08:39:38+00:00
|
||||
weight: 99
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/development
|
||||
geekdocFilePath: build-docs.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Build the documentation
|
||||
|
||||
Just run `make -C docs docs-serve` from within the root level of the oCIS git repository.
|
||||
|
||||
## Add changes to the documentation
|
||||
|
||||
Please keep this documentation in sync with the oCIS source code.
|
||||
|
||||
Changes on the documentation are automatically applied to [this site](https://owncloud.github.io) when merged to the master branch.
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
title: "Build"
|
||||
date: 2020-02-27T20:35:00+01:00
|
||||
weight: 30
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/development
|
||||
geekdocFilePath: build.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Build requirements
|
||||
|
||||
see [Development - Getting Started]({{< relref "getting-started.md/#requirements">}})
|
||||
|
||||
## Get the sources
|
||||
|
||||
{{< highlight txt >}}
|
||||
git clone https://github.com/owncloud/ocis.git
|
||||
cd ocis
|
||||
{{< / highlight >}}
|
||||
|
||||
## Build the oCIS binary
|
||||
|
||||
The oCIS binary source is in the `ocis` folder inside the oCIS repository. In this folder you can build the oCIS binary:
|
||||
|
||||
{{< highlight txt >}}
|
||||
cd ocis
|
||||
make generate
|
||||
make build
|
||||
{{< / highlight >}}
|
||||
|
||||
After building you have the binary within the `bin/` folder. Try to run it: `./bin/ocis -h`
|
||||
|
||||
## Build a local oCIS docker image
|
||||
|
||||
If you are developing and want to run your local changes in a docker or docker-compose setup, you have to build an image locally.
|
||||
|
||||
Therefore run following commands in the root of the oCIS repository:
|
||||
|
||||
{{< highlight txt >}}
|
||||
docker build -t owncloud/ocis:dev .
|
||||
{{< / highlight >}}
|
||||
|
||||
Then you can test as usual via
|
||||
|
||||
{{< highlight txt >}}
|
||||
docker run --rm -ti owncloud/ocis:dev
|
||||
{{< / highlight >}}
|
||||
@@ -1,40 +0,0 @@
|
||||
---
|
||||
title: "Build the documentation"
|
||||
date: 2020-07-27T08:39:38+00:00
|
||||
weight: 99
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/development
|
||||
geekdocFilePath: building-docs.md
|
||||
---
|
||||
|
||||
## Buildling the documentation
|
||||
|
||||
Following steps can be applied for every oCIS extension repository.
|
||||
|
||||
### Setting up
|
||||
|
||||
- Install [hugo](https://gohugo.io/getting-started/installing/)
|
||||
- Run `make docs`
|
||||
|
||||
### Viewing the documentation
|
||||
|
||||
To view the rendered docs in the browser run:
|
||||
```bash
|
||||
cd hugo
|
||||
hugo -D server
|
||||
```
|
||||
|
||||
Then open "http://localhost:1313/"
|
||||
|
||||
When making changes to the docs, run
|
||||
|
||||
```bash
|
||||
rsync -ax --delete ../docs/ content/
|
||||
```
|
||||
|
||||
in the hugo folder and the server will pick up the changes and reload the page automatically.
|
||||
|
||||
### Deploying the documentation
|
||||
|
||||
The documentation is automatically deployed from the master branch to https://owncloud.github.io
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
---
|
||||
title: "Build ocis"
|
||||
date: 2020-02-27T20:35:00+01:00
|
||||
weight: 30
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/development
|
||||
geekdocFilePath: building.md
|
||||
---
|
||||
|
||||
## Build requirements
|
||||
|
||||
All required tools besides `go` and `make` are bundled or getting automatically installed within the `GOPATH`. All commands to build this project are part of our `Makefile`.
|
||||
|
||||
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.13.
|
||||
|
||||
## Get the sources
|
||||
|
||||
{{< highlight txt >}}
|
||||
git clone https://github.com/owncloud/ocis.git
|
||||
cd ocis
|
||||
{{< / highlight >}}
|
||||
|
||||
## Build the oCIS binary
|
||||
|
||||
The oCIS binary source is in the ocis/ocis folder. In this folder you can build the ocis binary:
|
||||
|
||||
{{< highlight txt >}}
|
||||
make generate
|
||||
make build
|
||||
{{< / highlight >}}
|
||||
|
||||
Finally, you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis -h` to see all available options.
|
||||
|
||||
## Build a local ocis docker image
|
||||
|
||||
If you are developing on a local branch based on docker / docker-compose setup, here is how to build a new ocis image. In the root folder:
|
||||
|
||||
{{< highlight txt >}}
|
||||
docker build -t owncloud/ocis:dev .
|
||||
{{< / highlight >}}
|
||||
|
||||
Then you can test as usual via
|
||||
|
||||
{{< highlight txt >}}
|
||||
docker run --rm -ti owncloud/ocis:dev
|
||||
{{< / highlight >}}
|
||||
@@ -0,0 +1,58 @@
|
||||
---
|
||||
title: "Continuous Integration"
|
||||
date: 2020-10-01T20:35:00+01:00
|
||||
weight: 100
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/development
|
||||
geekdocFilePath: continuous-integration.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
oCIS uses [DRONE](https://www.drone.io/) as CI system. You can find the pipeline logs [here](https://drone.owncloud.com/owncloud/ocis) or in your PR.
|
||||
|
||||
## Concepts
|
||||
|
||||
The pipeline is defined in [Starlark](https://github.com/bazelbuild/starlark) and transformed to YAML upon pipeline run. This enables us to do a highly dynamic and non repeating pipeline configuration.
|
||||
|
||||
Upon running the pipeline, your branch gets merged to the master branch. This ensures that we always test your changeset if as it was applied to the master of oCIS. Please note that this does not apply to the pipeline definition (`.drone.star`).
|
||||
|
||||
## Things done in CI
|
||||
|
||||
- static code analysis
|
||||
- linting
|
||||
- running UI tests
|
||||
- running ownCloud 10 test suite against oCIS
|
||||
- build and release docker images
|
||||
- build and release binaries
|
||||
- build and release documentation
|
||||
|
||||
## Flags in commit message and PR title
|
||||
|
||||
You may add flags to your commit message or PR title in order to speed up pipeline runs and take load from the CI runners.
|
||||
|
||||
- `[CI SKIP]`: no ci is run on the commit or PR
|
||||
|
||||
- `[docs-only]`: please add this flag, if you only changed documentation. This will only trigger documentation related CI steps.
|
||||
|
||||
- `[tests-only]`: please add this flag, if you only changed tests or test-related tooling. You do not need to add a changelog for tests-only changes.
|
||||
|
||||
### Knowledge base
|
||||
|
||||
- My pipeline fails because some CI related files or commands are missing.
|
||||
|
||||
Please make sure to rebase your branch onto the lastest master of oCIS. It could be that the pipeline definition (`.drone.star`) was changed on the master branch. This is the only file, that will not be auto merged to master upon pipeline run. So things could be out of sync.
|
||||
|
||||
- How can I see the YAML drone pipeline definition?
|
||||
|
||||
In order to see the Yaml pipeline definition you can use the drone-cli to convert the Starlark file.
|
||||
|
||||
```
|
||||
drone starlark
|
||||
```
|
||||
|
||||
{{< hint info >}}
|
||||
If you experience a `"build" struct has no .title attribute` error you need a patched drone-cli binary.
|
||||
You need to build it yourself from this [source code](https://github.com/micbar/drone-cli/tree/add-more-flags).
|
||||
(There is also an open [PR](https://github.com/drone/drone-cli/pull/175) for that on drone-cli)
|
||||
{{< /hint >}}
|
||||
@@ -7,6 +7,8 @@ geekdocEditPath: edit/master/docs/ocis/development
|
||||
geekdocFilePath: debugging.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Debugging
|
||||
|
||||
As a single binary for easy deployment running `ocis server` just forks itself to start all the services, which makes debugging those processes a little harder.
|
||||
@@ -52,22 +54,23 @@ Then you can set a breakpoint in the service you need and attach to the process
|
||||
|
||||
```json
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "ocis attach",
|
||||
"type": "go",
|
||||
"request": "attach",
|
||||
"mode": "local",
|
||||
"processId": 12897,
|
||||
}
|
||||
]
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "ocis attach",
|
||||
"type": "go",
|
||||
"request": "attach",
|
||||
"mode": "local",
|
||||
"processId": 12897
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
#### Start all services independently to replace one of them with a debug process
|
||||
|
||||
1. You can use this `./ocis.sh` script to start all services independently, so they don't get restrarted by the runtime when you kill them:
|
||||
|
||||
```bash
|
||||
#/bin/sh
|
||||
LOG_LEVEL="debug"
|
||||
@@ -128,7 +131,6 @@ bin/ocis --log-level=$LOG_LEVEL proxy &
|
||||
|
||||
3. Kill the service you want to start in debug mode:
|
||||
|
||||
|
||||
```console
|
||||
# kill 17628
|
||||
```
|
||||
@@ -203,15 +205,16 @@ Debug wherever the call trace leads you to ... good luck!
|
||||
You can either run and manage the services independently, or you can update the `go.mod` file and replace dependencies with your local version.
|
||||
|
||||
To debug the reva frontend we need to add two replacements:
|
||||
|
||||
```
|
||||
// use the local ocis-reva repo
|
||||
replace github.com/owncloud/ocis-reva => ../ocis-reva
|
||||
// also use the local reva repo
|
||||
replace github.com/cs3org/reva => ../reva
|
||||
```
|
||||
|
||||
{{< hint info >}}
|
||||
The username and password only work when basic auth is available. Otherwise you have to obtain a bearer token, eg. by grabbing it from the browser.
|
||||
{{< /hint >}}
|
||||
|
||||
Rebuild ocis to make sure the dependency is used. It should be sufficient to just restart the service you want to debug.
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
title: "Extension"
|
||||
title: "Extensions"
|
||||
date: 2020-02-27T20:35:00+01:00
|
||||
weight: 40
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/development
|
||||
geekdocFilePath: extensions.md
|
||||
---
|
||||
|
||||
@@ -119,11 +119,7 @@ PHOENIX_ASSET_PATH="`pwd`/../phoenix/dist" bin/ocis phoenix
|
||||
|
||||
## The ownCloud design system
|
||||
|
||||
The owncloud design system contains a set of ownCloud vue components for phoenix or your own ocis extensions. Use it for a consistent look and feel.
|
||||
|
||||
Point your browser to https://owncloud.github.io/owncloud-design-system and check the available components. Live editing the examples in the browser is supported.
|
||||
|
||||
note: There is a bug with navigation sub items: either click a nav item twice or refresh the page
|
||||
The [ownCloud design system](https://owncloud.design/) contains a set of ownCloud vue components for phoenix or your own ocis extensions. Please use it for a consistent look and feel.
|
||||
|
||||
## External phoenix apps
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "Getting Started with Development"
|
||||
title: "Getting Started"
|
||||
date: 2020-07-07T20:35:00+01:00
|
||||
weight: 15
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
@@ -9,72 +9,49 @@ geekdocFilePath: getting-started.md
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Docker dev environment
|
||||
## Requirements
|
||||
|
||||
### Option 1: Plain docker
|
||||
We want contribution to oCIS and the creation of extensions to be as easy as possible.
|
||||
So we are trying to reflect this in the tooling. It should be kept simple and quick to be set up.
|
||||
|
||||
To build and run your local ocis code with default storage driver
|
||||
Besides standard development tools like git and a text editor, you need the following software for development:
|
||||
|
||||
```
|
||||
docker run --rm -ti --name ocis -v $PWD:/ocis -p 9200:9200 owncloud/eos-ocis-dev
|
||||
```
|
||||
- Go >= v1.13 ([install instructions](https://golang.org/doc/install))
|
||||
- Yarn ([install instructions](https://classic.yarnpkg.com/en/docs/install))
|
||||
- docker ([install instructions](https://docs.docker.com/get-docker/))
|
||||
- docker-compose ([install instructions](https://docs.docker.com/compose/install/))
|
||||
|
||||
The eos-ocis-dev container will build and run oCIS using the ownCloud storage driver and store files in the container at `/var/tmp/reva/data/<username>/files`
|
||||
If you find tools needed besides the mentioned above, please feel free to open an issue or open a PR.
|
||||
|
||||
To check the uploaded files start digging with: `docker exec -it ocis ls -l /var/tmp/reva/`
|
||||
## Repository structure
|
||||
|
||||
{{< hint info >}}
|
||||
On MacOS do not mount a local folder to the `/var/tmp/reva/` path. The fuse driver used by docker [does not support extended attributes](https://docs.docker.com/v18.09/docker-for-mac/osxfs/). See [#182](https://github.com/owncloud/ocis/issues/182) for more details.
|
||||
{{< /hint >}}
|
||||
This repository follows the [golang-standard project-layout](https://github.com/golang-standards/project-layout).
|
||||
|
||||
oCIS consists of multiple micro services, also called extensions. We started by having standalone repositories for each of them but quickly noticed, that this adds a time consuming overhead for developers. So we ended up with a monorepo housing all the extensions in one repository.
|
||||
|
||||
### Option 2: Docker compose
|
||||
Each of the extensions live in a subfolder (eg. `accounts` or `settings`) in this repository, technically creating independant Go modules.
|
||||
|
||||
With the `docker-compose.yml` file in ocis repo you can also start ocis via compose:
|
||||
The `ocis` folder does also contain a Go module but is no extension at all. Instead this module is used to import all extensions and furthermore implement commands to start the extensions. With the resulting oCIS binary you can start single extensions or even all extensions at the same time.
|
||||
|
||||
```
|
||||
docker-compose up -d ocis
|
||||
```
|
||||
The `docs` folder contains the source for the [oCIS documentation](https://owncloud.github.io/ocis/).
|
||||
|
||||
{{< hint info >}}
|
||||
We are only starting the `ocis` container here.
|
||||
{{< /hint >}}
|
||||
The `deployments` folder contains documented deployment configurations and templates.
|
||||
|
||||
## Verification
|
||||
The `scripts` folder contains scripts to perform various build, install, analysis, etc operations.
|
||||
|
||||
Check the services are running
|
||||
## Starting points
|
||||
|
||||
```
|
||||
$ docker-compose exec ocis ./bin/ocis list
|
||||
+--------------------------+-----+
|
||||
| EXTENSION | PID |
|
||||
+--------------------------+-----+
|
||||
| accounts | 172 |
|
||||
| api | 204 |
|
||||
| glauth | 187 |
|
||||
| graph | 41 |
|
||||
| graph-explorer | 55 |
|
||||
| konnectd | 196 |
|
||||
| ocs | 59 |
|
||||
| phoenix | 29 |
|
||||
| proxy | 22 |
|
||||
| registry | 226 |
|
||||
| reva-auth-basic | 96 |
|
||||
| reva-auth-bearer | 104 |
|
||||
| reva-frontend | 485 |
|
||||
| reva-gateway | 78 |
|
||||
| reva-sharing | 286 |
|
||||
| reva-storage-eos | 129 |
|
||||
| reva-storage-eos-data | 134 |
|
||||
| reva-storage-home | 442 |
|
||||
| reva-storage-home-data | 464 |
|
||||
| reva-storage-oc | 149 |
|
||||
| reva-storage-oc-data | 155 |
|
||||
| reva-storage-public-link | 168 |
|
||||
| reva-users | 420 |
|
||||
| settings | 23 |
|
||||
| thumbnails | 201 |
|
||||
| web | 218 |
|
||||
| webdav | 63 |
|
||||
+--------------------------+-----+
|
||||
```
|
||||
Depending on what you want to develop there are different starting points. These will be described below.
|
||||
|
||||
### Developing oCIS
|
||||
|
||||
If you want to contribute to oCIS:
|
||||
|
||||
- see [contribution guidelines](https://github.com/owncloud/ocis#contributing)
|
||||
- make sure the tooling is set up by [building oCIS]({{< relref "build.md" >}}) and [building the docs]({{< relref "build-docs.md" >}})
|
||||
- create or pick an [open issue](https://github.com/owncloud/ocis/issues) to develop on and mention in the issue that you are working on it
|
||||
- open a PR and get things done
|
||||
|
||||
### Developing extensions
|
||||
|
||||
If you want to develop an extension, start here: [Extensions]({{< relref "extensions.md">}})
|
||||
|
||||
@@ -7,6 +7,7 @@ geekdocEditPath: edit/master/docs/ocis/development
|
||||
geekdocFilePath: testing.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Acceptance tests
|
||||
|
||||
@@ -15,6 +16,7 @@ We are using the ownCloud 10 acceptance test suite against oCIS. To set this up
|
||||
### Getting the tests
|
||||
|
||||
All you need to do to get the acceptance tests is check out the core repo:
|
||||
|
||||
```
|
||||
git clone https://github.com/owncloud/core.git
|
||||
```
|
||||
@@ -28,6 +30,7 @@ File versions need a redis server. Start one with docker by using:
|
||||
### Run ocis
|
||||
|
||||
To start ocis:
|
||||
|
||||
```
|
||||
PROXY_ENABLE_BASIC_AUTH=true bin/ocis server
|
||||
```
|
||||
@@ -35,6 +38,7 @@ PROXY_ENABLE_BASIC_AUTH=true bin/ocis server
|
||||
`PROXY_ENABLE_BASIC_AUTH` will allow the acceptance tests to make requests against the provisioning api (and other endpoints) using basic auth.
|
||||
|
||||
### Run the acceptance tests
|
||||
|
||||
First we will need to clone the testing app in owncloud which contains the skeleton files required for running the tests.
|
||||
In the ownCloud 10 core clone the testing app with the following command:
|
||||
|
||||
@@ -42,7 +46,7 @@ In the ownCloud 10 core clone the testing app with the following command:
|
||||
git clone https://github.com/owncloud/testing apps/testing
|
||||
```
|
||||
|
||||
Then run the api acceptance tests with the following command from the root of the OCIS repo:
|
||||
Then run the api acceptance tests with the following command from the root of the oCIS repository:
|
||||
```
|
||||
make test-acceptance-api \
|
||||
TEST_SERVER_URL=https://localhost:9200 \
|
||||
@@ -87,6 +91,7 @@ If you want to work on a specific issue
|
||||
2. locally run each of the tests marked with that issue in the expected failures file.
|
||||
|
||||
E.g.:
|
||||
|
||||
```
|
||||
make test-acceptance-api \
|
||||
TEST_SERVER_URL=https://localhost:9200 \
|
||||
|
||||
@@ -7,41 +7,43 @@ geekdocEditPath: edit/master/docs/ocis/development
|
||||
geekdocFilePath: tracing.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
By default, we use [Jaeger](https://www.jaegertracing.io) for request tracing within oCIS. You can follow these steps
|
||||
to get started:
|
||||
|
||||
1. Start Jaeger by using the all-in-one docker image:
|
||||
```console
|
||||
docker run -d --name jaeger \
|
||||
-e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \
|
||||
-p 5775:5775/udp \
|
||||
-p 6831:6831/udp \
|
||||
-p 6832:6832/udp \
|
||||
-p 5778:5778 \
|
||||
-p 16686:16686 \
|
||||
-p 14268:14268 \
|
||||
-p 14250:14250 \
|
||||
-p 9411:9411 \
|
||||
jaegertracing/all-in-one:1.17
|
||||
```
|
||||
```console
|
||||
docker run -d --name jaeger \
|
||||
-e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \
|
||||
-p 5775:5775/udp \
|
||||
-p 6831:6831/udp \
|
||||
-p 6832:6832/udp \
|
||||
-p 5778:5778 \
|
||||
-p 16686:16686 \
|
||||
-p 14268:14268 \
|
||||
-p 14250:14250 \
|
||||
-p 9411:9411 \
|
||||
jaegertracing/all-in-one:1.17
|
||||
```
|
||||
2. Every single oCIS service has its own environment variables for enabling and configuring tracing.
|
||||
1. You can enable and configure tracing on each service individually. For example, enable tracing
|
||||
in Reva when starting the oCIS single binary like this:
|
||||
```console
|
||||
REVA_TRACING_ENABLED=true \
|
||||
REVA_TRACING_ENDPOINT=localhost:6831 \
|
||||
REVA_TRACING_COLLECTOR=http://localhost:14268/api/traces \
|
||||
./bin/ocis server
|
||||
```
|
||||
2. Enabling and configuring tracing on oCIS itself will forward the configuration to all services:
|
||||
```console
|
||||
OCIS_TRACING_ENABLED=true \
|
||||
OCIS_TRACING_ENDPOINT=localhost:6831 \
|
||||
OCIS_TRACING_COLLECTOR=http://localhost:14268/api/traces \
|
||||
./bin/ocis server
|
||||
```
|
||||
If you want to set individual tracing configuration for each service, make sure to set
|
||||
`OCIS_TRACING_ENABLED=false`.
|
||||
1. You can enable and configure tracing on each service individually. For example, enable tracing
|
||||
in Reva when starting the oCIS single binary like this:
|
||||
```console
|
||||
REVA_TRACING_ENABLED=true \
|
||||
REVA_TRACING_ENDPOINT=localhost:6831 \
|
||||
REVA_TRACING_COLLECTOR=http://localhost:14268/api/traces \
|
||||
./bin/ocis server
|
||||
```
|
||||
2. Enabling and configuring tracing on oCIS itself will forward the configuration to all services:
|
||||
```console
|
||||
OCIS_TRACING_ENABLED=true \
|
||||
OCIS_TRACING_ENDPOINT=localhost:6831 \
|
||||
OCIS_TRACING_COLLECTOR=http://localhost:14268/api/traces \
|
||||
./bin/ocis server
|
||||
```
|
||||
If you want to set individual tracing configuration for each service, make sure to set
|
||||
`OCIS_TRACING_ENABLED=false`.
|
||||
3. Make the actual request that you want to trace.
|
||||
4. Open up the [Jaeger UI](http://localhost:16686) to analyze request traces.
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
title: "Flow documentation"
|
||||
date: 2020-10-01T20:35:00+01:00
|
||||
weight: 30
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/flow-docs
|
||||
geekdocFilePath: _index.md
|
||||
---
|
||||
@@ -3,7 +3,7 @@ title: "Login Flow"
|
||||
date: 2020-05-04T20:47:00+01:00
|
||||
weight: 43
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/flow-docs
|
||||
geekdocFilePath: login-flow.md
|
||||
---
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Public upload Flow"
|
||||
date: 2020-07-27T14:16:00+01:00
|
||||
weight: 47
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/flow-docs
|
||||
geekdocFilePath: public-upload-flow.md
|
||||
---
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Request Flow"
|
||||
date: 2020-04-27T16:07:00+01:00
|
||||
weight: 45
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/flow-docs
|
||||
geekdocFilePath: request-flow.md
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "Getting Started"
|
||||
date: 2020-02-27T20:35:00+01:00
|
||||
weight: -15
|
||||
weight: 0
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis
|
||||
geekdocFilePath: getting-started.md
|
||||
@@ -47,7 +47,7 @@ docker run --rm -ti -p 9200:9200 owncloud/ocis
|
||||
|
||||
### Login to oCIS Web
|
||||
|
||||
Open https://localhost:9200 and login using one of the demo accounts:
|
||||
Open [https://localhost:9200](https://localhost:9200) and login using one of the demo accounts:
|
||||
|
||||
```console
|
||||
einstein:relativity
|
||||
@@ -61,11 +61,9 @@ moss:vista
|
||||
admin:admin
|
||||
```
|
||||
|
||||
### Basic Commands
|
||||
### Basic Management Commands
|
||||
|
||||
The program provides a few sub-commands on execution. The available configuration methods have already been mentioned above. Generally you can always see a formatted help output if you execute the binary via `ocis --help`.
|
||||
|
||||
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 web service while the debug server is used for health check, readiness check and to server the metrics mentioned below.
|
||||
The oCIS single binary contains multiple extensions and the `ocis` command helps you to manage them. You already used `ocis server` to run all available extensions in the [Run oCIS]({{< relref "#run-ocis" >}}) section. We now will show you some more management commands, which you may also explore by typing `ocis --help` or going to the [docs]({{< relref "configuration.md" >}}).
|
||||
|
||||
To start oCIS server:
|
||||
|
||||
@@ -73,7 +71,7 @@ To start oCIS server:
|
||||
ocis server
|
||||
{{< / highlight >}}
|
||||
|
||||
The list command prints all running oCIS services.
|
||||
The list command prints all running oCIS extensions.
|
||||
{{< highlight txt >}}
|
||||
ocis list
|
||||
{{< / highlight >}}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
title: "Storage backends"
|
||||
date: 2020-02-27T20:35:00+01:00
|
||||
weight: 40
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/storage-backends
|
||||
geekdocFilePath: _index.md
|
||||
---
|
||||
@@ -23,10 +23,6 @@ geekdocFilePath: CONFIGURATION.tmpl
|
||||
|
||||
## 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_glauth/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:
|
||||
|
||||
@@ -23,10 +23,6 @@ geekdocFilePath: CONFIGURATION.tmpl
|
||||
|
||||
## 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_konnectd/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:
|
||||
|
||||
@@ -23,10 +23,6 @@ geekdocFilePath: CONFIGURATION.tmpl
|
||||
|
||||
## 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_phoenix/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:
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
Image is based on [owncloud/eos-base](https://hub.docker.com/r/owncloud/eos-base) from [eos-stack](https://github.com/owncloud-docker/eos-stack)
|
||||
|
||||
{{< hint info >}}
|
||||
On MacOS do not mount a local folder to the `/var/tmp/reva/` path. The fuse driver used by docker [does not support extended attributes](https://docs.docker.com/v18.09/docker-for-mac/osxfs/). See [#182](https://github.com/owncloud/ocis/issues/182) for more details.
|
||||
{{< /hint >}}
|
||||
|
||||
## Build
|
||||
```shell
|
||||
docker build -t owncloud/eos-ocis-dev:latest .
|
||||
|
||||
@@ -24,6 +24,7 @@ require (
|
||||
github.com/owncloud/ocis/ocis-phoenix v0.0.0-00010101000000-000000000000
|
||||
github.com/owncloud/ocis/ocis-pkg v0.1.0
|
||||
github.com/owncloud/ocis/ocs v0.0.0-00010101000000-000000000000
|
||||
github.com/owncloud/ocis/onlyoffice v0.0.0-00010101000000-000000000000
|
||||
github.com/owncloud/ocis/proxy v0.0.0-00010101000000-000000000000
|
||||
github.com/owncloud/ocis/settings v0.0.0-20200918114005-1a0ddd2190ee
|
||||
github.com/owncloud/ocis/storage v0.0.0-20201015120921-38358ba4d4df
|
||||
@@ -45,6 +46,7 @@ replace (
|
||||
github.com/owncloud/ocis/ocis-phoenix => ../ocis-phoenix
|
||||
github.com/owncloud/ocis/ocis-pkg => ../ocis-pkg
|
||||
github.com/owncloud/ocis/ocs => ../ocs
|
||||
github.com/owncloud/ocis/onlyoffice => ../onlyoffice
|
||||
github.com/owncloud/ocis/proxy => ../proxy
|
||||
github.com/owncloud/ocis/settings => ../settings
|
||||
github.com/owncloud/ocis/storage => ../storage
|
||||
|
||||
@@ -422,6 +422,7 @@ github.com/go-asn1-ber/asn1-ber v1.5.1 h1:pDbRAunXzIUXfx4CB2QJFv5IuPiuoW+sWvr/Us
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
|
||||
github.com/go-bindata/go-bindata v3.1.1+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo=
|
||||
github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ=
|
||||
github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ=
|
||||
github.com/go-chi/chi v4.1.2+incompatible h1:fGFk2Gmi/YKXk0OmGfBh0WgmN3XB8lVnEyNz34tQRec=
|
||||
github.com/go-chi/chi v4.1.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ=
|
||||
github.com/go-chi/render v1.0.1 h1:4/5tis2cKaNdnv9zFLfXzcquC9HbeZgCnxGnKrltBS8=
|
||||
@@ -1203,6 +1204,8 @@ github.com/owncloud/ocis-hello v0.1.0-alpha1.0.20200828085053-37fcf3c8f853 h1:ei
|
||||
github.com/owncloud/ocis-hello v0.1.0-alpha1.0.20200828085053-37fcf3c8f853/go.mod h1:vnpYlDkhVoiuUAuTnY4Ajz2d5Alz0c/49AxptOLTpYA=
|
||||
github.com/owncloud/ocis-pkg v1.3.0/go.mod h1:Wo0QfOmhadh2vNcUoQIsw2yaOT3zeftk+xaOOwP3y88=
|
||||
github.com/owncloud/ocis-pkg/v2 v2.0.1/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk=
|
||||
github.com/owncloud/ocis-pkg/v2 v2.2.0/go.mod h1:MXv7QzsYsu4YWuyJxhq1kLLmJa/r5gbqHe1FXulMHaw=
|
||||
github.com/owncloud/ocis-pkg/v2 v2.4.0 h1:/3ZOd4txtwjiNKJA9iLT9BjrJw5YgHSX13fQR4BYfGY=
|
||||
github.com/owncloud/ocis-pkg/v2 v2.4.0/go.mod h1:FSzIvhx9HcZcq4jgNaDowNvM7PTX/XCyoMvyfzidUpE=
|
||||
github.com/owncloud/ocis-settings v0.3.2-0.20200827193534-8caf098e6537/go.mod h1:vRge9QDkOsc6j76gPBmZs1Z5uOPrV4DIkZCgZCEFwBA=
|
||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/onlyoffice/pkg/command"
|
||||
"github.com/owncloud/ocis/onlyoffice/pkg/flagset"
|
||||
)
|
||||
|
||||
// OnlyofficeCommand is the entrypoint for the onlyoffice command.
|
||||
func OnlyofficeCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "onlyoffice",
|
||||
Usage: "Start onlyoffice server",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.ServerWithConfig(cfg.Onlyoffice),
|
||||
Before: func(c *cli.Context) error {
|
||||
if cfg.HTTP.Root != "/" {
|
||||
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
onlyofficeCommand := command.Server(configureOnlyoffice(cfg).Onlyoffice)
|
||||
|
||||
if err := onlyofficeCommand.Before(c); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return cli.HandleAction(onlyofficeCommand.Action, c)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func configureOnlyoffice(cfg *config.Config) *config.Config {
|
||||
cfg.Onlyoffice.Log.Level = cfg.Log.Level
|
||||
cfg.Onlyoffice.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Onlyoffice.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Onlyoffice.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Onlyoffice.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Onlyoffice.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Onlyoffice.Tracing.Collector = cfg.Tracing.Collector
|
||||
}
|
||||
|
||||
return cfg
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(OnlyofficeCommand)
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
konnectd "github.com/owncloud/ocis/konnectd/pkg/config"
|
||||
phoenix "github.com/owncloud/ocis/ocis-phoenix/pkg/config"
|
||||
ocs "github.com/owncloud/ocis/ocs/pkg/config"
|
||||
onlyoffice "github.com/owncloud/ocis/onlyoffice/pkg/config"
|
||||
proxy "github.com/owncloud/ocis/proxy/pkg/config"
|
||||
settings "github.com/owncloud/ocis/settings/pkg/config"
|
||||
storage "github.com/owncloud/ocis/storage/pkg/config"
|
||||
@@ -70,19 +71,20 @@ type Config struct {
|
||||
TokenManager TokenManager
|
||||
|
||||
Accounts *accounts.Config
|
||||
GLAuth *glauth.Config
|
||||
Graph *graph.Config
|
||||
GraphExplorer *graphExplorer.Config
|
||||
GLAuth *glauth.Config
|
||||
Hello *hello.Config
|
||||
Konnectd *konnectd.Config
|
||||
OCS *ocs.Config
|
||||
Onlyoffice *onlyoffice.Config
|
||||
Phoenix *phoenix.Config
|
||||
Proxy *proxy.Config
|
||||
Settings *settings.Config
|
||||
Storage *storage.Config
|
||||
Store *store.Config
|
||||
Thumbnails *thumbnails.Config
|
||||
WebDAV *webdav.Config
|
||||
Settings *settings.Config
|
||||
Store *store.Config
|
||||
Runtime *pman.Config
|
||||
}
|
||||
|
||||
@@ -90,19 +92,20 @@ type Config struct {
|
||||
func New() *Config {
|
||||
return &Config{
|
||||
Accounts: accounts.New(),
|
||||
GLAuth: glauth.New(),
|
||||
Graph: graph.New(),
|
||||
GraphExplorer: graphExplorer.New(),
|
||||
Hello: hello.New(),
|
||||
Konnectd: konnectd.New(),
|
||||
OCS: ocs.New(),
|
||||
Onlyoffice: onlyoffice.New(),
|
||||
Phoenix: phoenix.New(),
|
||||
WebDAV: webdav.New(),
|
||||
Storage: storage.New(),
|
||||
GLAuth: glauth.New(),
|
||||
Proxy: proxy.New(),
|
||||
Thumbnails: thumbnails.New(),
|
||||
Settings: settings.New(),
|
||||
Storage: storage.New(),
|
||||
Store: store.New(),
|
||||
Thumbnails: thumbnails.New(),
|
||||
WebDAV: webdav.New(),
|
||||
Runtime: pman.NewConfig(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,14 +33,16 @@ var (
|
||||
|
||||
// Extensions are ocis extension services
|
||||
Extensions = []string{
|
||||
"proxy",
|
||||
"store",
|
||||
"settings",
|
||||
"phoenix",
|
||||
"glauth",
|
||||
"graph",
|
||||
"graph-explorer",
|
||||
"konnectd",
|
||||
"ocs",
|
||||
"webdav",
|
||||
"onlyoffice",
|
||||
"phoenix",
|
||||
"proxy",
|
||||
"settings",
|
||||
"store",
|
||||
"storage-frontend",
|
||||
"storage-gateway",
|
||||
"storage-userprovider",
|
||||
@@ -50,9 +52,8 @@ var (
|
||||
"storage-users",
|
||||
"storage-metadata",
|
||||
"storage-public-link",
|
||||
"glauth",
|
||||
"konnectd",
|
||||
"thumbnails",
|
||||
"webdav",
|
||||
}
|
||||
|
||||
// There seem to be a race condition when reva-sharing needs to read the sharing.json file and the parent folder is not present.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "Configuration"
|
||||
date: "{{ date "2006-01-02T15:04:05-0700" now }}"
|
||||
weight: 20
|
||||
weight: 2
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/ocis/templates
|
||||
geekdocFilePath: CONFIGURATION.tmpl
|
||||
@@ -25,7 +25,7 @@ geekdocFilePath: CONFIGURATION.tmpl
|
||||
|
||||
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/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.
|
||||
Each extension has its dedicated documentation page (e.g. [proxy configuration]({{"{{"}}< relref "../extensions/accounts/configuration.md" >{{"}}"}})) 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
|
||||
|
||||
|
||||
@@ -23,10 +23,6 @@ geekdocFilePath: CONFIGURATION.tmpl
|
||||
|
||||
## 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_ocs/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:
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"amd": true
|
||||
},
|
||||
"extends": [
|
||||
"standard",
|
||||
"plugin:vue/essential"
|
||||
],
|
||||
"parserOptions": {
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,141 @@
|
||||
SHELL := bash
|
||||
NAME := onlyoffice
|
||||
IMPORT := github.com/owncloud/ocis/$(NAME)
|
||||
BIN := bin
|
||||
DIST := dist
|
||||
HUGO := hugo
|
||||
|
||||
ifeq ($(OS), Windows_NT)
|
||||
EXECUTABLE := $(NAME).exe
|
||||
UNAME := Windows
|
||||
else
|
||||
EXECUTABLE := $(NAME)
|
||||
UNAME := $(shell uname -s)
|
||||
endif
|
||||
|
||||
ifeq ($(UNAME), Darwin)
|
||||
GOBUILD ?= go build -i
|
||||
else
|
||||
GOBUILD ?= go build
|
||||
endif
|
||||
|
||||
PACKAGES ?= $(shell go list ./...)
|
||||
SOURCES ?= $(shell find . -name "*.go" -type f -not -path "./node_modules/*")
|
||||
GENERATE ?= $(PACKAGES)
|
||||
|
||||
TAGS ?=
|
||||
|
||||
ifndef OUTPUT
|
||||
ifneq ($(DRONE_TAG),)
|
||||
OUTPUT ?= $(subst v,,$(DRONE_TAG))
|
||||
else
|
||||
OUTPUT ?= testing
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef VERSION
|
||||
ifneq ($(DRONE_TAG),)
|
||||
VERSION ?= $(subst v,,$(DRONE_TAG))
|
||||
else
|
||||
VERSION ?= $(shell git rev-parse --short HEAD)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef DATE
|
||||
DATE := $(shell date -u '+%Y%m%d')
|
||||
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
|
||||
all: build
|
||||
|
||||
.PHONY: sync
|
||||
sync:
|
||||
go mod download
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
go clean -i ./...
|
||||
rm -rf $(BIN) $(DIST)
|
||||
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
gofmt -s -w $(SOURCES)
|
||||
|
||||
.PHONY: vet
|
||||
vet:
|
||||
go vet $(PACKAGES)
|
||||
|
||||
.PHONY: staticcheck
|
||||
staticcheck:
|
||||
go run honnef.co/go/tools/cmd/staticcheck -tags '$(TAGS)' $(PACKAGES)
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
for PKG in $(PACKAGES); do go run golang.org/x/lint/golint -set_exit_status $$PKG || exit 1; done;
|
||||
|
||||
.PHONY: generate
|
||||
generate:
|
||||
go generate $(GENERATE)
|
||||
|
||||
.PHONY: changelog
|
||||
changelog:
|
||||
go run github.com/restic/calens >| CHANGELOG.md
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
go run github.com/haya14busa/goverage -v -coverprofile coverage.out $(PACKAGES)
|
||||
|
||||
.PHONY: install
|
||||
install: $(SOURCES)
|
||||
go install -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' ./cmd/$(NAME)
|
||||
|
||||
.PHONY: build
|
||||
build: $(BIN)/$(EXECUTABLE) $(BIN)/$(EXECUTABLE)-debug
|
||||
|
||||
$(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)
|
||||
|
||||
.PHONY: release
|
||||
release: release-dirs release-linux release-windows release-darwin release-copy release-check
|
||||
|
||||
.PHONY: release-dirs
|
||||
release-dirs:
|
||||
mkdir -p $(DIST)/binaries $(DIST)/release
|
||||
|
||||
.PHONY: release-linux
|
||||
release-linux: release-dirs
|
||||
go run github.com/mitchellh/gox -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'linux' -arch 'amd64 386 arm64 arm' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
|
||||
|
||||
.PHONY: release-windows
|
||||
release-windows: release-dirs
|
||||
go run github.com/mitchellh/gox -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'windows' -arch 'amd64' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
|
||||
|
||||
.PHONY: release-darwin
|
||||
release-darwin: release-dirs
|
||||
go run github.com/mitchellh/gox -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -os 'darwin' -arch 'amd64' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
|
||||
|
||||
.PHONY: release-copy
|
||||
release-copy:
|
||||
$(foreach file,$(wildcard $(DIST)/binaries/$(EXECUTABLE)-*),cp $(file) $(DIST)/release/$(notdir $(file));)
|
||||
|
||||
.PHONY: release-check
|
||||
release-check:
|
||||
cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;)
|
||||
|
||||
.PHONY: release-finish
|
||||
release-finish: release-copy release-check
|
||||
|
||||
.PHONY: config-docs-generate
|
||||
config-docs-generate:
|
||||
go run github.com/owncloud/flaex >| ../docs/extensions/$(NAME)/configuration.md
|
||||
|
||||
.PHONY: watch
|
||||
watch:
|
||||
go run github.com/cespare/reflex -c reflex.conf
|
||||
@@ -0,0 +1,13 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/owncloud/ocis/onlyoffice/pkg/command"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := command.Execute(); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"debug": {
|
||||
"addr": "0.0.0.0:9224",
|
||||
"token": "",
|
||||
"pprof": false,
|
||||
"zpages": false
|
||||
},
|
||||
"http": {
|
||||
"addr": "0.0.0.0:9220"
|
||||
},
|
||||
"tracing": {
|
||||
"enabled": false,
|
||||
"type": "jaeger",
|
||||
"endpoint": "localhost:6831",
|
||||
"collector": "http://localhost:14268/api/traces",
|
||||
"service": "onlyoffice"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
debug:
|
||||
addr: 0.0.0.0:9224
|
||||
token:
|
||||
pprof: false
|
||||
zpages: false
|
||||
|
||||
http:
|
||||
addr: 0.0.0.0:9220
|
||||
|
||||
tracing:
|
||||
enabled: false
|
||||
type: jaeger
|
||||
endpoint: localhost:6831
|
||||
collector: http://localhost:14268/api/traces
|
||||
service: onlyoffice
|
||||
|
||||
...
|
||||
@@ -0,0 +1,19 @@
|
||||
FROM amd64/alpine:edge
|
||||
|
||||
RUN apk update && \
|
||||
apk upgrade && \
|
||||
apk add ca-certificates mailcap && \
|
||||
rm -rf /var/cache/apk/* && \
|
||||
echo 'hosts: files dns' >| /etc/nsswitch.conf
|
||||
|
||||
LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
|
||||
org.label-schema.name="oCIS Onlyoffice" \
|
||||
org.label-schema.vendor="ownCloud GmbH" \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
EXPOSE 9220 9224
|
||||
|
||||
ENTRYPOINT ["/usr/bin/ocis-onlyoffice"]
|
||||
CMD ["server"]
|
||||
|
||||
COPY bin/ocis-onlyoffice /usr/bin/ocis-onlyoffice
|
||||
@@ -0,0 +1,19 @@
|
||||
FROM arm32v6/alpine:edge
|
||||
|
||||
RUN apk update && \
|
||||
apk upgrade && \
|
||||
apk add ca-certificates mailcap && \
|
||||
rm -rf /var/cache/apk/* && \
|
||||
echo 'hosts: files dns' >| /etc/nsswitch.conf
|
||||
|
||||
LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
|
||||
org.label-schema.name="oCIS Onlyoffice" \
|
||||
org.label-schema.vendor="ownCloud GmbH" \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
EXPOSE 9220 9224
|
||||
|
||||
ENTRYPOINT ["/usr/bin/ocis-onlyoffice"]
|
||||
CMD ["server"]
|
||||
|
||||
COPY bin/ocis-onlyoffice /usr/bin/ocis-onlyoffice
|
||||
@@ -0,0 +1,19 @@
|
||||
FROM arm64v8/alpine:edge
|
||||
|
||||
RUN apk update && \
|
||||
apk upgrade && \
|
||||
apk add ca-certificates mailcap && \
|
||||
rm -rf /var/cache/apk/* && \
|
||||
echo 'hosts: files dns' >| /etc/nsswitch.conf
|
||||
|
||||
LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
|
||||
org.label-schema.name="oCIS Onlyoffice" \
|
||||
org.label-schema.vendor="ownCloud GmbH" \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
EXPOSE 9220 9224
|
||||
|
||||
ENTRYPOINT ["/usr/bin/ocis-onlyoffice"]
|
||||
CMD ["server"]
|
||||
|
||||
COPY bin/ocis-onlyoffice /usr/bin/ocis-onlyoffice
|
||||
@@ -0,0 +1,22 @@
|
||||
image: owncloud/ocis-onlyoffice:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||
{{#if build.tags}}
|
||||
tags:
|
||||
{{#each build.tags}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
manifests:
|
||||
- image: owncloud/ocis-onlyoffice:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
||||
- image: owncloud/ocis-onlyoffice:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
|
||||
platform:
|
||||
architecture: arm64
|
||||
variant: v8
|
||||
os: linux
|
||||
- image: owncloud/ocis-onlyoffice:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
|
||||
platform:
|
||||
architecture: arm
|
||||
variant: v6
|
||||
os: linux
|
||||
@@ -0,0 +1,24 @@
|
||||
module github.com/owncloud/ocis/onlyoffice
|
||||
|
||||
go 1.13
|
||||
|
||||
require (
|
||||
contrib.go.opencensus.io/exporter/jaeger v0.2.1
|
||||
contrib.go.opencensus.io/exporter/ocagent v0.6.0
|
||||
contrib.go.opencensus.io/exporter/zipkin v0.1.1
|
||||
github.com/UnnoTed/fileb0x v1.1.4
|
||||
github.com/go-chi/chi v4.1.2+incompatible
|
||||
github.com/micro/cli/v2 v2.1.2
|
||||
github.com/oklog/run v1.1.0
|
||||
github.com/openzipkin/zipkin-go v0.2.2
|
||||
github.com/owncloud/ocis/ocis-pkg v0.0.0-20200918114005-1a0ddd2190ee
|
||||
github.com/restic/calens v0.2.0
|
||||
github.com/spf13/viper v1.7.0
|
||||
go.opencensus.io v0.22.5
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202
|
||||
)
|
||||
|
||||
replace (
|
||||
github.com/owncloud/ocis/ocis-pkg => ../ocis-pkg
|
||||
google.golang.org/grpc => google.golang.org/grpc v1.26.0
|
||||
)
|
||||
+1672
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "onlyoffice",
|
||||
"version": "0.0.0",
|
||||
"description": "",
|
||||
"homepage": "https://github.com/owncloud/ocis/onlyoffice#readme",
|
||||
"license": "Apache-2.0",
|
||||
"author": "ownCloud GmbH <devops@owncloud.com>",
|
||||
"repository": "https://github.com/owncloud/ocis/onlyoffice.git",
|
||||
"bugs": {
|
||||
"url": "https://github.com/owncloud/ocis/onlyoffice/issues",
|
||||
"email": "support@owncloud.com"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint ui/**/*.js --color --global require",
|
||||
"build": "rollup -c",
|
||||
"watch": "rollup -c -w",
|
||||
"test": "echo 'Not implemented'",
|
||||
"generate-api": "node node_modules/swagger-vue-generator/bin/generate-api.js --package-version v0 --source pkg/proto/v0/hello.swagger.json --moduleName hello --destination ui/client/hello/index.js",
|
||||
"acceptance-tests": "cucumber-js --require-module @babel/register --require-module @babel/polyfill --require ${TEST_INFRA_DIRECTORY}/acceptance/setup.js --require ui/tests/acceptance/stepDefinitions --require ${TEST_INFRA_DIRECTORY}/acceptance/stepDefinitions --format node_modules/cucumber-pretty -t \"${TEST_TAGS:-not @skip and not @skipOnOC10}\""
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.7.7",
|
||||
"@babel/plugin-proposal-class-properties": "^7.7.4",
|
||||
"@babel/plugin-proposal-export-default-from": "^7.7.4",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.7.7",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
|
||||
"@babel/plugin-transform-runtime": "^7.8.0",
|
||||
"@babel/polyfill": "^7.10.1",
|
||||
"@babel/preset-env": "^7.7.7",
|
||||
"@babel/register": "^7.10.1",
|
||||
"@erquhart/rollup-plugin-node-builtins": "^2.1.5",
|
||||
"@rollup/plugin-commonjs": "^11.0.1",
|
||||
"@rollup/plugin-json": "^4.0.1",
|
||||
"@rollup/plugin-replace": "^2.3.0",
|
||||
"archiver": "^4.0.1",
|
||||
"axios": "^0.19.0",
|
||||
"core-js": "3",
|
||||
"cross-env": "^6.0.3",
|
||||
"cucumber": "^6.0.5",
|
||||
"cucumber-pretty": ">=6.0.0",
|
||||
"debounce": "^1.2.0",
|
||||
"easygettext": "^2.7.0",
|
||||
"eslint": "6.8.0",
|
||||
"eslint-config-standard": "^14.1.0",
|
||||
"eslint-plugin-import": "^2.17.3",
|
||||
"eslint-plugin-node": "11.0.0",
|
||||
"eslint-plugin-promise": "^4.1.1",
|
||||
"eslint-plugin-standard": "^4.0.0",
|
||||
"eslint-plugin-vue": "^6.1.2",
|
||||
"fs-extra": "^9.0.1",
|
||||
"join-path": "^1.1.1",
|
||||
"ldap": "^0.7.1",
|
||||
"nightwatch": "^1.3.6",
|
||||
"nightwatch-api": "^3.0.1",
|
||||
"node-fetch": "^2.6.1",
|
||||
"qs": "^6.9.1",
|
||||
"rimraf": "^3.0.0",
|
||||
"rollup": "^1.28.0",
|
||||
"rollup-plugin-babel": "^4.3.3",
|
||||
"rollup-plugin-eslint": "^7.0.0",
|
||||
"rollup-plugin-filesize": "^6.2.1",
|
||||
"rollup-plugin-node-globals": "^1.4.0",
|
||||
"rollup-plugin-node-resolve": "^5.2.0",
|
||||
"rollup-plugin-serve": "^1.1.0",
|
||||
"rollup-plugin-terser": "^5.1.3",
|
||||
"rollup-plugin-vue": "^5.1.4",
|
||||
"swagger-vue-generator": "^1.0.6",
|
||||
"url-search-params-polyfill": "^8.1.0",
|
||||
"vue-template-compiler": "2.6.12",
|
||||
"xml-js": "^1.6.11"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"not dead",
|
||||
"not IE 11"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package assets
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/onlyoffice/pkg/config"
|
||||
)
|
||||
|
||||
//go:generate go run github.com/UnnoTed/fileb0x embed.yml
|
||||
|
||||
// assets gets initialized by New and provides the handler.
|
||||
type assets struct {
|
||||
logger log.Logger
|
||||
config *config.Config
|
||||
}
|
||||
|
||||
// Open just implements the HTTP filesystem interface.
|
||||
func (a assets) Open(original string) (http.File, error) {
|
||||
if a.config.Asset.Path != "" {
|
||||
if stat, err := os.Stat(a.config.Asset.Path); err == nil && stat.IsDir() {
|
||||
custom := path.Join(
|
||||
a.config.Asset.Path,
|
||||
original,
|
||||
)
|
||||
|
||||
if _, err := os.Stat(custom); !os.IsNotExist(err) {
|
||||
f, err := os.Open(custom)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return f, nil
|
||||
}
|
||||
} else {
|
||||
a.logger.Warn().
|
||||
Str("path", a.config.Asset.Path).
|
||||
Msg("Assets directory doesn't exist")
|
||||
}
|
||||
}
|
||||
|
||||
return FS.OpenFile(
|
||||
CTX,
|
||||
original,
|
||||
os.O_RDONLY,
|
||||
0644,
|
||||
)
|
||||
}
|
||||
|
||||
// New returns a new http filesystem to serve assets.
|
||||
func New(opts ...Option) http.FileSystem {
|
||||
options := newOptions(opts...)
|
||||
|
||||
return assets{
|
||||
config: options.Config,
|
||||
logger: options.Logger,
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user