Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
983956f
Adding chainges for subpackages
utieyin Oct 15, 2024
23948df
Adding initial changes to allow separating all components of docker-s…
utieyin Oct 16, 2024
7ac075f
yam linting
utieyin Oct 17, 2024
710e1e4
Adding further tests to docker-selenium
utieyin Oct 17, 2024
7f78ceb
Merge branch 'main' into selenium-nodechrome-3765
utieyin Oct 17, 2024
90a924f
Adding last tests for nodechrome and nodefirefox
utieyin Oct 17, 2024
21ce992
Adding distributor and eventbus to docker-selenium
utieyin Oct 17, 2024
43953dd
linting distriubtor?
utieyin Oct 17, 2024
77c87a8
Adding nodedocker package
utieyin Oct 18, 2024
2128c69
Merge branch 'main' into selenium-nodechrome-3765
utieyin Oct 18, 2024
eb38cea
Adding more components
utieyin Oct 18, 2024
2177877
Adding session queue and tests
utieyin Oct 18, 2024
01d20bc
Merge branch 'main' into selenium-nodechrome-3765
utieyin Oct 18, 2024
1e4c6d5
Completed all the relatable components of docker-selenium
utieyin Oct 18, 2024
8c0ebdf
Merge branch 'selenium-nodechrome-3765' of github.com:utieyin/os into…
utieyin Oct 18, 2024
9b39508
Merge branch 'main' into selenium-nodechrome-3765
utieyin Oct 21, 2024
aaefc60
Merge branch 'main' into selenium-nodechrome-3765
utieyin Oct 21, 2024
9c52af9
Merge branch 'main' into selenium-nodechrome-3765
utieyin Oct 21, 2024
809277d
Adding cp changes and renaming certain components
utieyin Oct 22, 2024
76ea9b2
Removing chrome package
utieyin Oct 22, 2024
7ba3503
Merge branch 'main' into selenium-nodechrome-3765
utieyin Oct 22, 2024
b0a1434
Fixed typo
utieyin Oct 22, 2024
2676c34
Renamed sessionqueue to session-queue
utieyin Oct 22, 2024
72b0a22
Fixed name error for session queue
utieyin Oct 22, 2024
5c3c8d6
Merge branch 'main' into selenium-nodechrome-3765
utieyin Oct 23, 2024
1ab06dc
Merge branch 'selenium-nodechrome-3765' of github.com:utieyin/os into…
utieyin Oct 23, 2024
fb94b3c
Merge branch 'main' into selenium-nodechrome-3765
utieyin Oct 24, 2024
f36af3a
Merge branch 'selenium-nodechrome-3765' of github.com:utieyin/os into…
utieyin Oct 24, 2024
54bc67c
Reworking docker selenium to move base into subpackage
utieyin Oct 24, 2024
5868929
Merge branch 'main' into selenium-nodechrome-3765
utieyin Oct 24, 2024
f19f5ba
New version
utieyin Oct 24, 2024
9972b23
Merge branch 'main' into selenium-nodechrome-3765
utieyin Oct 24, 2024
99830b8
Version number issue
utieyin Oct 24, 2024
2f02eff
Merge branch 'main' into selenium-nodechrome-3765
utieyin Oct 29, 2024
5c394a3
Removed unused pipeline from image
utieyin Oct 29, 2024
877a25b
Merge branch 'selenium-nodechrome-3765' of github.com:utieyin/os into…
utieyin Oct 29, 2024
aeba9fb
Yam lint
utieyin Oct 29, 2024
8882823
Update docker-selenium.yaml
utieyin Oct 29, 2024
d46430b
Merge branch 'main' into selenium-nodechrome-3765
utieyin Oct 29, 2024
cd14efd
Merge branch 'main' into selenium-nodechrome-3765
utieyin Oct 30, 2024
57062ee
fixed typo
utieyin Oct 30, 2024
f9b548f
fixing more typos
utieyin Oct 30, 2024
9b86a23
Merge branch 'main' into selenium-nodechrome-3765
utieyin Oct 30, 2024
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
239 changes: 186 additions & 53 deletions docker-selenium.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,48 +102,81 @@ pipeline:
- uses: strip

