-
Notifications
You must be signed in to change notification settings - Fork 56
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
Adds new documentation #803
Changes from 5 commits
620df14
e474d51
3ca346c
353f661
67b88bc
5d56418
c3e3164
674cef5
a551e6d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,8 +84,8 @@ This brings up the containers, without the AuthMS authentication. | |
- Currently the _email_ fields for each user in | ||
_dtaas.toml_ are not in use, and are not necessary | ||
to fill in. These emails must be configured manually | ||
for each user in the docker/conf.local or | ||
docker/conf.server files and the _traefik-forward-auth_ | ||
for each user in the | ||
deploy/docker/conf.server files and the _traefik-forward-auth_ | ||
container must be restarted. This is done as follows: | ||
|
||
- Go to the _docker_ directory | ||
|
@@ -94,13 +94,6 @@ This brings up the containers, without the AuthMS authentication. | |
cd <DTaaS>/docker | ||
``` | ||
|
||
- 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 | ||
|
@@ -109,16 +102,12 @@ rule.onlyu3.rule=PathPrefix(`/user3`) | |
rule.onlyu3.whitelist = [email protected] | ||
``` | ||
|
||
Run the appropritate command for a server/local installation: | ||
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 | ||
``` | ||
|
||
```bash | ||
docker compose -f compose.local.yml --env-file .env up -d --force-recreate traefik-forward-auth | ||
``` | ||
|
||
The new users are now added to the DTaaS | ||
instance, with authorization enabled. | ||
|
||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,8 +81,8 @@ This brings up the containers, without the AuthMS authentication. | |
- Currently the _email_ fields for each user in | ||
_dtaas.toml_ are not in use, and are not necessary | ||
to fill in. These emails must be configured manually | ||
for each user in the docker/conf.local or | ||
docker/conf.server files and the _traefik-forward-auth_ | ||
for each user in the | ||
deploy/docker/conf.server files and the _traefik-forward-auth_ | ||
container must be restarted. This is done as follows: | ||
|
||
- Go to the _docker_ directory | ||
|
@@ -91,13 +91,6 @@ This brings up the containers, without the AuthMS authentication. | |
cd <DTaaS>/deploy/docker | ||
``` | ||
|
||
- 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 | ||
|
@@ -106,16 +99,12 @@ rule.onlyu3.rule=PathPrefix(`/user3`) | |
rule.onlyu3.whitelist = [email protected] | ||
``` | ||
|
||
Run the appropritate command for a server/local installation: | ||
Run the appropritate command for a server installation: | ||
|
||
```bash | ||
docker compose -f compose.server.yml --env-file .env up -d --force-recreate traefik-forward-auth | ||
``` | ||
|
||
```bash | ||
docker compose -f compose.local.yml --env-file .env up -d --force-recreate traefik-forward-auth | ||
``` | ||
|
||
The new users are now added to the DTaaS | ||
instance, with authorization enabled. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,38 @@ | ||
# Add a new user | ||
# Add User | ||
|
||
This page will guide you on, how to add more users to the DTaas. Please do the following: | ||
This page provides steps to adding a user from a DTaaS installation. | ||
The username **alice** is used here to illustrate the steps involved in | ||
removing a user account. | ||
|
||
<!-- prettier-ignore --> | ||
!!! important | ||
Make sure to replace **<username\>** and **<port\>** | ||
Select a port that is not already being used by the system. | ||
Please do the following: | ||
|
||
**1. Add user:** | ||
1. **Add user to Gitlab instance:** | ||
Add a new account for the new user on the Gitlab instance. | ||
Note the username and email of the new account. | ||
|
||
Add the new user on the Gitlab instance. | ||
1. Use the [DTaaS CLI](../cli.md) to bring up the workspaces for new users. | ||
This brings up the containers, without the backend authorization. | ||
|
||
**2. Setup a new workspace:** | ||
1. Add backend authorization for the user | ||
|
||
The above code creates a new workspace for the new user based on _user2_. | ||
1. Go to the _docker_ directory | ||
|
||
```bash | ||
cd DTaaS/files | ||
cp -R user2 <username> | ||
cd .. | ||
docker run -d \ | ||
-p <port>:8080 \ | ||
--name "ml-workspace-<username>" \ | ||
-v "${TOP_DIR}/files/<username>:/workspace" \ | ||
-v "${TOP_DIR}/files/<username>:/workspace/common" \ | ||
--env AUTHENTICATE_VIA_JUPYTER="" \ | ||
--env WORKSPACE_BASE_URL="<username>" \ | ||
--shm-size 512m \ | ||
--restart always \ | ||
mltooling/ml-workspace-minimal:0.13.2 | ||
``` | ||
```bash | ||
cd <DTaaS>/docker | ||
``` | ||
|
||
**3. Add username and password:** | ||
1. Add three lines to the `conf.server` file | ||
|
||
The following code adds basic authorization for the new user. | ||
```txt | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code block style |
||
rule.onlyu3.action=auth | ||
rule.onlyu3.rule=PathPrefix(`/alice`) | ||
rule.onlyu3.whitelist = [email protected] | ||
``` | ||
|
||
```bash | ||
cd DTaaS/servers/config/gateway | ||
htpasswd auth <username> | ||
``` | ||
1. Restart the docker container responsible for backend authorization. | ||
|
||
**4. Add 'route' for new user:** | ||
```bash | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code block style |
||
docker compose -f compose.server.yml --env-file .env up -d --force-recreate traefik-forward-auth | ||
``` | ||
|
||
We need to add a new route to the servers ingress. | ||
|
||
Open the following file with your preffered editor (e.g. VIM/nano). | ||
|
||
```bash | ||
vi DTaaS/servers/config/gateway/dynamic/fileConfig.yml | ||
``` | ||
|
||
Now add the new route and service for the user. | ||
|
||
<!-- prettier-ignore --> | ||
!!! important | ||
foo.com should be replaced with your own domain. | ||
|
||
```yml | ||
http: | ||
routers: | ||
.... | ||
<username>: | ||
entryPoints: | ||
- http | ||
rule: 'Host(`foo.com`) && PathPrefix(`/<username>`)' | ||
middlewares: | ||
- basic-auth | ||
service: <username> | ||
|
||
services: | ||
... | ||
<username>: | ||
loadBalancer: | ||
servers: | ||
- url: 'http://localhost:<port>' | ||
``` | ||
|
||
**5. Access the new user:** | ||
|
||
Log into the DTaaS application as new user. | ||
1. The new users are now added to the DTaaS instance, with authorization enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code block style