-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Updates installation scripts and config files to make the localhost install possible. - Makes both trial and localhost install create single user only. --------- Co-authored-by: nichlaes <[email protected]>
- Loading branch information
1 parent
d373409
commit e9c3cf0
Showing
15 changed files
with
420 additions
and
45 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 |
---|---|---|
|
@@ -35,3 +35,4 @@ exclude_patterns: | |
- "**/public/" | ||
- client/config/ | ||
- servers/lib/src/types.ts | ||
- "deploy/config/client/env*.js" |
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,19 @@ | ||
window.env = { | ||
REACT_APP_ENVIRONMENT: "local", | ||
REACT_APP_URL: "http://localhost/", | ||
REACT_APP_URL_BASENAME: "", | ||
REACT_APP_URL_DTLINK: "/lab", | ||
REACT_APP_URL_LIBLINK: "", | ||
REACT_APP_WORKBENCHLINK_TERMINAL: "/terminals/main", | ||
REACT_APP_WORKBENCHLINK_VNCDESKTOP: "/tools/vnc/?password=vncpassword", | ||
REACT_APP_WORKBENCHLINK_VSCODE: "/tools/vscode/", | ||
REACT_APP_WORKBENCHLINK_JUPYTERLAB: "/lab", | ||
REACT_APP_WORKBENCHLINK_JUPYTERNOTEBOOK: "", | ||
|
||
REACT_APP_CLIENT_ID: | ||
"1be55736756190b3ace4c2c4fb19bde386d1dcc748d20b47ea8cfb5935b8446c", | ||
REACT_APP_AUTH_AUTHORITY: "https://gitlab.com/", | ||
REACT_APP_REDIRECT_URI: "http://localhost/Library", | ||
REACT_APP_LOGOUT_REDIRECT_URI: "http://localhost/", | ||
REACT_APP_GITLAB_SCOPES: "openid profile read_user read_repository api", | ||
}; |
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,18 @@ | ||
window.env = { | ||
REACT_APP_ENVIRONMENT: 'trial', | ||
REACT_APP_URL: 'https://foo.com/', | ||
REACT_APP_URL_BASENAME: '', | ||
REACT_APP_URL_DTLINK: '/lab', | ||
REACT_APP_URL_LIBLINK: '', | ||
REACT_APP_WORKBENCHLINK_TERMINAL: '/terminals/main', | ||
REACT_APP_WORKBENCHLINK_VNCDESKTOP: '/tools/vnc/?password=vncpassword', | ||
REACT_APP_WORKBENCHLINK_VSCODE: '/tools/vscode/', | ||
REACT_APP_WORKBENCHLINK_JUPYTERLAB: '/lab', | ||
REACT_APP_WORKBENCHLINK_JUPYTERNOTEBOOK: '', | ||
|
||
REACT_APP_CLIENT_ID: '934b98f03f1b6f743832b2840bf7cccaed93c3bfe579093dd0942a433691ccc0', | ||
REACT_APP_AUTH_AUTHORITY: 'https://gitlab.foo.com/', | ||
REACT_APP_REDIRECT_URI: 'https://foo.com/Library', | ||
REACT_APP_LOGOUT_REDIRECT_URI: 'https://foo.com/', | ||
REACT_APP_GITLAB_SCOPES: 'openid profile read_user read_repository api', | ||
}; |
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,35 @@ | ||
http: | ||
routers: | ||
dtaas: | ||
entryPoints: | ||
- http | ||
rule: "Host(`localhost`)" | ||
service: dtaas | ||
|
||
user1: | ||
entryPoints: | ||
- http | ||
rule: "Host(`localhost`) && PathPrefix(`/user1`)" | ||
service: user1 | ||
|
||
libms: | ||
entryPoints: | ||
- http | ||
rule: "Host(localhost`) && PathPrefix(`/lib`)" | ||
service: libms | ||
|
||
services: | ||
dtaas: | ||
loadBalancer: | ||
servers: | ||
- url: "http://localhost:4000" | ||
|
||
user1: | ||
loadBalancer: | ||
servers: | ||
- url: "http://localhost:8090" | ||
|
||
libms: | ||
loadBalancer: | ||
servers: | ||
- url: "http://localhost:4001" |
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,48 @@ | ||
http: | ||
routers: | ||
dtaas: | ||
entryPoints: | ||
- http | ||
rule: 'Host(`foo.com`)' | ||
middlewares: | ||
- basic-auth | ||
service: dtaas | ||
|
||
user1: | ||
entryPoints: | ||
- http | ||
rule: 'Host(`foo.com`) && PathPrefix(`/user1`)' | ||
middlewares: | ||
- basic-auth | ||
service: user1 | ||
|
||
libms: | ||
entryPoints: | ||
- http | ||
rule: 'Host(`foo.com`) && PathPrefix(`/lib`)' | ||
service: libms | ||
|
||
|
||
# Middleware: Basic authentication | ||
middlewares: | ||
basic-auth: | ||
basicAuth: | ||
usersFile: "/etc/traefik/auth" | ||
removeHeader: true | ||
|
||
|
||
services: | ||
dtaas: | ||
loadBalancer: | ||
servers: | ||
- url: "http://localhost:4000" | ||
|
||
user1: | ||
loadBalancer: | ||
servers: | ||
- url: "http://localhost:8090" | ||
|
||
libms: | ||
loadBalancer: | ||
servers: | ||
- url: "http://localhost:4001" |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# Localhot Installation | ||
|
||
To try out the software, you can install it on Ubuntu 22.04 | ||
Desktop Operating System. The setup requires a | ||
machine which can spare 4GB RAM, 2 vCPUs and 15GB Hard Disk | ||
space to a the DTaaS application. | ||
A successful installation will create a setup | ||
similar to the one shown in the figure. | ||
|
||
![localhost install](./localhost.png) | ||
|
||
A one-step installation script is provided on this page. This script sets up | ||
the DTaaS software for a single user. | ||
You can use it to check a test installation of the DTaaS software. | ||
|
||
## Pre-requisites | ||
|
||
### 1. Gitlab OAuth application | ||
|
||
The DTaaS react website requires Gitlab OAuth provider. | ||
If you need more help with this step, please see | ||
the [Authentication page](client/auth.md). | ||
|
||
!!! Information | ||
<!-- markdownlint-disable-file MD013 --> | ||
It is sufficient to have [user-owned oauth](https://docs.gitlab.com/ee/integration/oauth_provider.html#create-a-user-owned-application) | ||
application. You can create this application | ||
in your gitlab account. | ||
|
||
You need the following information from the Gitlab OAuth application | ||
registered on Gitlab: | ||
|
||
| Gitlab Variable Name | Variable name in Client env.js | Default Value | | ||
| :------------------- | :----------------------------- | :----------------------------------------------- | | ||
| OAuth Provider | REACT_APP_AUTH_AUTHORITY | <https://gitlab.com> or <https://gitlab.foo.com> | | ||
| Application ID | REACT_APP_CLIENT_ID | | ||
| Callback URL | REACT_APP_REDIRECT_URI | <http://localhost/Library> | | ||
| Scopes | REACT_APP_GITLAB_SCOPES | openid, profile, read_user, read_repository, api | | ||
|
||
You can also see | ||
[Gitlab help page](https://docs.gitlab.com/ee/integration/oauth_provider.html) | ||
for getting the Gitlab OAuth application details. | ||
|
||
## Install | ||
|
||
<!-- prettier-ignore --> | ||
!!! note | ||
While installing you might encounter multiple dialogs asking, | ||
which services should be restarted. Just click **OK** to all of those. | ||
|
||
Run the following commands. | ||
|
||
```bash | ||
wget https://raw.githubusercontent.com/INTO-CPS-Association/DTaaS/feature/distributed-demo/deploy/single-script-install.sh | ||
bash single-script-install.sh --env local --username <username> | ||
``` | ||
|
||
The `--env local` argument is added to the script specifies `localhost` | ||
as the installation scenario. The `--username username` uses your | ||
Gitlab username to configure the DTaaS application. | ||
|
||
## Post install | ||
|
||
After the single-install-script is successfully run. Please change | ||
[Gitlab OAuth](#1-gitlab-oauth-application) details in | ||
|
||
```txt | ||
~/DTaaS/client/build/env.js | ||
``` | ||
|
||
## Post-install Check | ||
|
||
Now when you visit <http://localhost>, you should be able to login through | ||
Gitlab OAuth Provider and access the DTaas web UI. | ||
|
||
If you can following along to see all the screenshots from | ||
[user website](../user/website/index.md). | ||
Everything is correctly setup. | ||
|
||
## References | ||
|
||
Image sources: [Ubuntu logo](https://logodix.com/linux-ubuntu), | ||
[Traefik logo](https://www.laub-home.de/wiki/Traefik_SSL_Reverse_Proxy_f%C3%BCr_Docker_Container), | ||
[ml-workspace](https://github.com/ml-tooling/ml-workspace), | ||
[nodejs](https://www.metachris.com/2017/01/how-to-install-nodejs-7-on-ubuntu-and-centos/), | ||
[reactjs](https://krify.co/about-reactjs/), | ||
[nestjs](https://camunda.com/blog/2019/10/nestjs-tx-email/) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.