forked from INTO-CPS-Association/DTaaS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Astitva
committed
Mar 3, 2024
1 parent
97f757e
commit c691794
Showing
1 changed file
with
62 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,3 +166,65 @@ through the single page client now. | |
|
||
You may have to click Sign in to Gitlab on the Client page | ||
and authorize access to the shown application. | ||
|
||
## Adding a new user | ||
|
||
To add a new user to your DTaaS instance, follow these steps: | ||
|
||
- Add the user to your Gitlab instance. | ||
Note the username and email ID used in | ||
their Gitlab instance account. Consider the | ||
username to be `user4` and email ID to be | ||
`[email protected]` for the following discussion | ||
|
||
- Add a new ML workspace for the user | ||
in the compose.users.yml file. | ||
A sample user (user3) is shown there, | ||
to add more users, simply copy the entire | ||
`user3` service and paste it below. | ||
|
||
- Edit the required fields in the new | ||
ML workspace. This includes | ||
|
||
- Changing the service name from | ||
`user3` to `user4` | ||
- Changing `${username3}` to | ||
`${username4}` | ||
- Changing `...routers.u3...` in `labels` to | ||
`...routers.u4...` | ||
|
||
- Edit the `.env` file by adding a new username variable, | ||
like `username4=user4` | ||
|
||
- Add two lines to the `conf.local` file | ||
|
||
```txt | ||
rule.onlyu4.action=allow | ||
rule.onlyu4.rule=PathPrefix(`/user4`) | ||
``` | ||
|
||
- Add three lines to the `conf.server` file | ||
|
||
```txt | ||
rule.onlyu3.action=auth | ||
rule.onlyu3.rule=PathPrefix(`/user3`) | ||
rule.onlyu3.whitelist = [email protected] | ||
``` | ||
|
||
A new user is now added to the DTaaS instance. | ||
|
||
## Run with additional users | ||
|
||
To run the DTaaS instance with the additional users, use to commands: | ||
|
||
### Server deploy | ||
|
||
```bash | ||
docker compose -f compose.server.yml -f compose.users.yml --env-file .env up -d | ||
``` | ||
|
||
### Localhost deploy | ||
|
||
```bash | ||
docker compose -f compose.local.yml -f compose.users.yml --env-file .env up -d | ||
``` |