diff --git a/README.md b/README.md index f872000f9..802456a28 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ The [web client](client), [library](servers/lib) and [runner](servers/execution/runner) microservices are functional at present. -These are packages are available on +These packages are available on [github](https://github.com/orgs/INTO-CPS-Association/packages?repo_name=DTaaS). Please see the diff --git a/cli/README.md b/cli/README.md index 2ccdc3134..738ee88da 100644 --- a/cli/README.md +++ b/cli/README.md @@ -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/` 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 /docker +cd /deploy/docker ``` - Add three lines to the `conf.server` file @@ -102,7 +129,7 @@ rule.onlyu3.rule=PathPrefix(`/user3`) rule.onlyu3.whitelist = user3@emailservice.com ``` -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,11 +140,17 @@ 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: @@ -125,6 +158,9 @@ Then simply: 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. diff --git a/cli/users.local.yml b/cli/users.local.yml index 30abafce8..9d884041d 100644 --- a/cli/users.local.yml +++ b/cli/users.local.yml @@ -1,7 +1,8 @@ image: mltooling/ml-workspace-minimal:0.13.2 +restart: unless-stopped volumes: - - ${DTAAS_DIR}/files/common:/workspace/common - - ${DTAAS_DIR}/files/${username}:/workspace + - "${DTAAS_DIR}/files/common:/workspace/common" + - "${DTAAS_DIR}/files/${username}:/workspace" environment: - AUTHENTICATE_VIA_JUPYTER= - WORKSPACE_BASE_URL=${username} @@ -12,4 +13,4 @@ labels: - "traefik.http.routers.${username}.rule=PathPrefix(`/${username}`)" - "traefik.http.routers.${username}.middlewares=traefik-forward-auth" networks: - - users \ No newline at end of file + - users diff --git a/cli/users.server.secure.yml b/cli/users.server.secure.yml new file mode 100644 index 000000000..a64b87774 --- /dev/null +++ b/cli/users.server.secure.yml @@ -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 diff --git a/cli/users.server.yml b/cli/users.server.yml index 2099d2eef..bf1fa919a 100644 --- a/cli/users.server.yml +++ b/cli/users.server.yml @@ -1,7 +1,8 @@ image: mltooling/ml-workspace-minimal:0.13.2 +restart: unless-stopped volumes: - - ${DTAAS_DIR}/files/common:/workspace/common - - ${DTAAS_DIR}/files/${username}:/workspace + - "${DTAAS_DIR}/files/common:/workspace/common" + - "${DTAAS_DIR}/files/${username}:/workspace" environment: - AUTHENTICATE_VIA_JUPYTER= - WORKSPACE_BASE_URL=${username} @@ -12,4 +13,4 @@ labels: - "traefik.http.routers.${username}.rule=Host(`${SERVER_DNS}`)&&PathPrefix(`/${username}`)" - "traefik.http.routers.${username}.middlewares=traefik-forward-auth" networks: - - users \ No newline at end of file + - users diff --git a/deploy/docker/README.md b/deploy/docker/README.md index 34fa8e07a..799a28b06 100644 --- a/deploy/docker/README.md +++ b/deploy/docker/README.md @@ -6,6 +6,6 @@ on both localhost and server. There are two installation scenarios each with a dedicated set of instructions: 1. Single user [localhost](./LOCALHOST.md) -1. Multi-user [web application](./SERVER.md) +1. Multi-user [web application](./SERVER.md) serving application over **HTTP or HTTPS** Please choose an appropriate installation scenario. diff --git a/deploy/docker/SERVER.md b/deploy/docker/SERVER.md index a02e9ee38..7696ca705 100644 --- a/deploy/docker/SERVER.md +++ b/deploy/docker/SERVER.md @@ -17,20 +17,32 @@ In the new application configuration, there are two OAuth2 applications. The installation requirements to run this docker version of the DTaaS are: -- DNS name for the server -- docker with compose plugin -- User accounts on a gitlab instance -- OAuth2 application registrations +### Domain name -### Create User Accounts +The DTaaS software is a web application and is preferably hosted +on a server with a domain name like _foo.com_. +It is also possible to use an IP address in place of domain name. -Create user accounts in a gitlab instance for all the users. +### TLS / HTTPS Certificate + +It is possible to add HTTPS option to the DTaaS software installation. +Creation of the required TLS certificates is possible through +[certbot](https://certbot.eff.org/). + +### OAuth Provider + +**[Gitlab Instance](https://about.gitlab.com/install/)** - +The DTaaS uses Gitlab OAuth2.0 authorization for user authorization. +You can either have an on-premise instance of gitlab, or +use [gitlab.com](https://gitlab.com) itself. + +### User Accounts + +Create user accounts in a linked gitlab instance for all the users. The default docker compose file contains two - _user1_ and _user2_. These names need to be changed to suitable usernames. -It is possible to use as well for OAuth2 authorization purposes. - ### OAuth2 Application Registration The multi-user installation setup requires dedicated authorization @@ -46,6 +58,8 @@ using OAuth2 protocol. The details of this authorization setup are in [server docs](../../docs/admin/servers/auth.md). +It is possible to use or a local installation +of Gitlab can be used for this purpose. Based on your selection of gitlab instance, it is necessary to register these two OAuth2 applications and link them to your intended DTaaS installation. @@ -87,7 +101,7 @@ Edit all the fields according to your specific case. | URL Path | Example Value | Explanation | |:------------|:---------------|:---------------| - | DTAAS_DIR | '/home/dtaas/Desktop/DTaaS' | Full path to the DTaaS directory. This is an absolute path with no trailing slash. | + | DTAAS_DIR | '/Users/username/DTaaS' | Full path to the DTaaS directory. This is an absolute path with no trailing slash. | | SERVER_DNS | _foo.com_ | The server DNS, if you are deploying with a dedicated server. Remember not use http(s) at the beginning of the DNS string | | OAUTH_URL | _gitlab.foo.com_ | The URL of your Gitlab instance. It can be _gitlab.com_ if you are planning to use it for authorization. | | CLIENT_ID | 'xx' | The ID of your server OAuth application | @@ -95,7 +109,7 @@ Edit all the fields according to your specific case. | OAUTH_SECRET | 'random-secret-string' | Any private random string. This is a password you choose for local installation. | | username1 | 'user1' | The gitlab instance username of a user of DTaaS | | username2 | 'user2' | The gitlab instance username of a user of DTaaS | - | CLIENT_CONFIG | '/home/dtaas/Desktop/DTaaS/deploy/config/client/env.js' | Full path to env.js file for client | + | CLIENT_CONFIG | '/Users/username/DTaaS/deploy/config/client/env.js' | Full path to env.js file for client | :clipboard: Important points to note: @@ -182,8 +196,68 @@ If there are extra routes in `deploy/docker/conf.server` file but these are not in `deploy/docker/.env.server` file, such routes are not served by traefik; it will give **404 server response**. +## Access Rights Over Files + + + +!!! warning + The default setting in docker compose file exposes + all user files at . + All files of all the users are readable-writable by + all logged in users. + The `compose.server.yml` / `compose.server.secure.yml` file needs to be + updated to expose another directory like common assets directory. + + +If you wish to reduce this scope to only **common assets**, +please change, + +```yaml + libms: + image: intocps/libms:latest + restart: unless-stopped + volumes: + - ${DTAAS_DIR}/deploy/config/lib.docker:/dtaas/libms/.env + - ${DTAAS_DIR}/files/common:/dtaas/libms/files +``` + +The change in the last line. The `${DTAAS_DIR}/files` +got replaced by `${DTAAS_DIR}/files/common`. With this change, only +common files are readable-writable by all logged in users. + +### Add TLS Certificates + +The application can be served on HTTPS connection for which TLS certificates +are needed. The certificates need to be issued for `foo.com` or `*.foo.com`. +The names of the certificates must be `fullchain.pem` and `privkey.pem`. Copy +these two certificate files into: + +- `certs/foo.com/fullchain.pem` +- `certs/foo.com/privkey.pem` + +Traefik will run with self-issued certificates if the above two certificates +are either not found or found invalid. + +Remember to update `dynamic/tls.yml` with correct path matching your DNS name. +For example, if your DNS name is `www.foo.com`, then copy the +TLS certificates of `www.foo.com` to `certs/` directory and update +`dynamic/tls.yml` as follows. + +```yml +tls: + certificates: + - certFile: /etc/traefik-certs/www.foo.com/fullchain.pem + keyFile: /etc/traefik-certs/www.foo.com/privkey.pem + stores: + - default +``` + ## Run +### Over HTTP + +This docker compose file serves application over HTTP. + The commands to start and stop the appliation are: ```bash @@ -197,10 +271,27 @@ To restart only a specific container, for example `client`` docker compose -f compose.server.yml --env-file .env.server up -d --force-recreate client ``` +### Over HTTPS + +This docker compose file serves application over HTTP. + +The commands to start and stop the appliation are: + +```bash +docker compose -f compose.server.secure.yml --env-file .env.server up -d +docker compose -f compose.server.secure.yml --env-file .env.server down +``` + +To restart only a specific container, for example `client`` + +```bash +docker compose -f compose.server.secure.yml --env-file .env.server up -d --force-recreate client +``` + ## Use The application will be accessible at: - from web browser. + from web browser. Sign in using your account linked to either _gitlab.com_ or your local gitlab instance. @@ -210,7 +301,7 @@ 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 +### Adding a new user To add a new user to your DTaaS instance, follow these steps: diff --git a/deploy/docker/certs/.gitkeep b/deploy/docker/certs/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/deploy/docker/compose.server.secure.yml b/deploy/docker/compose.server.secure.yml new file mode 100644 index 000000000..b05a73043 --- /dev/null +++ b/deploy/docker/compose.server.secure.yml @@ -0,0 +1,126 @@ +version: '3' +services: + traefik: + image: traefik:v2.10 + restart: unless-stopped + command: + - "--log.level=DEBUG" + - "--api.insecure=true" + - "--providers.docker=true" + - "--entryPoints.web.address=:80" + - "--entrypoints.web-secure.address=:443" + - "--entrypoints.web.http.redirections.entryPoint.to=web-secure" + - "--entrypoints.web.http.redirections.entryPoint.scheme=https" + - "--entrypoints.web.http.redirections.entrypoint.permanent=true" + - "--providers.file.directory=/etc/traefik/dynamic" + - "--providers.file.watch=true" + ports: + - "80:80" + - "443:443" + volumes: + - "/var/run/docker.sock:/var/run/docker.sock:ro" + - "${DTAAS_DIR}/deploy/docker/dynamic:/etc/traefik/dynamic" + - "${DTAAS_DIR}/deploy/docker/certs:/etc/traefik-certs" + networks: + - frontend + - users + + client: + image: intocps/dtaas-web:latest + restart: unless-stopped + volumes: + - "${CLIENT_CONFIG}:/dtaas/client/build/env.js" + labels: + - "traefik.enable=true" + - "traefik.http.routers.client.rule=Host(`${SERVER_DNS}`)&&PathPrefix(`/`)" + - "traefik.http.routers.client.tls=true" + - "traefik.http.routers.client.middlewares=traefik-forward-auth" + - "traefik.http.services.client.loadbalancer.server.port=4000" + networks: + - frontend + + libms: + image: intocps/libms:latest + restart: unless-stopped + volumes: + - ${DTAAS_DIR}/deploy/config/lib.docker:/dtaas/libms/.env + - ${DTAAS_DIR}/files:/dtaas/libms/files + labels: + - "traefik.enable=true" + - "traefik.http.services.libms.loadbalancer.server.port=4001" + - "traefik.http.routers.libms.rule=Host(`${SERVER_DNS}`)&&PathPrefix(`/lib`)" + - "traefik.http.routers.libms.tls=true" + - "traefik.http.routers.libms.middlewares=traefik-forward-auth" + networks: + - frontend + + user1: + image: mltooling/ml-workspace-minimal:0.13.2 + restart: unless-stopped + volumes: + - "${DTAAS_DIR}/files/common:/workspace/common" + - "${DTAAS_DIR}/files/${username1}:/workspace" + environment: + - AUTHENTICATE_VIA_JUPYTER= + - WORKSPACE_BASE_URL=${username1} + shm_size: 512m + labels: + - "traefik.enable=true" + - "traefik.http.routers.u1.rule=Host(`${SERVER_DNS}`)&&PathPrefix(`/${username1}`)" + - "traefik.http.routers.u1.tls=true" + - "traefik.http.routers.u1.middlewares=traefik-forward-auth" + networks: + - users + + user2: + image: mltooling/ml-workspace-minimal:0.13.2 + restart: unless-stopped + volumes: + - "${DTAAS_DIR}/files/common:/workspace/common" + - "${DTAAS_DIR}/files/${username2}:/workspace" + environment: + - AUTHENTICATE_VIA_JUPYTER= + - WORKSPACE_BASE_URL=${username2} + shm_size: 512m + labels: + - "traefik.enable=true" + - "traefik.http.routers.u2.rule=Host(`${SERVER_DNS}`)&&PathPrefix(`/${username2}`)" + - "traefik.http.routers.u2.tls=true" + - "traefik.http.routers.u2.middlewares=traefik-forward-auth" + networks: + - users + + + traefik-forward-auth: + image: thomseddon/traefik-forward-auth:latest + restart: unless-stopped + volumes: + - "${DTAAS_DIR}/deploy/docker/conf.server:/conf" + environment: + - LOG_LEVEL=trace + - DEFAULT_PROVIDER=generic-oauth + - PROVIDERS_GENERIC_OAUTH_AUTH_URL=${OAUTH_URL}/oauth/authorize + - PROVIDERS_GENERIC_OAUTH_TOKEN_URL=${OAUTH_URL}/oauth/token + - PROVIDERS_GENERIC_OAUTH_USER_URL=${OAUTH_URL}/api/v4/user + - PROVIDERS_GENERIC_OAUTH_CLIENT_ID=${CLIENT_ID} + - PROVIDERS_GENERIC_OAUTH_CLIENT_SECRET=${CLIENT_SECRET} + - PROVIDERS_GENERIC_OAUTH_SCOPE=read_user + - SECRET= "${OAUTH_SECRET}" + - CONFIG=/conf + labels: + - "traefik.enable=true" + - "traefik.http.routers.redirect.entryPoints=web-secure" + - "traefik.http.routers.redirect.rule=Host(`${SERVER_DNS}`)&&PathPrefix(`/_oauth`)" + - "traefik.http.routers.redirect.middlewares=traefik-forward-auth" + - "traefik.http.middlewares.traefik-forward-auth.forwardauth.address=http://traefik-forward-auth:4181" + - "traefik.http.middlewares.traefik-forward-auth.forwardauth.authResponseHeaders=X-Forwarded-User" + - "traefik.http.services.traefik-forward-auth.loadbalancer.server.port=4181" + networks: + - frontend + - users + +networks: + frontend: + name: dtaas-frontend + users: + name: dtaas-users diff --git a/deploy/docker/dynamic/tls.yml b/deploy/docker/dynamic/tls.yml new file mode 100644 index 000000000..f0831793c --- /dev/null +++ b/deploy/docker/dynamic/tls.yml @@ -0,0 +1,6 @@ +tls: + certificates: + - certFile: /etc/traefik-certs/foo.com/fullchain.pem + keyFile: /etc/traefik-certs/foo.com/privkey.pem + stores: + - default diff --git a/docs/admin/cli.md b/docs/admin/cli.md index 4217a2046..684326361 100644 --- a/docs/admin/cli.md +++ b/docs/admin/cli.md @@ -55,6 +55,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 @@ -76,6 +95,12 @@ Then simply: dtaas admin user add ``` +The command checks for the existence of `files/` 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. @@ -101,7 +126,7 @@ rule.onlyu3.rule=PathPrefix(`/user3`) rule.onlyu3.whitelist = user3@emailservice.com ``` -- Run the appropritate command for a server 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 @@ -147,6 +172,6 @@ dtaas admin user delete error if the _add_ and _delete_ lists in _dtaas.toml_ are empty, respectively. -- '.' are a special character. Currently, usernames which have +- '.' 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. diff --git a/docs/admin/host.md b/docs/admin/host.md index f60f5d0dd..2169c6822 100644 --- a/docs/admin/host.md +++ b/docs/admin/host.md @@ -29,6 +29,12 @@ The DTaaS software is a web application and is preferably hosted on a server with a domain name like _foo.com_. It is also possible to use an IP address in place of domain name. +### TLS / HTTPS Certificate (Optional) + +It is possible to add HTTPS option to the DTaaS software installation. +Creation of the required TLS certificates is possible through +[certbot](https://certbot.eff.org/). + ### OAuth Provider **[Gitlab Instance](https://about.gitlab.com/install/)** - @@ -38,7 +44,10 @@ use [gitlab.com](https://gitlab.com) itself. ### User Accounts -Create user accounts in the linked gitlab instance for all the users. +Create user accounts in a linked gitlab instance for all the users. + +The default docker compose file contains two - _user1_ and _user2_. +These names need to be changed to suitable usernames. ### OAuth2 Application Registration @@ -55,6 +64,8 @@ using OAuth2 protocol. The details of this authorization setup are in [server docs](servers/auth.md). +It is possible to use or a local installation +of Gitlab can be used for this purpose. Based on your selection of gitlab instance, it is necessary to register these two OAuth2 applications and link them to your intended DTaaS installation. @@ -185,7 +196,7 @@ Please change the usernames and email addresses to the matching user accounts on the OAuth provider (either or ). -### Caveat +#### Caveat The usernames in the `deploy/docker/.env.server` file need to match those in the `deploy/docker/conf.server` file. @@ -211,8 +222,8 @@ such routes are not served by traefik; it will give **404 server response**. all user files at . All files of all the users are readable-writable by all logged in users. - The `compose.server.yml` file needs to updated to - expose another directory like common assets directory. + The `compose.server.yml` / `compose.server.secure.yml` file needs to be + updated to expose another directory like common assets directory. If you wish to reduce this scope to only **common assets**, @@ -231,8 +242,39 @@ The change in the last line. The `${DTAAS_DIR}/files` got replaced by `${DTAAS_DIR}/files/common`. With this change, only common files are readable-writable by all logged in users. +### Add TLS Certificates (Optional) + +The application can be served on HTTPS connection for which TLS certificates +are needed. The certificates need to be issued for `foo.com` or `*.foo.com`. +The names of the certificates must be `fullchain.pem` and `privkey.pem`. Copy +these two certificate files into: + +- `certs/foo.com/fullchain.pem` +- `certs/foo.com/privkey.pem` + +Traefik will run with self-issued certificates if the above two certificates +are either not found or found invalid. + +Remember to update `dynamic/tls.yml` with correct path matching your DNS name. +For example, if your DNS name is `www.foo.com`, then copy the +TLS certificates of `www.foo.com` to `certs/` directory and update +`dynamic/tls.yml` as follows. + +```yml +tls: + certificates: + - certFile: /etc/traefik-certs/www.foo.com/fullchain.pem + keyFile: /etc/traefik-certs/www.foo.com/privkey.pem + stores: + - default +``` + ## Run +### Over HTTP + +This docker compose file serves application over HTTP. + The commands to start and stop the appliation are: ```bash @@ -246,10 +288,27 @@ To restart only a specific container, for example `client`` docker compose -f compose.server.yml --env-file .env.server up -d --force-recreate client ``` +### Over HTTPS + +This docker compose file serves application over HTTP. + +The commands to start and stop the appliation are: + +```bash +docker compose -f compose.server.secure.yml --env-file .env.server up -d +docker compose -f compose.server.secure.yml --env-file .env.server down +``` + +To restart only a specific container, for example `client`` + +```bash +docker compose -f compose.server.secure.yml --env-file .env.server up -d --force-recreate client +``` + ## Use The application will be accessible at: - from web browser. + from web browser. Sign in using your account linked to either _gitlab.com_ or your local gitlab instance. diff --git a/docs/admin/vagrant/single-machine.md b/docs/admin/vagrant/single-machine.md index 25ad7587a..05d040b3a 100644 --- a/docs/admin/vagrant/single-machine.md +++ b/docs/admin/vagrant/single-machine.md @@ -7,7 +7,7 @@ space to the vagrant box. ## Create Base Vagrant Box -Create [**dtaas** Vagrant box](./base-box.md). +Create [**dtaas** Vagrant box](base-box.md). You would have created an SSH key pair - _vagrant_ and _vagrant.pub_. The _vagrant_ is the private SSH key and is needed for the next steps. Copy _vagrant_ SSH private key into the current directory @@ -17,12 +17,12 @@ machines created for two-machine deployment. ## Target Installation Setup -The goal is to use the [**dtaas** Vagrant box](./base-box.md) +The goal is to use the [**dtaas** Vagrant box](base-box.md) to install the DTaaS software on one single vagrant machine. A graphical illustration of a successful installation can be seen here. -![Single vagrant machine](./single-machine.png) +![Single vagrant machine](single-machine.png) There are many unused software packages/docker containers within the dtaas base box. @@ -67,7 +67,7 @@ vagrant ssh Set a cronjob inside the vagrant virtual machine to remote the conflicting default route. -Download the [route script](./route.sh) and run +Download the [route script](route.sh) and run the following command. ```bash diff --git a/docs/admin/vagrant/single-machine.png b/docs/admin/vagrant/single-machine.png index 9a04882c4..49dcf193d 100755 Binary files a/docs/admin/vagrant/single-machine.png and b/docs/admin/vagrant/single-machine.png differ diff --git a/docs/admin/vagrant/two-machine-use-legend.png b/docs/admin/vagrant/two-machine-use-legend.png index 3a4323659..1e5462954 100755 Binary files a/docs/admin/vagrant/two-machine-use-legend.png and b/docs/admin/vagrant/two-machine-use-legend.png differ diff --git a/docs/admin/vagrant/two-machine.png b/docs/admin/vagrant/two-machine.png index 407cb99e1..e69804509 100755 Binary files a/docs/admin/vagrant/two-machine.png and b/docs/admin/vagrant/two-machine.png differ diff --git a/docs/admin/vagrant/two-machines.md b/docs/admin/vagrant/two-machines.md index 4e386cd80..b38a4797f 100644 --- a/docs/admin/vagrant/two-machines.md +++ b/docs/admin/vagrant/two-machines.md @@ -18,7 +18,7 @@ you can create shell scripts to install the same on server2. ## Create Base Vagrant Box -Create [**dtaas** Vagrant box](./base-box.md). +Create [**dtaas** Vagrant box](base-box.md). You would have created an SSH key pair - _vagrant_ and _vagrant.pub_. The _vagrant_ is the private SSH key and is needed for the next steps. Copy _vagrant_ SSH private key into the current directory (`deploy/vagrant/two-machine`). @@ -27,12 +27,12 @@ machines created for two-machine deployment. ## Target Installation Setup -The goal is to use this [**dtaas** vagrant box](./base-box.md) +The goal is to use this [**dtaas** vagrant box](base-box.md) to install the DTaaS software on server1 and the default platform services on server2. Both the servers are vagrant machines. -![DTaaS vagrant box package use](./two-machine-use-legend.png) +![DTaaS vagrant box package use](two-machine-use-legend.png) There are many unused software packages/docker containers within the dtaas base box. @@ -41,7 +41,7 @@ The used packages/docker containers are highlighed in blue and red color. A graphical illustration of a successful installation can be seen here. -![Two vagrant machine](./two-machine.png) +![Two vagrant machine](two-machine.png) In this case, both the vagrant boxes are spawed on one server using two vagrant configuration files, namely _boxes.json_ and _Vagrantfile_. @@ -112,7 +112,7 @@ vagrant ssh Set a cronjob inside the vagrant virtual machine to remote the conflicting default route. -Download the [route script](./route.sh) and run +Download the [route script](route.sh) and run the following command. ```bash diff --git a/docs/developer/client/src.svg b/docs/developer/client/src.svg index f7bbcfa16..5ccbab954 100644 --- a/docs/developer/client/src.svg +++ b/docs/developer/client/src.svg @@ -4,562 +4,598 @@ - - + + G - + AppProvider.tsx - -AppProvider.tsx + +AppProvider.tsx route/auth/AuthProvider.tsx - -route/auth/AuthProvider.tsx + +route/auth/AuthProvider.tsx AppProvider.tsx->route/auth/AuthProvider.tsx - - + + store/store.ts - -store/store.ts + +store/store.ts AppProvider.tsx->store/store.ts - - + + - + util/auth/useOidcConfig.ts - -util/auth/useOidcConfig.ts + +util/auth/useOidcConfig.ts - + route/auth/AuthProvider.tsx->util/auth/useOidcConfig.ts - - + + - + store/menu.slice.ts - -store/menu.slice.ts + +store/menu.slice.ts - + store/store.ts->store/menu.slice.ts - - + + - + store/auth.slice.ts - -store/auth.slice.ts + +store/auth.slice.ts - + store/store.ts->store/auth.slice.ts - - + + components/Iframe.tsx - -components/Iframe.tsx + +components/Iframe.tsx components/LinkButtons.tsx - -components/LinkButtons.tsx + +components/LinkButtons.tsx components/LinkIconsLib.tsx - -components/LinkIconsLib.tsx + +components/LinkIconsLib.tsx components/LinkButtons.tsx->components/LinkIconsLib.tsx - - + + util/envUtil.ts - -util/envUtil.ts + +util/envUtil.ts components/LinkButtons.tsx->util/envUtil.ts - - + + - + util/envUtil.ts->store/store.ts - - + + components/tab/TabComponent.tsx - -components/tab/TabComponent.tsx + +components/tab/TabComponent.tsx components/tab/subcomponents/TabRender.tsx - -components/tab/subcomponents/TabRender.tsx + +components/tab/subcomponents/TabRender.tsx components/tab/TabComponent.tsx->components/tab/subcomponents/TabRender.tsx - - + + components/tab/subcomponents/TabStyles.ts - -components/tab/subcomponents/TabStyles.ts + +components/tab/subcomponents/TabStyles.ts components/tab/TabComponent.tsx->components/tab/subcomponents/TabStyles.ts - - + + index.tsx - -index.tsx + +index.tsx index.tsx->AppProvider.tsx - - + + index.tsx->util/envUtil.ts - - + + page/LayoutPublic.tsx - -page/LayoutPublic.tsx + +page/LayoutPublic.tsx index.tsx->page/LayoutPublic.tsx - - + + route/auth/Account.tsx - -route/auth/Account.tsx + +route/auth/Account.tsx index.tsx->route/auth/Account.tsx - - + + route/auth/PrivateRoute.tsx - -route/auth/PrivateRoute.tsx + +route/auth/PrivateRoute.tsx index.tsx->route/auth/PrivateRoute.tsx - - + + route/auth/Signin.tsx - -route/auth/Signin.tsx + +route/auth/Signin.tsx index.tsx->route/auth/Signin.tsx - - + + route/digitaltwins/DigitalTwins.tsx - -route/digitaltwins/DigitalTwins.tsx + +route/digitaltwins/DigitalTwins.tsx index.tsx->route/digitaltwins/DigitalTwins.tsx - - + + route/library/Library.tsx - -route/library/Library.tsx + +route/library/Library.tsx index.tsx->route/library/Library.tsx - - + + route/workbench/Workbench.tsx - -route/workbench/Workbench.tsx + +route/workbench/Workbench.tsx index.tsx->route/workbench/Workbench.tsx - - + + + + + +page/LayoutPublic.tsx->components/LinkButtons.tsx + + page/Footer.tsx - -page/Footer.tsx + +page/Footer.tsx - + page/LayoutPublic.tsx->page/Footer.tsx - - + + + + + +util/toolbarUtil.ts + +util/toolbarUtil.ts + + + +page/LayoutPublic.tsx->util/toolbarUtil.ts + + + + + +route/auth/Account.tsx->components/tab/TabComponent.tsx + + + + + +route/auth/Account.tsx->components/tab/subcomponents/TabRender.tsx + + page/Layout.tsx - -page/Layout.tsx + +page/Layout.tsx - + route/auth/Account.tsx->page/Layout.tsx - - + + - - -route/auth/AccountTabs.tsx - -route/auth/AccountTabs.tsx + + +route/auth/AccountTabData.tsx + +route/auth/AccountTabData.tsx - - -route/auth/Account.tsx->route/auth/AccountTabs.tsx - - + + +route/auth/Account.tsx->route/auth/AccountTabData.tsx + + - + route/auth/WaitAndNavigate.tsx - -route/auth/WaitAndNavigate.tsx + +route/auth/WaitAndNavigate.tsx - + route/auth/PrivateRoute.tsx->route/auth/WaitAndNavigate.tsx - - + + - + route/digitaltwins/DigitalTwins.tsx->components/Iframe.tsx - - + + - + route/digitaltwins/DigitalTwins.tsx->util/envUtil.ts - - + + - + route/digitaltwins/DigitalTwins.tsx->components/tab/TabComponent.tsx - - + + - + route/digitaltwins/DigitalTwins.tsx->components/tab/subcomponents/TabRender.tsx - - + + - + route/digitaltwins/DigitalTwins.tsx->page/Layout.tsx - - + + - + route/digitaltwins/DigitalTwinTabData.ts - -route/digitaltwins/DigitalTwinTabData.ts + +route/digitaltwins/DigitalTwinTabData.ts - + route/digitaltwins/DigitalTwins.tsx->route/digitaltwins/DigitalTwinTabData.ts - - + + - + route/library/Library.tsx->components/Iframe.tsx - - + + - + route/library/Library.tsx->util/envUtil.ts - - + + - + route/library/Library.tsx->components/tab/TabComponent.tsx - - - - - -route/library/Library.tsx->components/tab/subcomponents/TabRender.tsx - - + + - + route/library/Library.tsx->page/Layout.tsx - - + + - + util/auth/Authentication.ts - -util/auth/Authentication.ts + +util/auth/Authentication.ts - + route/library/Library.tsx->util/auth/Authentication.ts - - + + - + route/library/LibraryTabData.ts - -route/library/LibraryTabData.ts + +route/library/LibraryTabData.ts - + route/library/Library.tsx->route/library/LibraryTabData.ts - - + + - + route/workbench/Workbench.tsx->components/LinkButtons.tsx - - + + - + route/workbench/Workbench.tsx->util/envUtil.ts - - + + - + route/workbench/Workbench.tsx->page/Layout.tsx - - + + page/DrawerComponent.tsx - -page/DrawerComponent.tsx + +page/DrawerComponent.tsx page/DrawerHeaderComponent.tsx - -page/DrawerHeaderComponent.tsx + +page/DrawerHeaderComponent.tsx page/DrawerComponent.tsx->page/DrawerHeaderComponent.tsx - - + + page/MenuItems.tsx - -page/MenuItems.tsx + +page/MenuItems.tsx page/DrawerComponent.tsx->page/MenuItems.tsx - - + + page/MenuToolbar.tsx - -page/MenuToolbar.tsx + +page/MenuToolbar.tsx page/DrawerComponent.tsx->page/MenuToolbar.tsx - - + + + + + +page/MenuToolbar.tsx->components/LinkButtons.tsx + + + + + +page/MenuToolbar.tsx->util/toolbarUtil.ts + + - + page/MenuToolbar.tsx->util/auth/Authentication.ts - - + + page/Layout.tsx->page/Footer.tsx - - + + page/Menu.tsx - -page/Menu.tsx + +page/Menu.tsx page/Layout.tsx->page/Menu.tsx - - + + - + page/Menu.tsx->store/store.ts - - + + - + page/Menu.tsx->page/DrawerComponent.tsx - - + + - + page/Menu.tsx->page/MenuToolbar.tsx - - + + - + page/Menu.tsx->store/menu.slice.ts - - + + + + + +util/toolbarUtil.ts->util/envUtil.ts + + - + util/auth/Authentication.ts->util/envUtil.ts - - + + - + util/auth/Authentication.ts->store/auth.slice.ts - - + + - + page/Title.tsx - -page/Title.tsx + +page/Title.tsx - + route/IData.ts - -route/IData.ts - - - -route/auth/AccountTabs.tsx->components/tab/TabComponent.tsx - - + +route/IData.ts - - -route/auth/AccountTabs.tsx->components/tab/subcomponents/TabRender.tsx - - + + +route/auth/AccountTabData.tsx->route/IData.ts + + - + util/auth/useOidcConfig.ts->util/envUtil.ts - - + + - + route/auth/WaitAndNavigate.tsx->util/auth/Authentication.ts - - + + - + route/digitaltwins/DigitalTwinTabData.ts->route/IData.ts - - + + - + route/library/LibraryTabData.ts->route/IData.ts - - + + diff --git a/docs/developer/client/test.svg b/docs/developer/client/test.svg index e651b2c84..4f1969af0 100644 --- a/docs/developer/client/test.svg +++ b/docs/developer/client/test.svg @@ -4,604 +4,652 @@ - - + + G - + ../src/components/Iframe.tsx - -../src/components/Iframe.tsx + +../src/components/Iframe.tsx - + +../src/components/LinkButtons.tsx + +../src/components/LinkButtons.tsx + + + +../src/components/LinkIconsLib.tsx + +../src/components/LinkIconsLib.tsx + + + +../src/components/LinkButtons.tsx->../src/components/LinkIconsLib.tsx + + + + + +../src/util/envUtil.ts + +../src/util/envUtil.ts + + + +../src/components/LinkButtons.tsx->../src/util/envUtil.ts + + + + + +../src/store/store.ts + +../src/store/store.ts + + + +../src/util/envUtil.ts->../src/store/store.ts + + + + + ../src/components/tab/TabComponent.tsx - -../src/components/tab/TabComponent.tsx + +../src/components/tab/TabComponent.tsx - + ../src/components/tab/subcomponents/TabRender.tsx - -../src/components/tab/subcomponents/TabRender.tsx + +../src/components/tab/subcomponents/TabRender.tsx - + ../src/components/tab/TabComponent.tsx->../src/components/tab/subcomponents/TabRender.tsx - - + + - + ../src/components/tab/subcomponents/TabStyles.ts - -../src/components/tab/subcomponents/TabStyles.ts + +../src/components/tab/subcomponents/TabStyles.ts - + ../src/components/tab/TabComponent.tsx->../src/components/tab/subcomponents/TabStyles.ts - - + + - + ../src/page/DrawerComponent.tsx - -../src/page/DrawerComponent.tsx + +../src/page/DrawerComponent.tsx - + ../src/page/DrawerHeaderComponent.tsx - -../src/page/DrawerHeaderComponent.tsx + +../src/page/DrawerHeaderComponent.tsx - + ../src/page/DrawerComponent.tsx->../src/page/DrawerHeaderComponent.tsx - - + + - + ../src/page/MenuItems.tsx - -../src/page/MenuItems.tsx + +../src/page/MenuItems.tsx - + ../src/page/DrawerComponent.tsx->../src/page/MenuItems.tsx - - + + - + ../src/page/MenuToolbar.tsx - -../src/page/MenuToolbar.tsx + +../src/page/MenuToolbar.tsx - + ../src/page/DrawerComponent.tsx->../src/page/MenuToolbar.tsx - - + + + + + +../src/page/MenuToolbar.tsx->../src/components/LinkButtons.tsx + + - + ../src/util/auth/Authentication.ts - -../src/util/auth/Authentication.ts + +../src/util/auth/Authentication.ts - + ../src/page/MenuToolbar.tsx->../src/util/auth/Authentication.ts - - + + + + + +../src/util/toolbarUtil.ts + +../src/util/toolbarUtil.ts + + + +../src/page/MenuToolbar.tsx->../src/util/toolbarUtil.ts + + - + ../src/page/Footer.tsx - -../src/page/Footer.tsx + +../src/page/Footer.tsx - + ../src/page/Layout.tsx - -../src/page/Layout.tsx + +../src/page/Layout.tsx - + ../src/page/Layout.tsx->../src/page/Footer.tsx - - + + - + ../src/page/Menu.tsx - -../src/page/Menu.tsx + +../src/page/Menu.tsx - + ../src/page/Layout.tsx->../src/page/Menu.tsx - - + + - + ../src/page/Menu.tsx->../src/page/DrawerComponent.tsx - - + + - + ../src/page/Menu.tsx->../src/page/MenuToolbar.tsx - - + + - + ../src/store/menu.slice.ts - -../src/store/menu.slice.ts + +../src/store/menu.slice.ts - + ../src/page/Menu.tsx->../src/store/menu.slice.ts - - - - - -../src/store/store.ts - -../src/store/store.ts + + - + ../src/page/Menu.tsx->../src/store/store.ts - - + + - + ../src/store/store.ts->../src/store/menu.slice.ts - - + + - + ../src/store/auth.slice.ts - -../src/store/auth.slice.ts + +../src/store/auth.slice.ts - + ../src/store/store.ts->../src/store/auth.slice.ts - - - - - -../src/util/envUtil.ts - -../src/util/envUtil.ts + + - + ../src/util/auth/Authentication.ts->../src/util/envUtil.ts - - + + - + ../src/util/auth/Authentication.ts->../src/store/auth.slice.ts - - + + + + + +../src/util/toolbarUtil.ts->../src/util/envUtil.ts + + - + ../src/route/IData.ts - -../src/route/IData.ts + +../src/route/IData.ts - + ../src/route/auth/AuthProvider.tsx - -../src/route/auth/AuthProvider.tsx + +../src/route/auth/AuthProvider.tsx - + ../src/util/auth/useOidcConfig.ts - -../src/util/auth/useOidcConfig.ts + +../src/util/auth/useOidcConfig.ts - + ../src/route/auth/AuthProvider.tsx->../src/util/auth/useOidcConfig.ts - - + + - + ../src/util/auth/useOidcConfig.ts->../src/util/envUtil.ts - - + + - + ../src/route/auth/PrivateRoute.tsx - -../src/route/auth/PrivateRoute.tsx + +../src/route/auth/PrivateRoute.tsx - + ../src/route/auth/WaitAndNavigate.tsx - -../src/route/auth/WaitAndNavigate.tsx + +../src/route/auth/WaitAndNavigate.tsx - + ../src/route/auth/PrivateRoute.tsx->../src/route/auth/WaitAndNavigate.tsx - - + + - + ../src/route/auth/WaitAndNavigate.tsx->../src/util/auth/Authentication.ts - - + + - + ../src/route/library/Library.tsx - -../src/route/library/Library.tsx + +../src/route/library/Library.tsx - + ../src/route/library/Library.tsx->../src/components/Iframe.tsx - - + + + + + +../src/route/library/Library.tsx->../src/util/envUtil.ts + + - + ../src/route/library/Library.tsx->../src/components/tab/TabComponent.tsx - - - - - -../src/route/library/Library.tsx->../src/components/tab/subcomponents/TabRender.tsx - - + + - + ../src/route/library/Library.tsx->../src/page/Layout.tsx - - + + - + ../src/route/library/Library.tsx->../src/util/auth/Authentication.ts - - + + - + ../src/route/library/LibraryTabData.ts - -../src/route/library/LibraryTabData.ts + +../src/route/library/LibraryTabData.ts - + ../src/route/library/Library.tsx->../src/route/library/LibraryTabData.ts - - - - - -../src/route/library/Library.tsx->../src/util/envUtil.ts - - + + - + ../src/route/library/LibraryTabData.ts->../src/route/IData.ts - - - - - -../src/util/envUtil.ts->../src/store/store.ts - - + + - + e2e/playwright/Auth.test.ts - -e2e/playwright/Auth.test.ts + +e2e/playwright/Auth.test.ts - + e2e/playwright/Links.ts - -e2e/playwright/Links.ts + +e2e/playwright/Links.ts - + e2e/playwright/Auth.test.ts->e2e/playwright/Links.ts - - + + - + e2e/playwright/Menu.test.ts - -e2e/playwright/Menu.test.ts + +e2e/playwright/Menu.test.ts - + e2e/playwright/Menu.test.ts->e2e/playwright/Links.ts - - + + - + e2e/playwright/auth.setup.ts - -e2e/playwright/auth.setup.ts + +e2e/playwright/auth.setup.ts - + integration/authRedux.test.tsx - -integration/authRedux.test.tsx + +integration/authRedux.test.tsx - + integration/authRedux.test.tsx->../src/route/auth/PrivateRoute.tsx - - + + - + integration/authRedux.test.tsx->../src/route/library/Library.tsx - - + + - + integration/authRedux.test.tsx->../src/store/auth.slice.ts - - + + - + unitTests/testUtils.tsx - -unitTests/testUtils.tsx + +unitTests/testUtils.tsx - + integration/authRedux.test.tsx->unitTests/testUtils.tsx - - + + - + testUtil.ts - -testUtil.ts + +testUtil.ts - + unitTests/Components/Iframe.test.tsx - -unitTests/Components/Iframe.test.tsx + +unitTests/Components/Iframe.test.tsx - + unitTests/Components/Linkbuttons.test.tsx - -unitTests/Components/Linkbuttons.test.tsx + +unitTests/Components/Linkbuttons.test.tsx - + unitTests/Components/PrivateRoute.test.tsx - -unitTests/Components/PrivateRoute.test.tsx + +unitTests/Components/PrivateRoute.test.tsx - + unitTests/Components/PrivateRoute.test.tsx->../src/route/auth/PrivateRoute.tsx - - + + - + unitTests/Components/PrivateRoute.test.tsx->unitTests/testUtils.tsx - - + + - + unitTests/Components/TabComponent.test.tsx - -unitTests/Components/TabComponent.test.tsx + +unitTests/Components/TabComponent.test.tsx - + unitTests/Page/Layout.test.tsx - -unitTests/Page/Layout.test.tsx + +unitTests/Page/Layout.test.tsx - + unitTests/Page/page.testUtils.tsx - -unitTests/Page/page.testUtils.tsx + +unitTests/Page/page.testUtils.tsx - + unitTests/Page/Layout.test.tsx->unitTests/Page/page.testUtils.tsx - - + + - + unitTests/Page/page.testUtils.tsx->unitTests/testUtils.tsx - - + + - + unitTests/Page/LayoutPublic.test.tsx - -unitTests/Page/LayoutPublic.test.tsx + +unitTests/Page/LayoutPublic.test.tsx - + unitTests/Page/LayoutPublic.test.tsx->unitTests/Page/page.testUtils.tsx - - + + + + + +unitTests/Routes/Account.test.tsx + +unitTests/Routes/Account.test.tsx + + + +unitTests/Routes/Account.test.tsx->unitTests/testUtils.tsx + + - + unitTests/Routes/DigitalTwins.test.tsx - -unitTests/Routes/DigitalTwins.test.tsx + +unitTests/Routes/DigitalTwins.test.tsx - + unitTests/Routes/DigitalTwins.test.tsx->unitTests/testUtils.tsx - - - - - -unitTests/__mocks__/global_mocks.ts - -unitTests/__mocks__/global_mocks.ts - - - -unitTests/Routes/DigitalTwins.test.tsx->unitTests/__mocks__/global_mocks.ts - - + + - + unitTests/Routes/Library.test.tsx - -unitTests/Routes/Library.test.tsx + +unitTests/Routes/Library.test.tsx - + unitTests/Routes/Library.test.tsx->../src/route/auth/AuthProvider.tsx - - + + - + unitTests/Routes/Library.test.tsx->unitTests/testUtils.tsx - - + + + + + +unitTests/__mocks__/global_mocks.ts + +unitTests/__mocks__/global_mocks.ts - + unitTests/Routes/Library.test.tsx->unitTests/__mocks__/global_mocks.ts - - + + - + unitTests/Routes/SignIn.test.tsx - -unitTests/Routes/SignIn.test.tsx + +unitTests/Routes/SignIn.test.tsx - + unitTests/Routes/Workbench.test.tsx - -unitTests/Routes/Workbench.test.tsx + +unitTests/Routes/Workbench.test.tsx - + unitTests/Routes/Workbench.test.tsx->unitTests/testUtils.tsx - - + + - + unitTests/Util/Store.test.ts - -unitTests/Util/Store.test.ts + +unitTests/Util/Store.test.ts - + unitTests/Util/envUtil.test.ts - -unitTests/Util/envUtil.test.ts + +unitTests/Util/envUtil.test.ts - + unitTests/__mocks__/component_mocks.tsx - -unitTests/__mocks__/component_mocks.tsx + +unitTests/__mocks__/component_mocks.tsx - + unitTests/__mocks__/page_mocks.tsx - -unitTests/__mocks__/page_mocks.tsx + +unitTests/__mocks__/page_mocks.tsx - + unitTests/auth/AuthProvider.test.tsx - -unitTests/auth/AuthProvider.test.tsx + +unitTests/auth/AuthProvider.test.tsx - + unitTests/auth/AuthProvider.test.tsx->../src/route/auth/AuthProvider.tsx - - + + - + unitTests/auth/AuthProvider.test.tsx->../src/util/auth/useOidcConfig.ts - - + + - + unitTests/jest.setup.ts - -unitTests/jest.setup.ts + +unitTests/jest.setup.ts - + unitTests/jest.setup.ts->unitTests/__mocks__/global_mocks.ts - - + + - + unitTests/jest.setup.ts->unitTests/__mocks__/component_mocks.tsx - - + + - + unitTests/jest.setup.ts->unitTests/__mocks__/page_mocks.tsx - - + + diff --git a/docs/developer/servers/lib/src.svg b/docs/developer/servers/lib/src.svg index fa70de5f4..29051b737 100644 --- a/docs/developer/servers/lib/src.svg +++ b/docs/developer/servers/lib/src.svg @@ -4,148 +4,166 @@ - - + + G - + app.module.ts - -app.module.ts + +app.module.ts files/files.module.ts - -files/files.module.ts + +files/files.module.ts app.module.ts->files/files.module.ts - - + + - + files/resolvers/files.resolver.ts - -files/resolvers/files.resolver.ts + +files/resolvers/files.resolver.ts - + files/files.module.ts->files/resolvers/files.resolver.ts - - + + - + files/services/files-service.factory.ts - -files/services/files-service.factory.ts + +files/services/files-service.factory.ts - + files/files.module.ts->files/services/files-service.factory.ts - - + + - + files/services/local-files.service.ts - -files/services/local-files.service.ts + +files/services/local-files.service.ts - + files/files.module.ts->files/services/local-files.service.ts - - + + bootstrap.ts - -bootstrap.ts + +bootstrap.ts bootstrap.ts->app.module.ts - - + + + + + +cloudcmd/cloudcmd.ts + +cloudcmd/cloudcmd.ts + + + +bootstrap.ts->cloudcmd/cloudcmd.ts + + + + + +cloudcmd/cloudcmd.ts->cloudcmd/cloudcmd.ts + + - + files/resolvers/files.resolver.ts->files/services/files-service.factory.ts - - + + - + files/interfaces/files.service.interface.ts - -files/interfaces/files.service.interface.ts + +files/interfaces/files.service.interface.ts - + files/resolvers/files.resolver.ts->files/interfaces/files.service.interface.ts - - + + - + types.ts - -types.ts + +types.ts - + files/resolvers/files.resolver.ts->types.ts - - + + - + files/services/files-service.factory.ts->files/services/local-files.service.ts - - + + - + files/services/files-service.factory.ts->files/interfaces/files.service.interface.ts - - + + - + files/services/local-files.service.ts->files/interfaces/files.service.interface.ts - - + + - + files/services/local-files.service.ts->types.ts - - + + - + files/interfaces/files.service.interface.ts->types.ts - - + + - + main.ts - -main.ts + +main.ts - + main.ts->bootstrap.ts - - + + diff --git a/docs/developer/servers/lib/test.svg b/docs/developer/servers/lib/test.svg index 7a512cc5e..4ee2fd870 100644 --- a/docs/developer/servers/lib/test.svg +++ b/docs/developer/servers/lib/test.svg @@ -123,8 +123,14 @@ - + +cloudcmd/cloudcmd.spec.ts + +cloudcmd/cloudcmd.spec.ts + + + e2e/app.e2e.spec.ts e2e/app.e2e.spec.ts @@ -136,7 +142,7 @@ - + testUtil.ts testUtil.ts @@ -144,11 +150,11 @@ e2e/app.e2e.spec.ts->testUtil.ts - - + + - + integration/files.service.integration.spec.ts integration/files.service.integration.spec.ts @@ -156,29 +162,29 @@ integration/files.service.integration.spec.ts->../src/files/resolvers/files.resolver.ts - - + + integration/files.service.integration.spec.ts->../src/files/services/files-service.factory.ts - - + + integration/files.service.integration.spec.ts->../src/files/services/local-files.service.ts - - + + integration/files.service.integration.spec.ts->testUtil.ts - - + + - + unit/files-service.factory.unit.spec.ts unit/files-service.factory.unit.spec.ts @@ -186,23 +192,23 @@ unit/files-service.factory.unit.spec.ts->../src/files/services/files-service.factory.ts - - + + unit/files-service.factory.unit.spec.ts->../src/files/services/local-files.service.ts - - + + unit/files-service.factory.unit.spec.ts->../src/files/interfaces/files.service.interface.ts - - + + - + unit/files.resolver.unit.spec.ts unit/files.resolver.unit.spec.ts @@ -210,29 +216,29 @@ unit/files.resolver.unit.spec.ts->../src/files/resolvers/files.resolver.ts - - + + unit/files.resolver.unit.spec.ts->../src/files/services/files-service.factory.ts - - + + unit/files.resolver.unit.spec.ts->../src/files/interfaces/files.service.interface.ts - - + + unit/files.resolver.unit.spec.ts->testUtil.ts - - + + - + unit/local-files.service.unit.spec.ts unit/local-files.service.unit.spec.ts @@ -240,14 +246,14 @@ unit/local-files.service.unit.spec.ts->../src/files/services/local-files.service.ts - - + + unit/local-files.service.unit.spec.ts->testUtil.ts - - + + diff --git a/docs/developer/system/DTaaS.drawio b/docs/developer/system/DTaaS.drawio index 2d8230ecf..a9678559f 100755 --- a/docs/developer/system/DTaaS.drawio +++ b/docs/developer/system/DTaaS.drawio @@ -1,6 +1,6 @@ - + - + @@ -2923,171 +2923,123 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + - - + + - + - + + + + - - - - - + + - - - - - - - - - - - - - - + + - - + + - - + + - + - + - + - - + + - + - + - - - - - - - - - - + + + + + + + - - - - - - - - + + - - + + - + - - - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + + + + + - - - - + - + - + - - + + - - + + + + + - + @@ -3099,7 +3051,7 @@ - + @@ -3107,81 +3059,64 @@ - - + + - - - - - - - + + - - - - - - - - + + - - + + - - + + + + + - - + + - - + + - - - - - - - - - - + - + - + - + - + - + - - + + - + - + @@ -3243,189 +3178,39 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -3488,7 +3273,7 @@ - + @@ -3562,92 +3347,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -3701,7 +3400,7 @@ - + @@ -3796,7 +3495,7 @@ - + @@ -3848,7 +3547,7 @@ - + @@ -3884,10 +3583,10 @@ - + - + @@ -3897,6 +3596,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/redirect-page.html b/docs/redirect-page.html index a11d206c0..daf74812e 100644 --- a/docs/redirect-page.html +++ b/docs/redirect-page.html @@ -62,6 +62,11 @@ Online PDF +
+ Version 0.5.0 + Online + +
Version 0.4.0 Online diff --git a/docs/thanks.md b/docs/thanks.md index aa56ca729..95526d268 100644 --- a/docs/thanks.md +++ b/docs/thanks.md @@ -4,17 +4,41 @@ ## Users -Cláudio Ângelo Gonçalves Gomes, Dmitri Tcherniak, -Elif Ecem Bas, Giuseppe Abbiati, Hao Feng, -Henrik Ejersbo, Tanusree Roy, Farshid Naseri +Cláudio Ângelo Gonçalves Gomes, +Dmitri Tcherniak, +Elif Ecem Bas, +Farshid Naseri, +Giuseppe Abbiati, +Hannes Iven, +Hao Feng, +Henrik Ejersbo, +Lars Vosteen, +Lei Zhao, +Mirgita Frasheri, +Morten Haahr Kristensen, +Neena Goveas, +Tanusree Roy, +Santiago Gil Arboleda, +Swarup Mahato, +Valdemar Tang ## Example Contributors - - -!!! failure - Cite all example providers and recent users - +| Example Name | Contributors | +|:---|:---| +| Mass Spring Damper | Prasad Talasila | +| Water Tank Fault Injection | Henrik Ejersbo and Mirgita Frasheri | +| Water Tank Model Swap | Henrik Ejersbo and Mirgita Frasheri | +| Desktop Robotti with RabbitMQ | Mirgita Frasheri | +| Water Treatment Plant and OPC-UA | Lucia Royo and Alejandro Labarias | +| Three Water Tanks with DT Manager Framework | Santiago Gil Arboleda | +| Flex-Cell with Two Industrial Robots | Santiago Gil Arboleda | +| Incubator | Morten Haahr Kristensen | +| Firefighters in Emergency Environments | Lars Vosteen and Hannes Iven | +| Mass Spring Damper with NuRV Runtime Monitor | Alberto Bonizzi | +| Incubator with NuRV Runtime Monitor | Alberto Bonizzi and Morten Haahr Kristensen | +| Incubator with NuRV Runtime Monitor Service | Valdemar Tang | +| Water Tank Fault Injection with NuRV Runtime Monitor | Alberto Bonizzi | ## Documentation diff --git a/docs/user/servers/execution/runner/README.md b/docs/user/servers/execution/runner/README.md index 0036a259c..17f4a76f9 100644 --- a/docs/user/servers/execution/runner/README.md +++ b/docs/user/servers/execution/runner/README.md @@ -1,4 +1,4 @@ -# :runner: Runner +# Runner A utility service to manage safe execution of remote scripts / commands. User launches this from commandline and let the utility diff --git a/docs/user/servers/lib/LIB-MS.md b/docs/user/servers/lib/LIB-MS.md index 86b057614..9f19f1c7e 100644 --- a/docs/user/servers/lib/LIB-MS.md +++ b/docs/user/servers/lib/LIB-MS.md @@ -59,121 +59,118 @@ Replace `path` with the desired directory path. send requests to: -=== "GraphQL Query" - - ``` graphql-query - query { - listDirectory(path: "user1") { - repository { - tree { - blobs { - edges { - node { - name - type - } - } +#### GraphQL query for list of contents + +``` graphql +query { + listDirectory(path: "user1") { + repository { + tree { + blobs { + edges { + node { + name + type } - trees { - edges { - node { - name - type - } - } + } + } + trees { + edges { + node { + name + type } } } } } - - ``` - -=== "GraphQL Response" - - ``` graphql-response - { - "data": { - "listDirectory": { - "repository": { - "tree": { - "blobs": { - "edges": [] + } +} +``` + +#### GraphQL response for list of contents + +``` graphql +{ + "data": { + "listDirectory": { + "repository": { + "tree": { + "blobs": { + "edges": [] + }, + "trees": { + "edges": [ + { + "node": { + "name": "common", + "type": "tree" + } + }, + { + "node": { + "name": "data", + "type": "tree" + } + }, + { + "node": { + "name": "digital twins", + "type": "tree" + } + }, + { + "node": { + "name": "functions", + "type": "tree" + } + }, + { + "node": { + "name": "models", + "type": "tree" + } }, - "trees": { - "edges": [ - { - "node": { - "name": "common", - "type": "tree" - } - }, - { - "node": { - "name": "data", - "type": "tree" - } - }, - { - "node": { - "name": "digital twins", - "type": "tree" - } - }, - { - "node": { - "name": "functions", - "type": "tree" - } - }, - { - "node": { - "name": "models", - "type": "tree" - } - }, - { - "node": { - "name": "tools", - "type": "tree" - } - } - ] + { + "node": { + "name": "tools", + "type": "tree" + } } - } + ] } } } } - - ``` - -=== "HTTP Request" - - ``` http-request - POST /lib HTTP/1.1 - Host: foo.com - Content-Type: application/json - Content-Length: 388 - - { - "query":"query {\n listDirectory(path: \"user1\") {\n repository {\n tree {\n blobs {\n edges {\n node {\n name\n type\n }\n }\n }\n trees {\n edges {\n node {\n name\n type\n }\n }\n }\n }\n }\n }\n}" - } - - ``` - -=== "HTTP Response" - - ``` http-response - HTTP/1.1 200 OK - Access-Control-Allow-Origin: * - Connection: close - Content-Length: 306 - Content-Type: application/json; charset=utf-8 - Date: Tue, 26 Sep 2023 20:26:49 GMT - X-Powered-By: Express - {"data":{"listDirectory":{"repository":{"tree":{"blobs":{"edges":[]},"trees":{"edges":[{"node":{"name":"data","type":"tree"}},{"node":{"name":"digital twins","type":"tree"}},{"node":{"name":"functions","type":"tree"}},{"node":{"name":"models","type":"tree"}},{"node":{"name":"tools","type":"tree"}}]}}}}}} - ``` + } +} +``` + +#### HTTP request for list of contents + +``` http +POST /lib HTTP/1.1 +Host: foo.com +Content-Type: application/json +Content-Length: 388 + +{ + "query":"query {\n listDirectory(path: \"user1\") {\n repository {\n tree {\n blobs {\n edges {\n node {\n name\n type\n }\n }\n }\n trees {\n edges {\n node {\n name\n type\n }\n }\n }\n }\n }\n }\n}" +} +``` + +#### HTTP response for list of contents + +``` http +HTTP/1.1 200 OK +Access-Control-Allow-Origin: * +Connection: close +Content-Length: 306 +Content-Type: application/json; charset=utf-8 +Date: Tue, 26 Sep 2023 20:26:49 GMT +X-Powered-By: Express +{"data":{"listDirectory":{"repository":{"tree":{"blobs":{"edges":[]},"trees":{"edges":[{"node":{"name":"data","type":"tree"}},{"node":{"name":"digital twins","type":"tree"}},{"node":{"name":"functions","type":"tree"}},{"node":{"name":"models","type":"tree"}},{"node":{"name":"tools","type":"tree"}}]}}}}}} +``` ### Fetch a file from the available files @@ -182,70 +179,70 @@ This query receives directory path and send the file contents to user in respons To check this query, create a file `files/user2/data/welcome.txt` with content of `hello world`. -=== "GraphQL Request" - - ```graphql-request - query { - readFile(path: "user2/data/sample.txt") { - repository { - blobs { - nodes { - name - rawBlob - rawTextBlob - } - } +#### GraphQL query for fetch a file + +``` graphql +query { + readFile(path: "user2/data/sample.txt") { + repository { + blobs { + nodes { + name + rawBlob + rawTextBlob } } } - ``` - -=== "GraphQL Response" - - ```graphql-response - { - "data": { - "readFile": { - "repository": { - "blobs": { - "nodes": [ - { - "name": "sample.txt", - "rawBlob": "hello world", - "rawTextBlob": "hello world" - } - ] + } +} +``` + +#### GraphQL response for fetch a file + +``` graphql +{ + "data": { + "readFile": { + "repository": { + "blobs": { + "nodes": [ + { + "name": "sample.txt", + "rawBlob": "hello world", + "rawTextBlob": "hello world" } - } + ] } } } - ``` - -=== "HTTP Request" - - ```http-request - POST /lib HTTP/1.1 - Host: foo.com - Content-Type: application/json - Content-Length: 217 - { - "query":"query {\n readFile(path: \"user2/data/welcome.txt\") {\n repository {\n blobs {\n nodes {\n name\n rawBlob\n rawTextBlob\n }\n }\n }\n }\n}" - } - ``` - -=== "HTTP Response" - - ```http-response - HTTP/1.1 200 OK - Access-Control-Allow-Origin: * - Connection: close - Content-Length: 134 - Content-Type: application/json; charset=utf-8 - Date: Wed, 27 Sep 2023 09:17:18 GMT - X-Powered-By: Express - {"data":{"readFile":{"repository":{"blobs":{"nodes":[{"name":"welcome.txt","rawBlob":"hello world","rawTextBlob":"hello world"}]}}}}} - ``` + } +} +``` + +#### HTTP request for fetch a file + +``` http +POST /lib HTTP/1.1 +Host: foo.com +Content-Type: application/json +Content-Length: 217 +{ + "query":"query {\n readFile(path: \"user2/data/welcome.txt\") {\n repository {\n blobs {\n nodes {\n name\n rawBlob\n rawTextBlob\n }\n }\n }\n }\n}" +} +``` + +#### HTTP response for fetch a file + +``` http +HTTP/1.1 200 OK +Access-Control-Allow-Origin: * +Connection: close +Content-Length: 134 +Content-Type: application/json; charset=utf-8 +Date: Wed, 27 Sep 2023 09:17:18 GMT +X-Powered-By: Express +{"data":{"readFile":{"repository":{"blobs":{"nodes":[{"name":"welcome.txt","rawBlob":"hello world","rawTextBlob":"hello world"}]}}}}} +``` The _path_ refers to the file path to look at: For example, _user1_ looks at files of