-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improves installation and docs (#855)
- Adds docker compose for secure hosting of application - Fixes problems with pdf rendering of docs. The problem is to the images not being able to fit in one page of pdf document. - Improves docs for CLI and https installation
- Loading branch information
1 parent
d83f95a
commit a8d9a76
Showing
26 changed files
with
1,678 additions
and
1,305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ INTO-CPS-Association Digital Twins as a Service. | |
Please visit and download the | ||
[DTaaS Software](https://github.com/INTO-CPS-Association/DTaaS). | ||
|
||
The DTaaS service with base users and essential | ||
The DTaaS application with base users and essential | ||
containers should be up and running before using the CLI. | ||
|
||
## Installation | ||
|
@@ -58,6 +58,25 @@ server-dns = "localhost" | |
path = "/home/Desktop/DTaaS" | ||
``` | ||
|
||
### Select Template | ||
|
||
The _cli_ uses YAML templates provided in this directory to create | ||
new user workspaces. The templates are: | ||
|
||
1. _user.local.yml_: localhost installation | ||
1. _User.server.yml_: multi-user web application application over HTTP | ||
1. _user.server.secure.yml_: multi-user web application application over HTTPS | ||
|
||
Please note that the _cli_ is not capable of detecting the difference between | ||
HTTP and HTTPS modes of web application. Thus if you are serving | ||
web application over HTTPS, please do one extra step. | ||
|
||
```bash | ||
cp user.server.secure.yml user.server.yml | ||
``` | ||
|
||
This will change the user template from insecure to secure. | ||
|
||
### Add users | ||
|
||
To add new users using the CLI, fill in the | ||
|
@@ -71,13 +90,21 @@ usernames of the users to be added | |
add = ["username1","username2", "username3"] | ||
``` | ||
|
||
Make sure you are in the _cli_ directory. | ||
|
||
Then simply: | ||
|
||
```bash | ||
dtaas admin user add | ||
``` | ||
|
||
#### Caveat | ||
The command checks for the existence of `files/<username>` directory. | ||
If it does not exist, a new directory with correct file structure is created. | ||
The directory, if it exists, must be owned by the user executing | ||
**dtaas** command on the host operating system. If the files do not | ||
have the expected ownership rights, the command fails. | ||
|
||
#### Caveats | ||
|
||
This brings up the containers, without the AuthMS authentication. | ||
|
||
|
@@ -91,7 +118,7 @@ This brings up the containers, without the AuthMS authentication. | |
- Go to the _docker_ directory | ||
|
||
```bash | ||
cd <DTaaS>/docker | ||
cd <DTaaS>/deploy/docker | ||
``` | ||
|
||
- Add three lines to the `conf.server` file | ||
|
@@ -102,7 +129,7 @@ rule.onlyu3.rule=PathPrefix(`/user3`) | |
rule.onlyu3.whitelist = [email protected] | ||
``` | ||
|
||
Run the command for these changes to take effect: | ||
- Run the command for these changes to take effect: | ||
|
||
```bash | ||
docker compose -f compose.server.yml --env-file .env up -d --force-recreate traefik-forward-auth | ||
|
@@ -113,18 +140,27 @@ instance, with authorization enabled. | |
|
||
### Delete users | ||
|
||
TO delete existing users, fill in the _users.delete_ list in | ||
_dtaas_.toml_ with the Gitlab instance | ||
usernames of the users to be deleted. | ||
- To delete existing users, fill in the _users.delete_ list in | ||
_dtaas.toml_ with the Gitlab instance | ||
usernames of the users to be deleted. | ||
|
||
Make sure you are in the _cli_ directory. | ||
```toml | ||
[users] | ||
# matching user info must present in this config file | ||
delete = ["username1","username2", "username3"] | ||
``` | ||
|
||
- Make sure you are in the _cli_ directory. | ||
|
||
Then simply: | ||
|
||
```bash | ||
dtaas admin user delete | ||
``` | ||
|
||
- Remember to remove the rules for deleted users | ||
in _conf.server_. | ||
|
||
### Additional Points to Remember | ||
|
||
- The _user add_ CLI will add and start a | ||
|
@@ -138,3 +174,7 @@ dtaas admin user delete | |
- _user add_ and _user delete_ CLIs return an | ||
error if the _add_ and _delete_ lists in | ||
_dtaas.toml_ are empty, respectively. | ||
|
||
- '.' is a special character. Currently, usernames which have | ||
'.'s in them cannot be added properly through the CLI. | ||
This is an active issue that will be resolved in future releases. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
image: mltooling/ml-workspace-minimal:0.13.2 | ||
restart: unless-stopped | ||
volumes: | ||
- "${DTAAS_DIR}/files/common:/workspace/common" | ||
- "${DTAAS_DIR}/files/${username}:/workspace" | ||
environment: | ||
- AUTHENTICATE_VIA_JUPYTER= | ||
- WORKSPACE_BASE_URL=${username} | ||
shm_size: 512m | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.${username}.rule=Host(`${SERVER_DNS}`)&&PathPrefix(`/${username}`)" | ||
- "traefik.http.routers.${username}.tls=true" | ||
- "traefik.http.routers.${username}.middlewares=traefik-forward-auth" | ||
networks: | ||
- users |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.