subpackages:
- name: docker-selenium-supervisor-config
description: Docker Selenium supervisor configuration
dependencies:
replaces:
- supervisor-config
provides:
- supervisor-config
- name: ${{package.name}}-config
Comment thread
utieyin marked this conversation as resolved.
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/etc
mv ${{targets.destdir}}/etc/supervisord.conf ${{targets.subpkgdir}}/etc
mv ${{targets.destdir}}/etc/supervisor ${{targets.subpkgdir}}/etc
mkdir -p ${{targets.contextdir}}/opt/selenium/
install -m644 "./example-config.toml" ${{targets.contextdir}}/opt/selenium/config.toml

# Unset setuid bit
# jason@ copied this directly from https://serverfault.com/a/238964
# The extra 0 is to unset the setuid bit apparently.
chmod 00775 ${{targets.subpkgdir}}/etc/supervisord.conf
- name: ${{package.name}}-standalone
dependencies:
runtime:
- selenium-server-standalone
- ${{package.name}}
pipeline:
- working-directory: Standalone
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/etc/supervisor/conf.d
mkdir -p ${{targets.contextdir}}/opt/bin
cp start-selenium-standalone.sh ${{targets.contextdir}}/opt/bin/start-selenium-standalone.sh
Comment thread
maxgio92 marked this conversation as resolved.
Outdated
cp selenium.conf ${{targets.contextdir}}/etc/supervisor/conf.d/
cp generate_config ${{targets.contextdir}}/opt/bin/generate_config
test:
environment:
contents:
packages:
pipeline:
- runs: |
/opt/bin/start-selenium-standalone.sh --help
/opt/bin/start-selenium-standalone.sh --version

# selenium-hub does not handle rendering or direct interaction with browsers
# we can skip adding chromium, Xvfb, fluxbox, and related font packages.
- name: docker-selenium-hub
- name: ${{package.name}}-hub
description: Docker Selenium Hub
dependencies:
runtime:
- ${{package.name}}
- selenium-server
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/opt/bin
mkdir -p ${{targets.subpkgdir}}/opt/selenium
mkdir -p ${{targets.contextdir}}/opt/bin
mkdir -p ${{targets.contextdir}}/opt/selenium
# https://github.com/SeleniumHQ/docker-selenium/blob/trunk/Hub/Dockerfile
- working-directory: Hub
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/etc/supervisor/conf.d
cp selenium-grid-hub.conf ${{targets.subpkgdir}}/etc/supervisor/conf.d/
install -Dm755 start-selenium-grid-hub.sh ${{targets.subpkgdir}}/opt/bin/
cp example-config.toml ${{targets.subpkgdir}}/opt/selenium/config.toml
mkdir -p ${{targets.contextdir}}/etc/supervisor/conf.d
cp selenium-grid-hub.conf ${{targets.contextdir}}/etc/supervisor/conf.d/
install -Dm755 start-selenium-grid-hub.sh ${{targets.contextdir}}/opt/bin/
cp example-config.toml ${{targets.contextdir}}/opt/selenium/config.toml
test:
environment:
contents:
packages:
- ${{package.name}}
- selenium-server
environment:
SE_RELAX_CHECKS: True
SE_BIND_HOST: False
SE_SESSION_RETRY_INTERVAL: 50
SE_HEALTHCHECK_INTERVAL: 500
SE_SESSION_REQUEST_TIMEOUT: 500
pipeline:
- name: "Check all in one status"
uses: test/daemon-check-output
with:
start: "/opt/bin/start-selenium-grid-hub.sh"
timeout: 60
expected_output: |
Started Selenium Hub

