Skip to content

Commit a7e5c40

Browse files
committed
update: Selenium Grid 4.24.0
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 6216a4d commit a7e5c40

File tree

11 files changed

+196
-23
lines changed

11 files changed

+196
-23
lines changed

Diff for: .circleci/config.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ jobs:
151151
- run:
152152
name: "Setup environment"
153153
command: |
154-
make chart_setup_env
155-
make set_containerd_image_store
154+
make setup_dev_env
156155
- run:
157156
name: "Print system info"
158157
command: |
@@ -235,8 +234,7 @@ jobs:
235234
- run:
236235
name: "Set up Kubernetes environment"
237236
command: |
238-
make chart_setup_env
239-
make set_containerd_image_store
237+
make setup_dev_env
240238
CLUSTER=${CLUSTER} KUBERNETES_VERSION=${KUBERNETES_VERSION} NAME=${NAMESPACE} VERSION=${BRANCH} \
241239
BUILD_DATE=${BUILD_DATE} make chart_cluster_setup
242240
- run:

Diff for: .github/workflows/deploy.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ jobs:
6464
timeout_minutes: 10
6565
max_attempts: 3
6666
command: |
67-
make chart_setup_env
68-
make set_containerd_image_store
67+
make setup_dev_env
6968
- name: Output Docker info
7069
run: docker info
7170
- name: Set Selenium base version

Diff for: .github/workflows/docker-test.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ jobs:
8787
timeout_minutes: 10
8888
max_attempts: 3
8989
command: |
90-
make chart_setup_env
91-
make set_containerd_image_store
90+
make setup_dev_env
9291
- name: Output Docker info
9392
run: docker info
9493
- name: Set up Python

Diff for: .github/workflows/helm-chart-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
with:
5555
timeout_minutes: 10
5656
max_attempts: 3
57-
command: make chart_setup_env
57+
command: make setup_dev_env
5858
- name: Build Helm chart
5959
uses: nick-invision/retry@master
6060
with:

Diff for: .github/workflows/helm-chart-test.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ jobs:
9191
timeout_minutes: 10
9292
max_attempts: 3
9393
command: |
94-
make chart_setup_env
95-
make set_containerd_image_store
94+
make setup_dev_env
9695
- name: Output Docker info
9796
run: docker info
9897
- name: Set up Python

Diff for: .github/workflows/nightly.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ jobs:
4242
timeout_minutes: 10
4343
max_attempts: 3
4444
command: |
45-
make chart_setup_env
46-
make set_containerd_image_store
45+
make setup_dev_env
4746
- name: Output Docker info
4847
run: docker info
4948
- name: Set Selenium base version

Diff for: Makefile

+13-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
NAME := $(or $(NAME),$(NAME),selenium)
22
CURRENT_DATE := $(shell date '+%Y%m%d')
33
BUILD_DATE := $(or $(BUILD_DATE),$(BUILD_DATE),$(CURRENT_DATE))
4-
BASE_RELEASE := $(or $(BASE_RELEASE),$(BASE_RELEASE),selenium-4.23.0)
5-
BASE_VERSION := $(or $(BASE_VERSION),$(BASE_VERSION),4.23.1)
6-
BINDING_VERSION := $(or $(BINDING_VERSION),$(BINDING_VERSION),4.23.1)
4+
BASE_RELEASE := $(or $(BASE_RELEASE),$(BASE_RELEASE),selenium-4.24.0)
5+
BASE_VERSION := $(or $(BASE_VERSION),$(BASE_VERSION),4.24.0)
6+
BINDING_VERSION := $(or $(BINDING_VERSION),$(BINDING_VERSION),4.24.0)
77
BASE_RELEASE_NIGHTLY := $(or $(BASE_RELEASE_NIGHTLY),$(BASE_RELEASE_NIGHTLY),nightly)
8-
BASE_VERSION_NIGHTLY := $(or $(BASE_VERSION_NIGHTLY),$(BASE_VERSION_NIGHTLY),4.24.0-SNAPSHOT)
9-
VERSION := $(or $(VERSION),$(VERSION),4.23.1)
8+
BASE_VERSION_NIGHTLY := $(or $(BASE_VERSION_NIGHTLY),$(BASE_VERSION_NIGHTLY),4.25.0-SNAPSHOT)
9+
VERSION := $(or $(VERSION),$(VERSION),4.24.0)
1010
TAG_VERSION := $(VERSION)-$(BUILD_DATE)
1111
CHART_VERSION_NIGHTLY := $(or $(CHART_VERSION_NIGHTLY),$(CHART_VERSION_NIGHTLY),1.0.0-nightly)
1212
NAMESPACE := $(or $(NAMESPACE),$(NAMESPACE),$(NAME))
@@ -42,6 +42,13 @@ all: hub \
4242
standalone_docker \
4343
video
4444

