From d2a15b6e827315c0eb911d08c4de04518fbf20ef Mon Sep 17 00:00:00 2001 From: Adrian D'Alessandro Date: Tue, 17 Oct 2023 17:01:40 +0100 Subject: [PATCH 01/10] Remove unused credentials setup --- configure.py | 2 -- credentials.setup.json | 12 ------------ 2 files changed, 14 deletions(-) delete mode 100644 credentials.setup.json diff --git a/configure.py b/configure.py index bc20e07..751e489 100755 --- a/configure.py +++ b/configure.py @@ -5,8 +5,6 @@ Finds the line in docker-compose.setup.ove.yml that contain the host IP address and replaces the value with the IP address of the machine in the new file. - -Does the same for config/credentials.json file. """ import logging diff --git a/credentials.setup.json b/credentials.setup.json deleted file mode 100644 index db58c44..0000000 --- a/credentials.setup.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "default": "default", - "stores": [ - { - "name": "default", - "endpoint": "ovehub-ove-asset-storage:9000", - "proxyUrl": "http://0.0.0.0:6081/default/", - "accessKey": "MINIO_ACCESS_KEY", - "secretKey": "MINIO_SECRET_KEY" - } - ] -} \ No newline at end of file From 86360a329a5fbb32759bcf308ea7ac0e75790f2d Mon Sep 17 00:00:00 2001 From: Adrian D'Alessandro Date: Tue, 17 Oct 2023 17:02:11 +0100 Subject: [PATCH 02/10] Add local to the default run.py --- run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 5a82aac..0eaf868 100644 --- a/run.sh +++ b/run.sh @@ -1,2 +1,2 @@ -python configure.py develop +python configure.py develop local docker-compose up -d From d1b8d67c961a67f1d027f73ce23b8033404ba31e Mon Sep 17 00:00:00 2001 From: Adrian D'Alessandro Date: Thu, 19 Oct 2023 16:19:13 +0100 Subject: [PATCH 03/10] Only use docker volume in develop mode. Fix Image URL --- configure.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.py b/configure.py index 751e489..434318e 100755 --- a/configure.py +++ b/configure.py @@ -70,7 +70,6 @@ def generate_docker_compose( logging.info("Adding dash app to docker-compose.yml...") docker_compose["services"]["dash"] = { "ports": ["8050:8050"], - "volumes": ["./app:/app"], "environment": { "API_URL": f"http://{lines_to_replace['OVE_HOST']}", "PLOT_URL": f"http://{lines_to_replace['PLOT_URL']}", @@ -80,10 +79,11 @@ def generate_docker_compose( } if develop: docker_compose["services"]["dash"]["build"] = "." + docker_compose["services"]["dash"]["volumes"] = ["./app:/app"] else: docker_compose["services"]["dash"][ "image" - ] = "ghcr.io/imperialcollegelondon/gridlington-vis:main" + ] = "ghcr.io/imperialcollegelondon/gridlington-vis:latest" if local: docker_compose["services"]["ovehub-ove-apps"]["image"] = "ove-apps:9.9.9" docker_compose["services"]["ovehub-ove-ove"]["image"] = "ove-ove:9.9.9" From 155abae47c752c007a5f08eef000a53aaf289835 Mon Sep 17 00:00:00 2001 From: Adrian D'Alessandro Date: Fri, 20 Oct 2023 12:33:55 +0100 Subject: [PATCH 04/10] Create run_develop.sh --- run.sh | 2 +- run_develop.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 run_develop.sh diff --git a/run.sh b/run.sh index 0eaf868..5bd54b6 100644 --- a/run.sh +++ b/run.sh @@ -1,2 +1,2 @@ -python configure.py develop local +python configure.py local docker-compose up -d diff --git a/run_develop.sh b/run_develop.sh new file mode 100644 index 0000000..0eaf868 --- /dev/null +++ b/run_develop.sh @@ -0,0 +1,2 @@ +python configure.py develop local +docker-compose up -d From dc90a516c84c957fc63fcea45047d2d7dd540870 Mon Sep 17 00:00:00 2001 From: Adrian D'Alessandro Date: Fri, 20 Oct 2023 16:23:41 +0100 Subject: [PATCH 05/10] Use the latest dockerhub images for ove --- configure.py | 11 ++--------- docker-compose.setup.ove.yml | 6 +++--- run_develop.sh | 2 +- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/configure.py b/configure.py index 434318e..193dfa8 100755 --- a/configure.py +++ b/configure.py @@ -26,9 +26,7 @@ def get_ip_address() -> str: return ip -def generate_docker_compose( - template_file: str, ip: str, develop: bool = False, local: bool = False -) -> None: +def generate_docker_compose(template_file: str, ip: str, develop: bool = False) -> None: """Generate the docker-compose.yml file. Uses a template file and the IP address of the machine. @@ -37,7 +35,6 @@ def generate_docker_compose( template_file: Path to the template file. ip: IP address of the machine. develop: Flag for when running in develop mode. - local: Flag for when running locally with locally-built docker images. Returns: None @@ -80,14 +77,11 @@ def generate_docker_compose( if develop: docker_compose["services"]["dash"]["build"] = "." docker_compose["services"]["dash"]["volumes"] = ["./app:/app"] + docker_compose["services"]["dash"]["environment"]["DH_URL"] = "http://127.0.0.1" else: docker_compose["services"]["dash"][ "image" ] = "ghcr.io/imperialcollegelondon/gridlington-vis:latest" - if local: - docker_compose["services"]["ovehub-ove-apps"]["image"] = "ove-apps:9.9.9" - docker_compose["services"]["ovehub-ove-ove"]["image"] = "ove-ove:9.9.9" - docker_compose["services"]["ovehub-ove-ui"]["image"] = "ove-ui:9.9.9" # Configure logging for nginx logging.info("Adding volume for nginx logs...") @@ -107,5 +101,4 @@ def generate_docker_compose( "docker-compose.setup.ove.yml", ip, develop="develop" in sys.argv, - local="local" in sys.argv, ) diff --git a/docker-compose.setup.ove.yml b/docker-compose.setup.ove.yml index 73a6df3..956ba7b 100644 --- a/docker-compose.setup.ove.yml +++ b/docker-compose.setup.ove.yml @@ -1,13 +1,13 @@ version: '3.1' services: ovehub-ove-ove: - image: ovehub/ove:0.5.0 + image: ovehub/ove:0.6.3 restart: unless-stopped volumes: - ./config/Spaces.json:/usr/src/app/packages/ove-core/dist/client/Spaces.json:ro ovehub-ove-apps: - image: ovehub/ove-apps:0.5.0 + image: ovehub/ove-apps:0.6.4 restart: unless-stopped depends_on: - ovehub-ove-ove @@ -17,7 +17,7 @@ services: OPENVIDU_SECRET: "MY_SECRET" ovehub-ove-ui: - image: ovehub/ove-ui:0.2.0 + image: ovehub/ove-ui:0.2.1 restart: unless-stopped depends_on: - ovehub-ove-ove diff --git a/run_develop.sh b/run_develop.sh index 0eaf868..5a82aac 100644 --- a/run_develop.sh +++ b/run_develop.sh @@ -1,2 +1,2 @@ -python configure.py develop local +python configure.py develop docker-compose up -d From fb8ea960c903a26635667e5ff3a2ff0b644d1228 Mon Sep 17 00:00:00 2001 From: Adrian D'Alessandro Date: Fri, 20 Oct 2023 16:56:44 +0100 Subject: [PATCH 06/10] Document process for sharing screen with WebRTC --- README.md | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 5d4b125..36db22c 100644 --- a/README.md +++ b/README.md @@ -29,22 +29,18 @@ Utimately, we will want to automate this setup as much as possible so the enviro ## Current steps for Running a WebRTC app and sharing an application window -1. Make sure nothings running -2. Run `run.sh`` for vis system to run config script and docker-compose - * For local/develop versions, use locally built images (the run.sh should cover the config for this). Images must be named: - * ove-apps:9.9.9 - * ove-ove:9.9.9 - * ove-ui:9.9.9 - * Check get_ip_address is correct - * Check ip address from configure.py is running OVE -3. Go to OVE Core at http://localhost:8080 -4. Select "Launch new OVE Application instances" -5. Select WebRTC application, fill in settings and launch instance -6. Start call button on controller and get session ID - * Note: closing controller ends the session -7. Go to openvidu ip address and manually trust website (OPENVIDU_HOST in the docker-compose.yml) -8. Log in with username: admin, password: (OPENVIDU_SECRET from docker-compose.yml) -9. Enter session ID (from controller window) as room name and join the call -10. Share a window and check it can be viewed from other windows +1. Make sure nothing's running +2. Run `bash run_develop.sh` for vis system to run config script and `docker-compose.yml` + * For production, use `run.sh` +3. Go to OVE Core at the IP address defined in the `API_URL` environment variable you will now find in `docker-compose.yml` +4. Go to OpenVidu IP address and manually trust website (OPENVIDU_HOST in the `docker-compose.yml`) +5. Log in with username: admin, password: (OPENVIDU_SECRET from docker-compose.yml) +6. Open the View - link under Space Layouts, will be something like `IP`/view.html?oveViewId=PC01-Top-0 +7. Open the Controller - link is ID Number under sections +8. Start the call from the Controller - will generate and display a Session ID +9. Copy the Session ID into the OpenVidu textbox to join the call (there should be three users connected to the call) +10. Share the application (NMX) window into the video call +11. Go to the Controller and select the desired screen to share. It should have a yellow box around it once selected. +12. Confirm the view is displaying the screen. **Note:** Only one screen can be shared from one browser, so multiple screens will require multiple computers/browsers/incognito windows etc. From caa4659ae9f127982df0334062d08a1ac99b2354 Mon Sep 17 00:00:00 2001 From: Adrian D'Alessandro Date: Fri, 20 Oct 2023 16:59:13 +0100 Subject: [PATCH 07/10] Remove local argument from run.sh --- run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 5bd54b6..83334d1 100644 --- a/run.sh +++ b/run.sh @@ -1,2 +1,2 @@ -python configure.py local +python configure.py docker-compose up -d From 924444ed77ccd0eb4336836ddb18993e3005d9eb Mon Sep 17 00:00:00 2001 From: Adrian D'Alessandro Date: Fri, 20 Oct 2023 17:21:16 +0100 Subject: [PATCH 08/10] Document some production steps / requirements --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 36db22c..131b92e 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,17 @@ N.B. The `configure.py` setup process is required because the actual IP address A test version of the app is deployed at http://liionsden.rcs.ic.ac.uk:8080/ (internal access only). +This service is mostly automated with a few steps required to be run outside of the docker container causing som limitations. To run a production version of this, the required files and directories are: + +- `docker-compose.setup.ove.yml` +- `configure.py` +- `run.sh` +- `config/` +- `logs/` - this can be empty +- A `.env` file to define `MY_SECRET` for the OpenVidu login + +To run the production version should be as simple as running `bash run.sh` with the above files alongside any override for watchtower etc. + Utimately, we will want to automate this setup as much as possible so the environment (local testing vs. deployment) is autodetected. For now, the configuration files differ from those generated in the above setup in the following ways: **config/default.conf:** @@ -31,7 +42,7 @@ Utimately, we will want to automate this setup as much as possible so the enviro 1. Make sure nothing's running 2. Run `bash run_develop.sh` for vis system to run config script and `docker-compose.yml` - * For production, use `run.sh` + - For production, use `run.sh` 3. Go to OVE Core at the IP address defined in the `API_URL` environment variable you will now find in `docker-compose.yml` 4. Go to OpenVidu IP address and manually trust website (OPENVIDU_HOST in the `docker-compose.yml`) 5. Log in with username: admin, password: (OPENVIDU_SECRET from docker-compose.yml) From 768881f65468911893d4de5e7ce31e1259b27a36 Mon Sep 17 00:00:00 2001 From: Adrian D'Alessandro Date: Fri, 20 Oct 2023 17:39:00 +0100 Subject: [PATCH 09/10] Include openvidu install link --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 131b92e..d0d70ae 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ Utimately, we will want to automate this setup as much as possible so the enviro + server_name liionsden.rcs.ic.ac.uk; ``` +There is also a requirements to have the OpenVidu server running - see [Deploying OpenVidu CE on premises](https://docs.openvidu.io/en/stable/deployment/ce/on-premises/) + ## Current steps for Running a WebRTC app and sharing an application window 1. Make sure nothing's running From 8a33385349978470e497dc902bfa5520a6aca330 Mon Sep 17 00:00:00 2001 From: Adrian D'Alessandro Date: Mon, 23 Oct 2023 16:27:02 +0100 Subject: [PATCH 10/10] Apply suggestions from code review Co-authored-by: Tom Bland --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d0d70ae..452dfe7 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ N.B. The `configure.py` setup process is required because the actual IP address A test version of the app is deployed at http://liionsden.rcs.ic.ac.uk:8080/ (internal access only). -This service is mostly automated with a few steps required to be run outside of the docker container causing som limitations. To run a production version of this, the required files and directories are: +This service is mostly automated with a few steps required to be run outside of the docker container causing some limitations. To run a production version of this, the required files and directories are: - `docker-compose.setup.ove.yml` - `configure.py` @@ -48,8 +48,8 @@ There is also a requirements to have the OpenVidu server running - see [Deployin 3. Go to OVE Core at the IP address defined in the `API_URL` environment variable you will now find in `docker-compose.yml` 4. Go to OpenVidu IP address and manually trust website (OPENVIDU_HOST in the `docker-compose.yml`) 5. Log in with username: admin, password: (OPENVIDU_SECRET from docker-compose.yml) -6. Open the View - link under Space Layouts, will be something like `IP`/view.html?oveViewId=PC01-Top-0 -7. Open the Controller - link is ID Number under sections +6. Return to OVE Core, open the View for the desired WebRTC space - link under Space Layouts, will be something like `IP`/view.html?oveViewId=PC01-Top-0 +7. Open the Controller - link is ID Number under Sections 8. Start the call from the Controller - will generate and display a Session ID 9. Copy the Session ID into the OpenVidu textbox to join the call (there should be three users connected to the call) 10. Share the application (NMX) window into the video call