- name: docker-selenium-standalone-chrome
description: Docker Selenium supervisor configuration
- name: ${{package.name}}-nodebase
description: Node base
dependencies:
runtime:
- Xvfb
- chromium
- chromium-docker-selenium-compat
- fluxbox
- font-ipa
- font-liberation
Expand All @@ -162,7 +195,6 @@ subpackages:
- libxcb
- mcookie
- novnc
- openjdk-11
- pulseaudio
- pulseaudio-utils
- ttf-dejavu
Expand All @@ -173,42 +205,133 @@ subpackages:
- xkeyboard-config
- xmessage
- xvfb-run
- openjdk-11
- ${{package.name}}
- ${{package.name}}-config
- selenium-server
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/etc
mkdir -p ${{targets.subpkgdir}}/opt/bin
# https://github.com/SeleniumHQ/docker-selenium/blob/trunk/NodeBase/Dockerfile
- working-directory: NodeBase
pipeline:
# https://github.com/SeleniumHQ/docker-selenium/blob/trunk/NodeBase/Dockerfile
- runs: |
mkdir -p ${{targets.contextdir}}/opt/bin
mkdir -p ${{targets.contextdir}}/etc/supervisor/conf.d
mkdir -p ${{targets.contextdir}}/usr/share/images/fluxbox
- runs: |
mkdir -p ${{targets.subpkgdir}}/etc/supervisor/conf.d
mkdir -p ${{targets.subpkgdir}}/usr/share/images/fluxbox
cp start-selenium-node.sh ${{targets.subpkgdir}}/opt/bin/
cp start-xvfb.sh ${{targets.subpkgdir}}/opt/bin/
cp selenium.conf ${{targets.subpkgdir}}/etc/supervisor/conf.d/
cp start-vnc.sh ${{targets.subpkgdir}}/opt/bin/
cp start-novnc.sh ${{targets.subpkgdir}}/opt/bin/
cp selenium_grid_logo.png ${{targets.subpkgdir}}/usr/share/images/fluxbox/ubuntu-light.png
cp generate_relay_config ${{targets.subpkgdir}}/opt/bin/generate_relay_config

mkdir -p ${{targets.subpkgdir}}/home/$SEL_USER/.fluxbox
mkdir -p ${{targets.subpkgdir}}/tmp/.X11-unix
mkdir -p ${{targets.subpkgdir}}/home/$SEL_USER/.vnc
mkdir -p ${{targets.subpkgdir}}/opt/selenium
mkdir -p ${{targets.subpkgdir}}/opt/selenium
echo "${SEL_PASSWD}" | x11vnc -storepasswd - ${{targets.subpkgdir}}/home/$SEL_USER/.vnc/passwd
# https://github.com/SeleniumHQ/docker-selenium/blob/trunk/NodeChrome/Dockerfile
cp start-selenium-node.sh ${{targets.contextdir}}/opt/bin/
cp start-xvfb.sh ${{targets.contextdir}}/opt/bin/
cp selenium.conf ${{targets.contextdir}}/etc/supervisor/conf.d/
cp start-vnc.sh ${{targets.contextdir}}/opt/bin/
cp start-novnc.sh ${{targets.contextdir}}/opt/bin/
cp selenium_grid_logo.png ${{targets.contextdir}}/usr/share/images/fluxbox/ubuntu-light.png
cp generate_relay_config ${{targets.contextdir}}/opt/bin/generate_relay_config

mkdir -p ${{targets.contextdir}}/home/$SEL_USER/.fluxbox
mkdir -p ${{targets.contextdir}}/tmp/.X11-unix
mkdir -p ${{targets.contextdir}}/home/$SEL_USER/.vnc
mkdir -p ${{targets.contextdir}}/opt/selenium
mkdir -p ${{targets.contextdir}}/opt/selenium
echo "${SEL_PASSWD}" | x11vnc -storepasswd - ${{targets.contextdir}}/home/$SEL_USER/.vnc/passwd
test:
environment:
contents:
packages:
- ${{package.name}}
- selenium-server
- ${{package.name}}-config
- geckodriver
Comment thread
Dentrax marked this conversation as resolved.
environment:
SE_EVENT_BUS_PUBLISH_PORT: 4442
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443
SE_EVENT_BUS_HOST: selenium-hub
CONFIG_FILE: /opt/selenium/config.toml
SE_BIND_HOST: True
pipeline:
- name: "Check all in one status"
uses: test/daemon-check-output
with:
start: "/opt/bin/start-selenium-node.sh"
timeout: 60
expected_output: |
Started Selenium node