45+
check_dev_env:
46+
./tests/charts/make/chart_check_env.sh
47+
48+
setup_dev_env:
49+
./tests/charts/make/chart_setup_env.sh ; \
50+
make set_containerd_image_store
51+
4552
set_containerd_image_store:
4653
sudo mkdir -p /etc/docker
4754
sudo mv /etc/docker/daemon.json /etc/docker/daemon.json.bak || true
@@ -75,7 +82,7 @@ set_build_multiarch:
7582
build_nightly:
7683
BASE_VERSION=$(BASE_VERSION_NIGHTLY) BASE_RELEASE=$(BASE_RELEASE_NIGHTLY) make build
7784

78-
build: all
85+
build: check_dev_env all
7986
docker images | grep $(NAME)
8087

8188
ci: build test
@@ -775,9 +782,6 @@ test_node_docker: hub standalone_docker standalone_chrome standalone_firefox sta
775782
test_custom_ca_cert:
776783
VERSION=$(TAG_VERSION) NAMESPACE=$(NAMESPACE) ./tests/customCACert/bootstrap.sh
777784

778-
chart_setup_env:
779-
./tests/charts/make/chart_setup_env.sh
780-
781785
chart_cluster_setup:
782786
VERSION=$(TAG_VERSION) NAMESPACE=$(NAMESPACE) BUILD_DATE=$(BUILD_DATE) ./tests/charts/make/chart_cluster_setup.sh
783787
make set_containerd_image_store

Diff for: README.md

