Merge branch 'ocis-init' of github.com:owncloud/ocis into ocis-init

This commit is contained in:
Christian Richter
2022-04-29 11:56:10 +02:00
8 changed files with 47 additions and 35 deletions

View File

@@ -19,9 +19,10 @@ Make sure you've cloned the [web frontend repo](https://github.com/owncloud/web/
{{< hint info >}}
For now, an IDP configuration file gets generated once and will fail upon changing the oCIS url as done below. To avoid any clashes, remove this file before starting the tests:
```
```bash
rm ~/.ocis/idp/identifier-registration.yaml
```
{{< /hint >}}
### In the web repo
@@ -30,7 +31,7 @@ rm ~/.ocis/idp/identifier-registration.yaml
Install dependencies and bundle the frontend with a watcher by running
```
```bash
yarn && yarn build:w
```
@@ -40,7 +41,7 @@ If you skip the step above, the currently bundled frontend from the oCIS binary
Start the necessary acceptance test services by using Docker (Compose):
```
```bash
docker compose up selenium middleware-ocis vnc
```
@@ -50,7 +51,7 @@ docker compose up selenium middleware-ocis vnc
Navigate into the accounts service via `cd ../accounts/` and install dependencies and build the bundled accounts UI with a watcher by running
```
```bash
yarn && yarn watch
```
@@ -58,13 +59,14 @@ yarn && yarn watch
Navigate into the oCIS directory inside the oCIS repository and build the oCIS binary by running
```
```bash
make clean build
```
Then, start oCIS from the binary via
```
```bash
./bin/ocis init
OCIS_URL=https://host.docker.internal:9200 OCIS_INSECURE=true PROXY_ENABLE_BASIC_AUTH=true WEB_UI_CONFIG=../../web/dev/docker/ocis.web.config.json ./bin/ocis server
```
@@ -78,6 +80,6 @@ If you want visual feedback on the test run, visit http://host.docker.internal:6
Navigate into the accounts service via `cd ../accounts/` and start the acceptance tests by running
```
```bash
SERVER_HOST=https://host.docker.internal:9200 BACKEND_HOST=https://host.docker.internal:9200 RUN_ON_OCIS=true NODE_TLS_REJECT_UNAUTHORIZED=0 WEB_PATH=../../web WEB_UI_CONFIG=../../web/tests/drone/config-ocis.json MIDDLEWARE_HOST=http://host.docker.internal:3000 ./ui/tests/run-acceptance-test.sh ./ui/tests/acceptance/features/
```

View File

@@ -45,6 +45,6 @@ export STORAGE_LDAP_BIND_DN="uid=reva,ou=sysusers,o=libregraph-idm"
export STORAGE_LDAP_BIND_PASSWORD=reva
export OCIS_RUN_EXTENSIONS=settings,storage-metadata,graph,graph-explorer,ocs,store,thumbnails,web,webdav,storage-frontend,storage-gateway,storage-userprovider,storage-groupprovider,storage-authbasic,storage-authbearer,storage-authmachine,storage-users,storage-shares,storage-public-link,storage-appprovider,storage-sharing,proxy,idp,nats,idm,ocdav
export OCIS_INSECURE=true
ocis init
bin/ocis server
```

View File

