Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
97ed439
Fixing long delay on Python Tests and overall performance by removing…
antonio-amjr Oct 21, 2024
67f41ab
fix typo: linux/arm64 (#445)
rxwen Oct 23, 2024
7e969fd
User guide: Fix command to execute sdk container (#428)
hiltonlima Oct 23, 2024
eefd3fe
update history (#425)
hiltonlima Oct 23, 2024
0c85bda
Updated backend sha
rquidute Nov 18, 2024
9e44c8b
Updated backend sha
rquidute Nov 19, 2024
1b00224
Updated CLI and backend submodules
rquidute Dec 4, 2024
8f35362
Merge fall v2.11+fall2024
rquidute Dec 12, 2024
03a6729
Fixed after merge
rquidute Dec 17, 2024
44e20d5
Updated backend
rquidute Dec 27, 2024
6d30811
docs: Update Ubuntu version to 24.04.1 in TH User Guide (#512)
swan-amazon Dec 30, 2024
e688ced
Updated backend
rquidute Jan 6, 2025
c77b984
Updated backend
rquidute Jan 6, 2025
1c086b9
UG- Added Reuse commissioning information section (#514)
rquidute Jan 7, 2025
dec6102
Update README.md (#511)
kiel-apple Jan 10, 2025
60fad7c
[FIX] Update Network Check Method In Installation Script (#517)
antonio-amjr Jan 10, 2025
8b85810
Create log files for installation scripts (#518)
hiltonlima Jan 15, 2025
56e90d6
Updated backend and cli
rquidute Jan 15, 2025
49aed8e
Updated backend sha in docker-compose file
rquidute Jan 15, 2025
7ff21a9
Updated backend
rquidute Jan 23, 2025
d01a0aa
Updating CLI with the Poetry install fix and some minor changes (#524)
antonio-amjr Feb 7, 2025
85571e2
Version v2.12-beta1+spring2025
rquidute Feb 11, 2025
8a5922e
Updated backend
rquidute Feb 12, 2025
6720193
Fixing auto-update script with error check (#528)
antonio-amjr Feb 12, 2025
52495f9
Version v2.12-beta2+spring2025
rquidute Feb 12, 2025
899678c
Version v2.12-beta3+spring2025
rquidute Feb 13, 2025
c3bf080
Undo changes in auto-update.sh file
rquidute Feb 13, 2025
c3def59
Fix cli dependency syntax
rquidute Feb 18, 2025
6a93373
Upgraded node version to v20.x
rquidute Jan 6, 2025
9698b5d
Updated frontend - performance
rquidute Jan 8, 2025
8233bca
Updating HASHs and docker compose (#519)
antonio-amjr Jan 15, 2025
19a5b39
Updating backend HASH (#521)
antonio-amjr Jan 16, 2025
891cab9
Updated backend sha
rquidute Jan 27, 2025
c6fd9d3
docs: add "timeout" to Test Parameters section (#522)
rl-mediola Jan 28, 2025
12e0e48
Updating backend SHA and docker compose
antonio-amjr Feb 20, 2025
4148f48
Updated backend cli and frontend
Feb 20, 2025
e94c410
Updated backend
Feb 20, 2025
72019ed
Updated backend
rquidute Feb 21, 2025
abd51a3
Updated backend
rquidute Feb 21, 2025
bc2625f
Updated backend
rquidute Feb 21, 2025
7b991bf
Updated backend and frontend - performance ui was missing
rquidute Feb 21, 2025
acc1768
Updating once more the Backend SHA and Docker compose
antonio-amjr Feb 21, 2025
c0930cb
Updating Backend (#542)
antonio-amjr Feb 25, 2025
af6f841
Improve TH start script (#544)
hiltonlima Feb 27, 2025
1f2aabe
Updated backend
rquidute Feb 27, 2025
87a9308
Updated docker-compose
rquidute Feb 27, 2025
1dc86c7
Updated User Guide for v2.13-beta2+summer2025
rquidute Feb 28, 2025
4c5c533
Updating the backend tree with two commits from the develop branch (#…
antonio-amjr Mar 11, 2025
5fef5c9
Add poetry self update for cli installation (#558)
rquidute Mar 18, 2025
c82c965
Updated backend SHA - Feature/530 mock server available (#561)
rquidute Mar 26, 2025
45a3ff9
[UG] - Added Mapped Volumes (#566)
rquidute Mar 31, 2025
0695e16
Updated backend - Platform cert implementation
rquidute Apr 15, 2025
5e78e1b
Updated backend and cli
rquidute Apr 23, 2025
0d3e934
[FIX] Fix start.sh script to log front back launching log (#581)
rquidute Apr 28, 2025
c1696db
Created sideload script (#583)
rquidute Apr 29, 2025
9696f12
Updated backend sha
rquidute Apr 29, 2025
ccebe11
[User Guide]Added Platform certification configuration section (#575)
rquidute Apr 29, 2025
e5ecda0
Merge V2.13 beta3.3+summer2025 to V2.13+summer2025-develop (#613)
rquidute May 22, 2025
128b47d
[FIX] Fix UG links to use members-all links (#614)
rquidute May 22, 2025
ee94bb0
Map ports for certification-tool-backend container to listen to H264 …
chulspro Jul 2, 2025
9296d40
Changed for v2.14-beta1+fall2025 version
rquidute Jul 15, 2025
27470b2
Fixed config.py file location (#657)
rquidute Jul 17, 2025
9e051cc
Updating the User Guide, Backend SHA and docker compose to the releas…
antonio-amjr Jul 23, 2025
a0f7b6c
[Docs] [Camera] Updating User Guide With Camera Information (#666)
antonio-amjr Aug 1, 2025
e3c8020
[Fix] User Guide Broken Images
antonio-amjr Aug 26, 2025
c0dc2c2
Fixes raised by Gemini in PR #797 (#725)
rquidute Sep 1, 2025
7754141
[Camera] Add pushav-service to proxy https requests by skipping ssl v…
chulspro Sep 11, 2025
bdda6ac
Version v2.14-beta2.1+fall2025
rquidute Sep 12, 2025
1921cd5
Updated cli
rquidute Sep 12, 2025
370988f
v2.14-beta2.1+fall2025 frontend camera fixes
rquidute Sep 15, 2025
23bc0fe
Updated frontend
rquidute Sep 16, 2025
2debbec
Install additional dependencies during update and fresh installation …
rquidute Sep 30, 2025
f4a77cc
Fixed submodules SHA and user guide
rquidute Oct 13, 2025
5420b59
Updated Matter version in User guide
rquidute Oct 13, 2025
9efe266
V2.14 beta3 new version (#764)
rquidute Oct 13, 2025
b89ad1f
Updated backend - list python scripts
rquidute Oct 13, 2025
58ea22e
Updating TH CLI installationto use the new CLI install script (#738)
antonio-amjr Sep 12, 2025
219a7fb
Updated backend - List misssing python scripts
rquidute Oct 14, 2025
ce2a16d
Updated SDK_SHA after some scripts fixes
rquidute Oct 17, 2025
0276893
Version v2.14+fall2025
rquidute Nov 10, 2025
3f7af8e
Updated backend. SDK SHA ca9d1118e097fe947b2aec1ba84f265d6cf2447e
rquidute Nov 11, 2025
73ed1a2
Fix fresh installation issue in fall2024 version (#789)
rquidute Nov 12, 2025
d0d8f48
[FIX] Updating user guide for Matter 1.5 finale version (#798)
antonio-amjr Nov 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ docker-stack.yml
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/logs

# Editor directories and files
.idea
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Please be aware of these related repositories that all have to be used in concer

## Minimum Hardware Requirements

- SD card 64 GB or mo
- SD card 64 GB or more
- RaspberryPi 4 or newer with at least 4 GB RAM

## License
Expand Down
2 changes: 1 addition & 1 deletion backend
Submodule backend updated 104 files
2 changes: 1 addition & 1 deletion cli
Submodule cli updated 122 files
16 changes: 13 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ services:

proxy:
image: traefik:v2.2
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "80:80"
- "8090:8080"
Expand All @@ -26,6 +28,7 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./backend:/app
- ./traefik_dynamic.yml:/etc/traefik/traefik_dynamic.yml
command:
# Enable Docker in Traefik, so that it reads labels from Docker services
- --providers.docker
Expand All @@ -34,6 +37,12 @@ services:
- --providers.docker.constraints=Label(`traefik.constraint-label-stack`, `${TRAEFIK_TAG?Variable not set}`)
# Do not expose all Docker services, only the ones explicitly exposed
- --providers.docker.exposedbydefault=false
# Enable file provider for push-av server
- --providers.file.filename=/etc/traefik/traefik_dynamic.yml
# insecureSkipVerify is enabled for push_av_server as it uses a self-signed certificate.
# This ensures Traefik can proxy requests HTTP -> HTTPS without failing certificate validation.
# service specific transport is not supported in v2.2 and was introduced in v2.4 hence enabling it here.
- --serversTransport.insecureSkipVerify=true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using serversTransport.insecureSkipVerify=true as a global command-line flag disables TLS certificate validation for all backend services, which poses a security risk. While the comment explains this is for push_av_server with a self-signed certificate, it's better to apply this setting only to the specific service that needs it. The comment correctly notes that service-specific transport configurations were introduced in Traefik v2.4. Consider upgrading Traefik from v2.2 to v2.4 or newer. This would allow you to configure insecureSkipVerify on a per-service basis within your dynamic configuration file (traefik_dynamic.yml), improving the overall security of your deployment.

# Enable the access log, with HTTP requests
- --accesslog
# Enable the Traefik log, for configurations and errors
Expand Down Expand Up @@ -68,11 +77,12 @@ services:
- node.labels.${STACK_NAME?Variable not set}.app-db-data == true

backend:
image: 'ghcr.io/project-chip/csa-certification-tool-backend:8f86ccd'
image: 'ghcr.io/project-chip/csa-certification-tool-backend:e20beac'

ports:
- "8888:8888"
- "50000:50000"
- "5000:5000/udp" #To receive H264 packets from camera-controller
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/bin/docker
Expand All @@ -89,15 +99,15 @@ services:
privileged: true
build:
context: ./backend
command: /start-reload.sh
command: bash -c "./prestart.sh; python3 ./app/main.py"
labels:
- traefik.enable=true
- traefik.constraint-label-stack=${TRAEFIK_TAG?Variable not set}
- traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.rule=PathPrefix(`/api`) || PathPrefix(`/docs`) || PathPrefix(`/redoc`)
- traefik.http.services.${STACK_NAME?Variable not set}-backend.loadbalancer.server.port=80

frontend:
image: 'ghcr.io/project-chip/csa-certification-tool-frontend:5c0c9dd'
image: 'ghcr.io/project-chip/csa-certification-tool-frontend:1acbec0'
build:
context: ./frontend
labels:
Expand Down
334 changes: 303 additions & 31 deletions docs/Matter_TH_User_Guide/Matter_TH_User_Guide.adoc

Large diffs are not rendered by default.

Binary file modified docs/Matter_TH_User_Guide/Matter_TH_User_Guide.pdf
Binary file not shown.
Binary file added docs/Matter_TH_User_Guide/images/img_67.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Matter_TH_User_Guide/images/img_68.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Matter_TH_User_Guide/images/img_69.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion frontend
Submodule frontend updated 73 files
+5 −1 Dockerfile
+6 −3 package.json
+39 −0 patches/shaka-player+4.5.0.patch
+2 −1 src/app/app.component.ts
+17 −3 src/app/app.module.ts
+7 −7 src/app/components/main-area/main-area.component.html
+40 −16 src/app/components/main-area/main-area.sandbox.ts
+18 −1 src/app/components/nav/side-nav/side-nav.component.ts
+2 −4 src/app/components/nav/top-nav/top-nav.component.html
+35 −17 src/app/components/nav/top-nav/top-nav.component.ts
+163 −16 src/app/components/shared/popup-modal/popup-modal.component.html
+476 −4 src/app/components/shared/popup-modal/popup-modal.component.scss
+235 −3 src/app/components/shared/popup-modal/popup-modal.component.ts
+21 −0 src/app/components/shared/popup-modal/utils.ts
+3 −3 src/app/components/test/test-case-category/test-case-category.component.html
+2 −0 src/app/components/test/test-case-category/test-case-category.component.scss
+4 −1 src/app/components/test/test-case-category/test-case-category.component.ts
+21 −11 src/app/components/test/test-case-category/test-cases/test-cases.component.html
+41 −19 src/app/components/test/test-case-category/test-cases/test-cases.component.scss
+8 −1 src/app/components/test/test-case-category/test-cases/test-cases.component.ts
+35 −9 src/app/components/test/test-details/test-details.component.html
+34 −4 src/app/components/test/test-details/test-details.component.ts
+9 −7 src/app/components/test/test-execution-history/test-execution-history.component.html
+27 −6 src/app/components/test/test-execution-history/test-execution-history.component.ts
+7 −2 src/app/components/test/test-execution/test-execution-tree/test-execution-tree.component.html
+9 −1 src/app/components/test/test-execution/test-execution-tree/test-execution-tree.component.ts
+10 −3 src/app/components/test/test-execution/test-execution.component.scss
+23 −21 src/app/components/test/test-execution/test-execution.component.ts
+34 −3 src/app/components/test/test-execution/test-execution.sandbox.ts
+1 −1 src/app/components/test/test-execution/test-logs/test-log-console/test-log-console.component.html
+1 −1 src/app/components/test/test-execution/test-logs/test-log-console/test-log-console.component.scss
+19 −5 src/app/components/test/test-execution/test-logs/test-log-toolbar/test-log-toolbar.component.html
+18 −1 src/app/components/test/test-execution/test-logs/test-log-toolbar/test-log-toolbar.component.scss
+18 −4 src/app/components/test/test-execution/test-logs/test-log-toolbar/test-log-toolbar.component.ts
+12 −0 src/app/components/test/test.sandbox.ts
+4 −11 ...ts/utility/performance-tests/create-new-performance-test-run/create-new-performance-test-run.component.html
+35 −0 ...ts/utility/performance-tests/create-new-performance-test-run/create-new-performance-test-run.component.scss
+39 −0 ...ents/utility/performance-tests/create-new-performance-test-run/create-new-performance-test-run.component.ts
+52 −0 ...ormance-tests/performance-test-cases/performance-test-cases-list/performance-test-cases-list.component.html
+51 −0 ...ormance-tests/performance-test-cases/performance-test-cases-list/performance-test-cases-list.component.scss
+107 −0 ...rformance-tests/performance-test-cases/performance-test-cases-list/performance-test-cases-list.component.ts
+55 −0 ...mance-tests/performance-test-cases/performance-test-suites-list/performance-test-suites-list.component.html
+21 −32 ...mance-tests/performance-test-cases/performance-test-suites-list/performance-test-suites-list.component.scss
+161 −0 ...ormance-tests/performance-test-cases/performance-test-suites-list/performance-test-suites-list.component.ts
+80 −0 ...rmance-tests/performance-test-execution-tree-details/performance-test-execution-tree-details.component.html
+49 −0 ...rmance-tests/performance-test-execution-tree-details/performance-test-execution-tree-details.component.scss
+71 −0 ...formance-tests/performance-test-execution-tree-details/performance-test-execution-tree-details.component.ts
+0 −47 src/app/components/utility/upload-file/upload-file.component.ts
+28 −0 src/app/components/utility/utility-performance-tab/utility-performance.component.html
+16 −0 src/app/components/utility/utility-performance-tab/utility-performance.component.scss
+29 −0 src/app/components/utility/utility-performance-tab/utility-performance.component.ts
+166 −0 src/app/components/utility/utility-upload-file-tab/upload-file.component.html
+216 −0 src/app/components/utility/utility-upload-file-tab/upload-file.component.scss
+9 −0 src/app/components/utility/utility-upload-file-tab/upload-file.component.spec.ts
+332 −0 src/app/components/utility/utility-upload-file-tab/upload-file.component.ts
+34 −155 src/app/components/utility/utility.component.html
+218 −155 src/app/components/utility/utility.component.scss
+0 −9 src/app/components/utility/utility.component.spec.ts
+29 −304 src/app/components/utility/utility.component.ts
+13 −1 src/app/shared/core_apis/shared-utils.ts
+12 −0 src/app/shared/core_apis/shared.ts
+30 −1 src/app/shared/core_apis/test-run.ts
+492 −0 src/app/shared/core_apis/webrtc.service.ts
+11 −5 src/app/shared/core_apis/websocket.ts
+23 −0 src/app/shared/streamsrc.directive.ts
+30 −2 src/app/shared/test-run-utils.ts
+1 −1 src/app/shared/utils/constants.ts
+150 −0 src/app/shared/web_sockets/webrtc-ws-config.ts
+8 −0 src/app/store/shared-store.ts
+24 −16 src/app/store/test-run-store.ts
+0 −6 src/assets/themes/saga-blue/theme.css
+4 −1 src/environments/environment.ts
+1 −0 tsconfig.json
1 change: 1 addition & 0 deletions logs/.keep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Do not remove this file
23 changes: 4 additions & 19 deletions scripts/pi-setup/auto-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
ROOT_DIR=$(realpath $(dirname "$0")/../..)
SCRIPT_DIR="$ROOT_DIR/scripts"
PI_SCRIPT_DIR="$SCRIPT_DIR/pi-setup"
UBUNTU_SCRIPT_DIR="$SCRIPT_DIR/ubuntu"
PI_SCRIPT_DIR="$ROOT_DIR/scripts/pi-setup"
LOG_FILENAME=$(date +"log-pi_setup-auto-install_%F-%H-%M-%S")
LOG_PATH="$ROOT_DIR/logs/$LOG_FILENAME"

source "$SCRIPT_DIR/utils.sh"

print_start_of_script

check_installation_prerequisites
verify_return_code

print_script_step "Installing Raspberry Pi Dependencies"
$PI_SCRIPT_DIR/install-pi-dependencies.sh
verify_return_code

print_script_step "Running Ubuntu auto-install"
$UBUNTU_SCRIPT_DIR/auto-install.sh
verify_return_code

print_end_of_script
$PI_SCRIPT_DIR/internal-auto-install.sh $* | tee $LOG_PATH
37 changes: 37 additions & 0 deletions scripts/pi-setup/internal-auto-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#! /usr/bin/env bash

#
# Copyright (c) 2023 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ROOT_DIR=$(realpath $(dirname "$0")/../..)
SCRIPT_DIR="$ROOT_DIR/scripts"
PI_SCRIPT_DIR="$SCRIPT_DIR/pi-setup"
UBUNTU_SCRIPT_DIR="$SCRIPT_DIR/ubuntu"

source "$SCRIPT_DIR/utils.sh"

print_start_of_script

check_installation_prerequisites
verify_return_code

print_script_step "Installing Raspberry Pi Dependencies"
$PI_SCRIPT_DIR/install-pi-dependencies.sh
verify_return_code

print_script_step "Running Ubuntu auto-install"
$UBUNTU_SCRIPT_DIR/auto-install.sh
verify_return_code

print_end_of_script
73 changes: 73 additions & 0 deletions scripts/sideload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#! /usr/bin/env bash

#
# Copyright (c) 2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

ROOT_DIR=$(realpath $(dirname "$0")/..)
SCRIPT_DIR="$ROOT_DIR/scripts"


DATE_STR=$(date +"%F-%H-%M-%S")

SIDELOAD_LOGFILE_PATH="logs/sideload_$DATE_STR.log"

# Redirect all output (stdout and stderr) to both the terminal and the log file
exec > >(tee -a "$SIDELOAD_LOGFILE_PATH") 2>&1

# backend container
CONTAINER_NAME="certification-tool-backend-1"

source "$SCRIPT_DIR/utils.sh"

print_start_of_script

print_script_step "Updating tests information"
docker exec -i $CONTAINER_NAME python3 /app/test_collections/matter/sdk_tests/support/python_testing/list_python_tests_classes.py
if [ $? -ne 0 ]; then
echo "Unable to execute command in backend container. Could you please check if it is running?"
exit 1
fi

# Retrieve backend container ID
print_script_step "Retrieving backend container ID..."
CONTAINER_ID=$(docker ps -qf "name=${CONTAINER_NAME}")

# Check if the container was found
if [ -z "$CONTAINER_ID" ]; then
echo "Container '${CONTAINER_NAME}' not found."
exit 1
fi

# Restart the container
print_script_step "Restarting container ${CONTAINER_NAME} (ID: ${CONTAINER_ID})..."
docker restart "$CONTAINER_ID"

# Check if the restart process was successful
if [ $? -eq 0 ]; then
echo -n "Waiting for backend to start"
CHECK_BACKEND_SERVICE="docker exec -i $CONTAINER_NAME curl --fail -s --output /dev/null http://localhost/docs"
until $CHECK_BACKEND_SERVICE
do
echo -n "."
sleep 5
done
echo "Container restarted successfully!"

else
echo "Failed to restart the container!"
exit 1
fi

print_end_of_script
27 changes: 25 additions & 2 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ set -e
BACKEND_COMPOSE_DEV="-f docker-compose.override-backend-dev.yml"
FRONTEND_COMPOSE_DEV="-f docker-compose.override-frontend-dev.yml"

DATE_STR=$(date +"%F-%H-%M-%S")

BACKEND_LOGFILE_PATH="logs/backend_service_start_$DATE_STR.log"
FRONTEND_LOGFILE_PATH="logs/frontend_service_start_$DATE_STR.log"

print_start_container() {
echo "################################################################################" >> "$1" 2>&1
echo "start.sh: Starting..." >> "$1" 2>&1
echo "################################################################################" >> "$1" 2>&1
}

# Parse args for which docker compose overrides to use
BACKEND_COMPOSE=""
FRONTEND_COMPOSE=""
Expand Down Expand Up @@ -91,30 +102,42 @@ if [ $? -ne 0 ]; then
exit 1
fi

print_start_container "$FRONTEND_LOGFILE_PATH"

if [ "$FRONTEND_DEV" = true ] ; then
echo "!!!! Matter TH frontend started in development mode."
echo "!!!! Manually start frontend by connecting to the frontend container"
else
echo -n "Waiting for frontend to start"
until docker compose exec frontend curl --fail -s --output /dev/null http://localhost:4200
CHECK_FRONTEND_SERVICE="docker compose exec frontend curl --fail -s --output /dev/null http://localhost:4200"
until $CHECK_FRONTEND_SERVICE >> $FRONTEND_LOGFILE_PATH 2>&1
do
echo -n "."
sleep 5
done
echo " done"
fi

print_start_container "$BACKEND_LOGFILE_PATH"

if [ "$BACKEND_DEV" = true ] ; then
echo "!!!! Matter TH backend started in development mode."
echo "!!!! Manually start backend by connecting to the backend container"
else
echo -n "Waiting for backend to start"
until docker compose exec backend curl --fail -s --output /dev/null http://localhost/docs
CHECK_BACKEND_SERVICE="docker compose exec backend curl --fail -s --output /dev/null http://localhost/docs"
until $CHECK_BACKEND_SERVICE >> $BACKEND_LOGFILE_PATH 2>&1
do
echo -n "."
sleep 5
done
echo " done"
fi

echo "Backend startup process completed" >> $BACKEND_LOGFILE_PATH 2>&1
docker compose logs backend >> $BACKEND_LOGFILE_PATH 2>&1

echo "Frontend startup process completed" >> $FRONTEND_LOGFILE_PATH 2>&1
docker compose logs frontend >> $FRONTEND_LOGFILE_PATH 2>&1

echo "Script 'start.sh' completed successfully"
19 changes: 17 additions & 2 deletions scripts/ubuntu/1-install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,23 @@ readarray packagelist < "$UBUNTU_SCRIPT_DIR/package-dependency-list.txt"
SAVEIFS=$IFS
IFS=$(echo -en "\r")
for package in ${packagelist[@]}; do
print_script_step "Instaling package: ${package[@]}"
sudo DEBIAN_FRONTEND=noninteractive apt-get satisfy ${package[@]} -y --allow-downgrades
print_script_step "Installing package: ${package[@]}"

# Special handling for docker-ce to avoid version 29.x
if [[ "${package%%[[:space:]]}" == docker-ce* ]]; then
# Get the latest version that is not 29.x
DOCKER_VERSION=$(apt-cache madison docker-ce | awk '$3 !~ /^5:29\./ {print $3; exit}')
if [ -n "$DOCKER_VERSION" ]; then
print_script_step "Installing docker-ce version $DOCKER_VERSION (excluding 29.x)"
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-downgrades docker-ce=$DOCKER_VERSION docker-ce-cli=$DOCKER_VERSION containerd.io
sudo apt-mark hold docker-ce docker-ce-cli
else
echo "ERROR: No suitable docker-ce version found (excluding 29.x)"
exit 1
fi
else
sudo DEBIAN_FRONTEND=noninteractive apt-get satisfy "${package%%[[:space:]]}" -y --allow-downgrades
fi
done
IFS=$SAVEIFS

Expand Down
41 changes: 19 additions & 22 deletions scripts/ubuntu/1.1-install-docker-repository.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,30 @@ source "$SCRIPT_DIR/utils.sh"

print_start_of_script

set +e
print_script_step "Verify docker.download.com is reachable"
# Verify docker.download.com is reachable before attempting to install the
# Docker Package Repo (network randomly fails after service restarts).
# A ping will be attempted and retried in increments of 1 second before
# a 5 minute timeout.
timeout 300s bash -c '
start_time=$(date)
echo "Ping started at: $start_time"
while :; do
if ping -c 1 docker.download.com | grep -q "1 received"; then
echo "Ping docker.download.com successful"
end_time=$(date)
echo "Ping ended at: $end_time"
echo "Ping duration: $(($(date +%s) - $(date -d "$start_time" +%s))) seconds"
break
fi
echo "Ping docker.download.com failed, retrying..."
sleep 1
for i in {1..5}
do
timeout 2 bash -c "(echo >/dev/tcp/docker.download.com/80) &>/dev/null"
retVal=$?
if [ $retVal -eq 0 ]; then
echo "The docker.download.com is reacheable"
break
else
echo "The docker.download.com is unreachable for try $i"
sleep $(expr $i \* 2)
fi

if [ "$i" -eq '5' ]; then
echo "Failed to stablish connection with the docker.download.com service."
echo "Please verify your connection or try again later."
exit 1
fi
done
if [ $? -eq 124 ]; then
end_time=$(date)
echo "docker.download.com: Timeout reached"
echo "Ping ended at: $end_time"
echo "Ping duration: $(($(date +%s) - $(date -d "$start_time" +%s))) seconds"
fi
'

set -e
# Reference link: https://docs.docker.com/engine/install/ubuntu/
print_script_step "Add Docker's official GPG key"
sudo apt-get update -y
Expand Down
Loading