+2
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ Nightly images are built on top of the [Nightly](https://github.com/SeleniumHQ/s
203203
$ docker run -d -p 4442-4444:4442-4444 --name selenium-hub selenium/hub:nightly
204204
```
205205

206+
Check out the docker compose to get started with Nightly images [docker-compose-v3-full-grid-nightly.yml](docker-compose-v3-full-grid-nightly.yml)
207+
206208
## Dev and Beta Channel Browser Images
207209

208210
To run tests or otherwise work with pre-release browsers, Google, Mozilla, and Microsoft maintain a Dev and Beta release channel for those who need to see what's soon to be released to the general population.

Diff for: charts/selenium-grid/TESTING.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ We have a CI pipeline to test the Helm chart with the following test cases.
5050
| HTTPS `tls.enabled` | | | x | | x |
5151
| Enable tracing | x | x | | x | |
5252
| Enable video recorder | x | x | x | x | x |
53+
| Enable video uploader | x | x | x | x | x |
5354
| Test headless | | x | x | | |
5455

5556
## Test Chart Template
@@ -78,7 +79,7 @@ Run entire commands to build and test Docker images with Helm charts in local en
7879
cd ../..
7980

8081
# Setup Kubernetes environment
81-
make chart_setup_env
82+
make setup_dev_env
8283

8384
# Build Docker images
8485
make build

Diff for: docker-compose-v3-full-grid-nightly.yml

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# To execute this docker compose yml file use `docker compose -f docker-compose-v3-full-grid-nightly.yml up --force-recreate`
2+
# Add the `-d` flag at the end for detached execution
3+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-full-grid-nightly.yml down`
4+
version: "3"
5+
services:
6+
selenium-event-bus:
7+
image: selenium/event-bus:nightly
8+
container_name: selenium-event-bus
9+
ports:
10+
- "4442:4442"
11+
- "4443:4443"
12+
- "5557:5557"
13+
14+
selenium-sessions:
15+
image: selenium/sessions:nightly
16+
container_name: selenium-sessions
17+
ports:
18+
- "5556:5556"
19+
depends_on:
20+
- selenium-event-bus
21+
environment:
22+
- SE_EVENT_BUS_HOST=selenium-event-bus
23+
- SE_EVENT_BUS_PUBLISH_PORT=4442
24+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
25+
26+
selenium-session-queue:
27+
image: selenium/session-queue:nightly
28+
container_name: selenium-session-queue
29+
ports:
30+
- "5559:5559"
31+
32+
selenium-distributor:
33+
image: selenium/distributor:nightly
34+
container_name: selenium-distributor
35+
ports:
36+
- "5553:5553"
37+
depends_on:
38+
- selenium-event-bus
39+
- selenium-sessions
40+
- selenium-session-queue
41+
environment:
42+
- SE_EVENT_BUS_HOST=selenium-event-bus
43+
- SE_EVENT_BUS_PUBLISH_PORT=4442
44+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
45+
- SE_SESSIONS_MAP_HOST=selenium-sessions
46+
- SE_SESSIONS_MAP_PORT=5556
47+
- SE_SESSION_QUEUE_HOST=selenium-session-queue
48+
- SE_SESSION_QUEUE_PORT=5559
49+
50+
selenium-router:
51+
image: selenium/router:nightly
52+
container_name: selenium-router
53+
ports:
54+
- "4444:4444"
55+
depends_on:
56+
- selenium-distributor
57+
- selenium-sessions
58+
- selenium-session-queue
59+
environment:
60+
- SE_DISTRIBUTOR_HOST=selenium-distributor
61+
- SE_DISTRIBUTOR_PORT=5553
62+
- SE_SESSIONS_MAP_HOST=selenium-sessions
63+
- SE_SESSIONS_MAP_PORT=5556
64+
- SE_SESSION_QUEUE_HOST=selenium-session-queue
65+
- SE_SESSION_QUEUE_PORT=5559
66+
67+
chrome:
68+
image: selenium/node-chrome:nightly
69+
shm_size: 2gb
70+
depends_on:
71+
- selenium-event-bus
72+
environment:
73+
- SE_EVENT_BUS_HOST=selenium-event-bus
74+
- SE_EVENT_BUS_PUBLISH_PORT=4442
75+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
76+
77+
edge:
78+
image: selenium/node-edge:nightly
79+
shm_size: 2gb
80+
depends_on:
81+
- selenium-event-bus
82+
environment:
83+
- SE_EVENT_BUS_HOST=selenium-event-bus
84+
- SE_EVENT_BUS_PUBLISH_PORT=4442
85+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
86+
87+
firefox:
88+
image: selenium/node-firefox:nightly
89+
shm_size: 2gb
90+
depends_on:
91+
- selenium-event-bus
92+
environment:
93+
- SE_EVENT_BUS_HOST=selenium-event-bus
94+
- SE_EVENT_BUS_PUBLISH_PORT=4442
95+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
96+
97+
chrome_video:
98+
image: selenium/video:nightly
99+
volumes:
100+
- /tmp/videos:/videos
101+
depends_on:
102+
- chrome
103+
environment:
104+
- DISPLAY_CONTAINER_NAME=chrome
105+
- SE_NODE_GRID_URL=http://selenium-router:4444
106+
- SE_VIDEO_FILE_NAME=auto
107+
108+
edge_video:
109+
image: selenium/video:nightly
110+
volumes:
111+
- /tmp/videos:/videos
112+
depends_on:
113+
- edge
114+
environment:
115+
- DISPLAY_CONTAINER_NAME=edge
116+
- SE_NODE_GRID_URL=http://selenium-router:4444
117+
- SE_VIDEO_FILE_NAME=auto
118+
119+
firefox_video:
120+
image: selenium/video:nightly
121+
volumes:
122+
- /tmp/videos:/videos
123+
depends_on:
124+
- firefox
125+
environment:
126+
- DISPLAY_CONTAINER_NAME=firefox
127+
- SE_NODE_GRID_URL=http://selenium-router:4444
128+
- SE_VIDEO_FILE_NAME=auto

Diff for: tests/charts/make/chart_check_env.sh

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
REQUIRED_VERSION="24.0.9"
4+
DOCKER_VERSION=$(docker --version | grep -oP '\d+\.\d+\.\d+')
5+
version_greater_equal() {
6+
[ "$1" = "$2" ] && return 0
7+
local IFS=.
8+
local i ver1=($1) ver2=($2)
9+
for ((i=0; i<${#ver1[@]}; i++)); do
10+
[ -z "${ver2[i]}" ] && ver2[i]=0
11+
((10#${ver1[i]} > 10#${ver2[i]})) && return 0
12+
((10#${ver1[i]} < 10#${ver2[i]})) && return 1
13+
done
14+
return 0
15+
}
16+
if version_greater_equal "$DOCKER_VERSION" "$REQUIRED_VERSION"; then
17+
echo "Docker engine version is $DOCKER_VERSION"
18+
EXIT_CODE=0
19+
else
20+
echo "Docker engine version is $DOCKER_VERSION, which does not meet the requirement."
21+
EXIT_CODE=1
22+
fi
23+
24+
DOCKER_CONFIG_FILE="/etc/docker/daemon.json"
25+
if [ ! -f "$DOCKER_CONFIG_FILE" ]; then
26+
echo "Docker configuration file not found at $DOCKER_CONFIG_FILE"
27+
EXIT_CODE=1
28+
fi
29+
if cat "$DOCKER_CONFIG_FILE" | grep -q containerd; then
30+
echo "The containerd feature is enabled in Docker engine. $(cat $DOCKER_CONFIG_FILE)"
31+
else
32+
echo "The containerd feature is not enabled in Docker engine. $(cat $DOCKER_CONFIG_FILE)"
33+
EXIT_CODE=1
34+
fi
35+
36+
echo "==============================="
37+
if [ "$EXIT_CODE" -eq 1 ]; then
38+
echo "Check failed."
39+
echo "Please run the following command setup development environment: make setup_dev_env"
40+
exit $EXIT_CODE
41+
else
42+
echo "All checks passed."
43+
exit 0
44+
fi

0 commit comments

Comments
 (0)