@@ -19,9 +19,10 @@ Make sure you've cloned the [web frontend repo](https://github.com/owncloud/web/
{{< hint info >}}
For now, an IDP configuration file gets generated once and will fail upon changing the oCIS url as done below. To avoid any clashes, remove this file before starting the tests:
```
```bash
rm ~/.ocis/idp/identifier-registration.yaml
```
{{< /hint >}}
### In the web repo
@@ -30,7 +31,7 @@ rm ~/.ocis/idp/identifier-registration.yaml
Install dependencies and bundle the frontend with a watcher by running
```
```bash
yarn && yarn build:w
```
@@ -40,7 +41,7 @@ If you skip the step above, the currently bundled frontend from the oCIS binary
Start the necessary acceptance test services by using Docker (Compose):
```
```bash
docker compose up selenium middleware-ocis vnc
```
@@ -50,7 +51,7 @@ docker compose up selenium middleware-ocis vnc
Navigate into the settings service via `cd ../settings/` and install dependencies and build the bundled settings UI with a watcher by running
```
```bash
yarn && yarn watch
```
@@ -58,13 +59,14 @@ yarn && yarn watch
Navigate into the oCIS directory inside the oCIS repository and build the oCIS binary by running
```
```bash
make clean build
```
Then, start oCIS from the binary via
```
```bash
ocis init
OCIS_URL=https://host.docker.internal:9200 OCIS_INSECURE=true PROXY_ENABLE_BASIC_AUTH=true WEB_UI_CONFIG=../../web/dev/docker/ocis.web.config.json ./bin/ocis server
```
@@ -78,6 +80,6 @@ If you want visual feedback on the test run, visit http://host.docker.internal:6
Navigate into the settings service via `cd ../settings/` and start the acceptance tests by running
```
```bash
SERVER_HOST=https://host.docker.internal:9200 BACKEND_HOST=https://host.docker.internal:9200 RUN_ON_OCIS=true NODE_TLS_REJECT_UNAUTHORIZED=0 WEB_PATH=../../web WEB_UI_CONFIG=../../web/tests/drone/config-ocis.json MIDDLEWARE_HOST=http://host.docker.internal:3000 ./ui/tests/run-acceptance-test.sh ./ui/tests/acceptance/features/
```

View File

@@ -39,11 +39,10 @@ WantedBy=multi-user.target
For reasons of simplicity we are using the root user and group to run oCIS which is not recommended. Please use a non-root user in production environments and modify the oCIS service definition accordingly.
In the service definition we referenced `/etc/ocis/ocis.env` as our file containing environment variables for the oCIS process.
In order to create the file we need first to create the folder `/etc/ocis/` and then we can add the actual `/etc/ocis/ocis.env` with following content:
```
```bash
OCIS_URL=https://some-hostname-or-ip:9200
PROXY_HTTP_ADDR=0.0.0.0:9200
OCIS_INSECURE=false
@@ -60,9 +59,10 @@ Please change your `OCIS_URL` in order to reflect your actual deployment. If you
oCIS will store all data in `/var/lib/ocis`, because we configured it so by setting `OCIS_BASE_DATA_PATH`. Therefore you need to create that directory and make it accessible to the user, you use to start oCIS.
## Starting the oCIS service
Initialize the oCIS configuration by running `OCIS_CONFIG_DIR=/etc/ocis ocis init`.
You can enable oCIS now by running `systemctl enable --now ocis`. It will ensure that oCIS also is restarted after a reboot of the host.
If you need to restart oCIS because of configuration changes in `/etc/ocis/ocis.env`, run `systemctl restart ocis`.

View File

@@ -89,7 +89,7 @@ We are using the ownCloud 10 acceptance test suite against oCIS.
All you need to do to get the acceptance tests is check out the core repo:
```
```bash
git clone https://github.com/owncloud/core.git
```
@@ -97,7 +97,8 @@ git clone https://github.com/owncloud/core.git
To start ocis:
```
```bash
ocis init
OCIS_INSECURE=true PROXY_ENABLE_BASIC_AUTH=true bin/ocis server
```
@@ -108,12 +109,13 @@ OCIS_INSECURE=true PROXY_ENABLE_BASIC_AUTH=true bin/ocis server
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:
```
```bash
git clone https://github.com/owncloud/testing apps/testing
```
Then run the api acceptance tests with the following command from the root of the ownCloud 10 core repository:
```
```bash
make test-acceptance-api \
TEST_SERVER_URL=https://localhost:9200 \
TEST_OCIS=true \
@@ -153,7 +155,7 @@ If you want to work on a specific issue
E.g.:
```
```bash
make test-acceptance-api \
TEST_SERVER_URL=https://localhost:9200 \
TEST_OCIS=true \
@@ -174,7 +176,8 @@ If you want to work on a specific issue
Instruction on setup is available [here](https://owncloud.dev/ocis/deployment/oc10_ocis_parallel/#local-setup)
Edit the `.env` file and uncomment this line:
```
```bash
COMPOSE_FILE=docker-compose.yml:testing/docker-compose-additions.yml
```

View File

@@ -95,6 +95,12 @@ Open [https://localhost:9200](https://localhost:9200) and [login using one of th
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]({{< ref "#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]({{< ref "../config" >}}).
To initialize the oCIS configuration:
{{< highlight txt >}}
ocis init
{{< / highlight >}}
To start oCIS server:
{{< highlight txt >}}

View File

@@ -16,13 +16,13 @@ To create the demo users, run the initial setup step with an additional environm
Following users are available in the demo set:
| username | password | email | role | groups |
| --------- | ------------- | --------------------- | ----------- | ----------------------------------------------------------------------- |
| admin | admin | admin@example.org | admin | users |
| einstein | relativity | einstein@example.org | user | users, philosophy-haters, physics-lovers, sailing-lovers, violin-haters |
| marie | radioactivity | marie@example.org | user | users, physics-lovers, polonium-lovers, radium-lovers |
| moss | vista | moss@example.org | admin | users |
| richard | superfluidity | richard@example.org | user | users, philosophy-haters, physics-lovers, quantum-lovers |
| katherine | gemini | katherine@example.org | space admin | users, sailing-lovers, physics-lovers, quantum-lovers |
| username | password | email | role | groups |
| --------- | ----------------------------------------- | --------------------- | ----------- | ----------------------------------------------------------------------- |
| admin | admin or the one generated by `ocis init` | admin@example.org | admin | users |
| einstein | relativity | einstein@example.org | user | users, philosophy-haters, physics-lovers, sailing-lovers, violin-haters |
| marie | radioactivity | marie@example.org | user | users, physics-lovers, polonium-lovers, radium-lovers |
| moss | vista | moss@example.org | admin | users |
| richard | superfluidity | richard@example.org | user | users, philosophy-haters, physics-lovers, quantum-lovers |
| katherine | gemini | katherine@example.org | space admin | users, sailing-lovers, physics-lovers, quantum-lovers |
You may also want to run oCIS with only your custom users by [deleting the demo users]({{< ref "../deployment#delete-demo-users" >}}).

View File

@@ -53,12 +53,11 @@ The oCIS server can be instructed to set up the decomposed FS at a certain path
The test setup started an oCIS tech preview single binary release using this start command:
```
```bash
ocis init
OCIS_BASE_DATA_PATH=/mnt/ocisdata/ OCIS_LOG_LEVEL=debug OCIS_INSECURE=true PROXY_HTTP_ADDR=0.0.0.0:9200 OCIS_URL=https://hostname:9200 ./ocis-1.18.0-linux-amd64 server
```
This starts oCIS and a decomposed FS skeleton file system structure is set up on the NFS share.
The oCIS instance is passing a smoke test.