# https://github.com/SeleniumHQ/docker-selenium/blob/trunk/NodeChrome/Dockerfile
- name: ${{package.name}}-nodechrome
description: NodeChrome
dependencies:
runtime:
- ${{package.name}}-nodebase
- chromium-docker-selenium-compat
pipeline:
- working-directory: NodeChrome
pipeline:
- runs: |
cp wrap_chrome_binary ${{targets.subpkgdir}}/opt/bin/wrap_chrome_binary
# https://github.com/SeleniumHQ/docker-selenium/blob/trunk/Standalone/Dockerfile
- working-directory: Standalone
mkdir -p ${{targets.contextdir}}/opt/bin/
cp wrap_chrome_binary ${{targets.contextdir}}/opt/bin/wrap_chrome_binary
test:
environment:
contents:
packages:
pipeline:
- runs: |
/opt/bin/wrap_chrome_binary &
Comment thread
utieyin marked this conversation as resolved.
Outdated
sleep 5
ps aux | grep chrome

- name: ${{package.name}}-nodefirefox
dependencies:
runtime:
- ${{package.name}}-nodebase
- geckodriver
- firefox
pipeline:
- working-directory: NodeFirefox
pipeline:
- runs: |
cp start-selenium-standalone.sh ${{targets.subpkgdir}}/opt/bin/start-selenium-standalone.sh
cp selenium.conf ${{targets.subpkgdir}}/etc/supervisor/conf.d/
cp generate_config ${{targets.subpkgdir}}/opt/bin/generate_config
mkdir -p ${{targets.contextdir}}/opt/bin
mkdir -p ${{targets.contextdir}}/opt/selenium/
mkdir -p ${{targets.contextdir}}/etc/supervisor/conf.d/
cp firefox-cleanup.sh ${{targets.contextdir}}/opt/bin/firefox-cleanup.sh
cp firefox-cleanup.conf ${{targets.contextdir}}/etc/supervisor/conf.d/firefox-cleanup.conf
echo "firefox" > ${{targets.contextdir}}/opt/selenium/browser_name
firefox --version | awk '{print $3}' > ${{targets.contextdir}}/opt/selenium/browser_version
echo "\"moz:firefoxOptions\": {\"binary\": \"/usr/bin/firefox\"}" > ${{targets.contextdir}}/opt/selenium/browser_binary_location
test:
environment:
contents:
packages:
pipeline:
- runs: |
firefox --version

- name: ${{package.name}}-supervisor-config
description: Docker Selenium supervisor configuration
dependencies:
replaces:
- supervisor-config
provides:
- supervisor-config
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/etc
mv ${{targets.destdir}}/etc/supervisord.conf ${{targets.contextdir}}/etc
mv ${{targets.destdir}}/etc/supervisor ${{targets.contextdir}}/etc

# Unset setuid bit
# jason@ copied this directly from https://serverfault.com/a/238964
# The extra 0 is to unset the setuid bit apparently.
chmod 00775 ${{targets.contextdir}}/etc/supervisord.conf

- name: ${{package.name}}-standalone-chrome
Comment thread
utieyin marked this conversation as resolved.
Outdated
description: Docker Selenium standalone
dependencies:
runtime:
- ${{package.name}}-nodechrome
- ${{package.name}}-standalone
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/etc
mkdir -p ${{targets.contextdir}}/opt/bin

update:
enabled: true
Expand All @@ -219,3 +342,13 @@ update:
replace: $1.$2
github:
identifier: SeleniumHQ/docker-selenium

test:
environment:
contents:
packages:
- ${{package.name}}-standalone
pipeline:
- runs: |
# Make sure Chrome and ChromeDriver are at the correct path
/opt/bin/start-selenium-standalone.sh --help || (echo "start-selenium-standalone.sh --help failed" && exit 1)
3 changes: 3 additions & 0 deletions docker-selenium/example-config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[router]
username = "admin"
password = "myStrongPassword"