Skip to content

Commit

Permalink
working setup
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
  • Loading branch information
butonic committed Aug 25, 2020
1 parent 0365a65 commit a81b660
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
15 changes: 11 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,22 @@ services:
REVA_LDAP_IDP: 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_DRIVER: eos
REVA_STORAGE_EOS_DATA_DRIVER: eos
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: ""
REVA_STORAGE_EOS_LAYOUT: "{{substr 0 1 .Id.OpaqueId}}/{{.Id.OpaqueId}}"
REVA_FRONTEND_URL: https://${OCIS_DOMAIN:-localhost}:9200
REVA_DATAGATEWAY_URL: https://${OCIS_DOMAIN:-localhost}:9200/data

# TODO dav/files namespace is broken because it should use /home not /oc or /eos
# in ocdav check if dav/files/<userid> = the current users id,
# when true -> /home
# when false -> /eos/{{substr 0 1 .Id.OpaqueId}}/{{.Id.OpaqueId}}
# TODO split docker compose files into dedicated eos and owncloud driver setups
# TODO clarify env vars for EOS DRIVER vs EOS PROVIDER specific configuration
# TODO update names.md file with this scenario

mgm-master:
container_name: mgm-master
image: owncloud/eos-mgm:4.6.5
Expand Down
17 changes: 4 additions & 13 deletions docs/eos.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,35 +55,26 @@ docker-compose exec ocis ./bin/ocis run reva-users

### 3. Home storage

Kill the home storage. By default it uses the `owncloud` storage driver. We need to switch it to the `eoshome` driver:
Kill the home storage. By default it uses the `owncloud` storage driver. We need to switch it to the `eoshome` driver and make it use the storage id of the eos storage provider:

```
docker-compose exec ocis ./bin/ocis kill reva-storage-home
docker-compose exec -e REVA_STORAGE_EOS_LAYOUT="{{substr 0 1 .Id.OpaqueId}}/{{.Id.OpaqueId}}" -e REVA_STORAGE_HOME_DRIVER=eoshome -e REVA_STORAGE_HOME_MOUNT_ID=1284d238-aa92-42ce-bdc4-0b0000009158 ocis ./bin/ocis run reva-storage-home
docker-compose exec -e REVA_STORAGE_HOME_DRIVER=eoshome -e REVA_STORAGE_HOME_MOUNT_ID=1284d238-aa92-42ce-bdc4-0b0000009158 ocis ./bin/ocis run reva-storage-home
```

### 4. Home data provider

Kill the home data provider. By default it uses the `owncloud` storage driver. We need to switch it to the `eoshome` driver:
Kill the home data provider. By default it uses the `owncloud` storage driver. We need to switch it to the `eoshome` driver and make it use the storage id of the eos storage provider:

```
docker-compose exec ocis ./bin/ocis kill reva-storage-home-data
docker-compose exec -e REVA_STORAGE_EOS_LAYOUT="{{substr 0 1 .Id.OpaqueId}}/{{.Id.OpaqueId}}" -e REVA_STORAGE_HOME_DRIVER=eoshome -e REVA_STORAGE_HOME_MOUNT_ID=1284d238-aa92-42ce-bdc4-0b0000009158 ocis ./bin/ocis run reva-storage-home-data
docker-compose exec -e REVA_STORAGE_HOME_DRIVER=eoshome -e REVA_STORAGE_HOME_MOUNT_ID=1284d238-aa92-42ce-bdc4-0b0000009158 ocis ./bin/ocis run reva-storage-home-data
```

{{< hint info >}}
The difference between the *home storage* and the *home data provider* are that the former is responsible for metadata changes while the latter is responsible for actual data transfer. The *home storage* uses the cs3 api to manage a folder hierarchy, while the *home data provider* is responsible for moving bytes to and from the storage.
{{< /hint >}}

### 4. Frontend files namespace

Restart the reva frontend with a new namespace (pointing to the eos storage provider) for the dav files endpoint

```
docker-compose exec ocis ./bin/ocis kill reva-frontend
docker-compose exec -e DAV_FILES_NAMESPACE="/eos/{{substr 0 1 .Id.OpaqueId}}" ocis ./bin/ocis run reva-frontend
```

## Verification

Login with `einstein / relativity`, upload a file to einsteins home and verify the file is there using
Expand Down

0 comments on commit a81b660

Please sign in to comment.