Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial docker-compose.yml for developers #349

Merged
merged 7 commits into from
Jul 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions config/eos-docker.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
EOS_MQ_URL=mq-master.testnet
EOS_MGM_ALIAS=mgm-master.testnet
EOS_QDB_NODES=quark-1.testnet:7777 quark-2.testnet:7777 quark-3.testnet:7777
EOS_LDAP_HOST=ocis.testnet:9125
EOS_GEOTAG=test
EOS_INSTANCE_NAME=eostest
EOS_MAIL_CC=eos@localhost
EOS_USE_QDB=1
EOS_USE_QDB_MASTER=1
EOS_NS_ACCOUNTING=1
EOS_SYNCTIME_ACCOUNTING=1
EOS_UTF8=1
159 changes: 159 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
---
version: '3.5'

networks:
testnet:
name: testnet

services:
ocis:
container_name: ocis
image: owncloud/eos-ocis-dev:latest
tty: true
privileged: true
stdin_open: true
ports:
- 9200:9200
env_file:
- ./config/eos-docker.env
hostname: ocis
networks:
- testnet
volumes:
- .:/ocis
- ../ocis-reva:/ocis-reva
- ../reva:/reva
environment:
EOS_MGM_URL: ${EOS_MGM_URL:-root://mgm-master.testnet:1094}
OCIS_DOMAIN: ${OCIS_DOMAIN:-localhost}
KONNECTD_ISS: https://${OCIS_DOMAIN:-localhost}:9200
KONNECTD_LOG_LEVEL: debug
KONNECTD_TLS: '0'
PHOENIX_OIDC_AUTHORITY: https://${OCIS_DOMAIN:-localhost}:9200
PHOENIX_OIDC_METADATA_URL: https://${OCIS_DOMAIN:-localhost}:9200/.well-known/openid-configuration
PHOENIX_WEB_CONFIG_SERVER: https://${OCIS_DOMAIN:-localhost}:9200
PROXY_HTTP_ADDR: 0.0.0.0:9200
REVA_OIDC_ISSUER: https://${OCIS_DOMAIN:-localhost}:9200
OCIS_LOG_LEVEL: debug
REVA_TRANSFER_EXPIRES: 86400
REVA_STORAGE_EOS_DRIVER: eoshome
REVA_STORAGE_EOS_DATA_DRIVER: eoshome
REVA_STORAGE_EOS_NAMESPACE: "/eos/dockertest/reva/users"
REVA_STORAGE_EOS_MASTER_URL: ${EOS_MGM_URL:-root://mgm-master.testnet:1094}
REVA_STORAGE_EOS_SLAVE_URL: ${EOS_MGM_URL:-root://mgm-master.testnet:1094}
REVA_STORAGE_EOS_LAYOUT: "{{substr 0 1 .Username}}"

mgm-master:
container_name: mgm-master
image: owncloud/eos-mgm:4.6.5
tty: true
privileged: true
stdin_open: true
env_file:
- ./config/eos-docker.env
hostname: mgm-master.testnet
networks:
- testnet
volumes:
- ./e/master/var/log/eos:/var/log/eos
- ./e/master/var/eos/config:/var/eos/config
- ./e/master/var/eos/ns-queue:/var/eos/ns-queue
# this volume kills mgm-master during startup
# - ./e/master/var/eos/md:/var/eos/md
environment:
EOS_SET_MASTER: 1

mq-master:
container_name: mq-master
image: owncloud/eos-mq:4.6.5
tty: true
privileged: true
stdin_open: true
env_file:
- ./config/eos-docker.env
hostname: mq-master.testnet
networks:
- testnet
volumes:
- ./e/master/var/log/eos:/var/log/eos
- ./e/master/var/eos/config:/var/eos/config
- ./e/master/var/eos/ns-queue:/var/eos/ns-queue
environment:
EOS_SET_MASTER: 1

fst:
container_name: fst
image: owncloud/eos-fst:4.6.5
tty: true
privileged: true
stdin_open: true
env_file:
- ./config/eos-docker.env
hostname: fst.testnet
networks:
- testnet
volumes:
- ./e/master/var/log/eos:/var/log/eos
- ./e/disks:/disks
environment:
EOS_MGM_URL: "root://mgm-master.testnet"

quark-1:
container_name: quark-1
image: owncloud/eos-qdb:4.6.5
tty: true
privileged: true
stdin_open: true
env_file:
- ./config/eos-docker.env
hostname: quark-1.testnet
networks:
- testnet
volumes:
- ./e/quark-1/var/lib/quarkdb:/var/lib/quarkdb
environment:
EOS_QDB_DIR: "/var/lib/quarkdb/eosns"
EOS_QDB_PORT: "7777"
EOS_QDB_MODE: "raft"
EOS_QDB_CLUSTER_ID: "3d659c1a-e70f-43f0-bed4-941a2ca0765b"
EOS_QDB_NODES: "quark-1.testnet:7777,quark-2.testnet:7777,quark-3.testnet:7777"

quark-2:
container_name: quark-2
image: owncloud/eos-qdb:4.6.5
tty: true
privileged: true
stdin_open: true
env_file:
- ./config/eos-docker.env
hostname: quark-2.testnet
networks:
- testnet
volumes:
- ./e/quark-2/var/lib/quarkdb:/var/lib/quarkdb
environment:
EOS_QDB_DIR: "/var/lib/quarkdb/eosns"
EOS_QDB_PORT: "7777"
EOS_QDB_MODE: "raft"
EOS_QDB_CLUSTER_ID: "3d659c1a-e70f-43f0-bed4-941a2ca0765b"
EOS_QDB_NODES: "quark-1.testnet:7777,quark-2.testnet:7777,quark-3.testnet:7777"

quark-3:
container_name: quark-3
image: owncloud/eos-qdb:4.6.5
tty: true
privileged: true
stdin_open: true
env_file:
- ./config/eos-docker.env
hostname: quark-3.testnet
networks:
- testnet
volumes:
- ./e/quark-3/var/lib/quarkdb:/var/lib/quarkdb
environment:
EOS_QDB_DIR: "/var/lib/quarkdb/eosns"
EOS_QDB_PORT: "7777"
EOS_QDB_MODE: "raft"
EOS_QDB_CLUSTER_ID: "3d659c1a-e70f-43f0-bed4-941a2ca0765b"
EOS_QDB_NODES: "quark-1.testnet:7777,quark-2.testnet:7777,quark-3.testnet:7777"
80 changes: 80 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: "Getting Started with Development"
date: 2020-07-07T20:35:00+01:00
weight: 15
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs
geekdocFilePath: development.md
---

{{< toc >}}

## Docker dev environment

### Option 1: Plain docker

To build and run your local ocis code with default storage driver

```
docker run --rm -ti --name ocis -v $PWD:/ocis -p 9200:9200 owncloud/eos-ocis-dev
```

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`

To check the uploaded files start digging with: `docker exec -it ocis ls -l /var/tmp/reva/`

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


### Option 2: Docker compose

With the `docker-compose.yml` file in ocis repo you can also start ocis via compose:

```
docker-compose up -d ocis
```

{{< hint info >}}
We are only starting the `ocis` container here.
{{< /hint >}}

## Verification

Check the services are running

```
$ 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 |
+--------------------------+-----+
```
Loading