Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
v2.46.0-01: Launch as grid only, firefox node only, chrome node only
Browse files Browse the repository at this point in the history
  • Loading branch information
elgalu committed Jul 16, 2015
1 parent 83cb8be commit 9bc267e
Show file tree
Hide file tree
Showing 14 changed files with 262 additions and 187 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ Note sha256 digests are generated after pushing the image to the registry theref

Note image ids also change after scm-source.json has being updated which triggers a cyclic problem so value TBD will be set here and updated in the [release][] page by navigating into any release tag.

## v2.46.0-01 (2015-07-16)
+ Launch as grid only, firefox node only, chrome node only. (Leo Gallucci)
+ Start services via env vars VIDEO=false GRID=true CHROME=true FIREFOX=true
+ Image tag details:
+ Selenium: v2.46.0 (87c69e2)
+ Chrome stable: 43.0.2357.134
+ Chrome beta: 44.0.2403.81
+ Chrome unstable: 45.0.2454.6
+ Firefox versions in this image:
39.0 38.0.6 37.0.2 36.0.4
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0
29.0.1 28.0 27.0.1 26.0 25.0.1 24.0
+ chromedriver: 2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961)
+ Java: 1.8.0_45 HotSpot(TM) 64-Bit 1.8.0_45-b14
+ Timezone: Europe/Berlin
+ Built with: Docker version 1.7.1, build 786b29d
+ FROM ubuntu:trusty-20150630
+ Python: 2.7.6
+ Digest: sha256:TBD
+ Image ID: TBD

## v2.46.0-00 (2015-07-15)
+ Make selenium maxInstances & maxSession configurable. (Leo Gallucci)
+ MAJOR: turned docker-selenium into 1 hub N nodes localhost setup.
Expand All @@ -24,6 +45,7 @@ Note image ids also change after scm-source.json has being updated which trigger
+ Java: 1.8.0_45 HotSpot(TM) 64-Bit 1.8.0_45-b14
+ Timezone: Europe/Berlin
+ Built with: Docker version 1.7.1, build 786b29d
+ FROM ubuntu:trusty-20150630
+ Python: 2.7.6
+ Digest: sha256:94c0e3992501db24a5a07cba516d8e7e32ac419ea7accae915275eb58dd389d5
+ Image ID: a8bc01890482646e82188ecd84b799fb2e7a1588f7627779b16735ed55d4f40c
Expand All @@ -45,6 +67,7 @@ Note image ids also change after scm-source.json has being updated which trigger
+ Java: 1.8.0_45 HotSpot(TM) 64-Bit 1.8.0_45-b14
+ Timezone: Europe/Berlin
+ Built with: Docker version 1.7.0, build 0baf609
+ FROM ubuntu:wily-20150708
+ Python: 2.7.10
+ Digest: sha256:1cd291d278d888cf566e0c7ca95377407b568ca3fb05aedb11f9781277e1ecb7
+ Image ID: 27b1674c981927123538e809d33cb7c9644da4c0f2cca85a655792d2cf57d698
Expand All @@ -60,6 +83,7 @@ Note image ids also change after scm-source.json has being updated which trigger
+ Java: 1.8.0_45 HotSpot(TM) 64-Bit 1.8.0_45-b14
+ Timezone: Europe/Berlin
+ Built with: Docker version 1.7.0, build 0baf609
+ FROM ubuntu:vivid-20150611
+ Python: 2.7.9
+ Digest: sha256:311e42f1253868dd10208e4153b2a9419dadf8e6ce4ef31cbf200604ac9e22b8
+ Image ID: 9a8d735a5e1ed22728426fb5cdd696215f382c74487f9616cfa3b67f31e735dc
Expand All @@ -79,6 +103,7 @@ Note image ids also change after scm-source.json has being updated which trigger
+ Java: 1.8.0_45 HotSpot(TM) 64-Bit 1.8.0_45-b14
+ Timezone: Europe/Berlin
+ Built with: Docker version 1.7.0, build 0baf609
+ FROM ubuntu:vivid-20150611
+ Python: 2.7.9
+ Digest: sha256:8d67d3d15dfd449e94433de46c352ff135f38678ebd6e217b613e7f1770d5490
+ Image ID: 247b69cbd53ef323b117362fd8bb7510276c5e9a702d15e8573223b0467538fb
Expand Down
195 changes: 96 additions & 99 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -593,109 +593,105 @@ RUN cd ${NORMAL_USER_HOME}/firefox-src \
;done \
&& chown -R ${NORMAL_USER}:${NORMAL_GROUP} ${SEL_HOME}

ENV FIREFOX_VERSIONS "${FIREFOX_VERSIONS1}, ${FIREFOX_VERSIONS2}, ${FIREFOX_VERSIONS3}"

#===================================
# Firefox version to use during run
#===================================
# For firefox please pick one of $FIREFOX_VERSIONS, default latest
ENV FIREFOX_VERSION ${FIREFOX_LATEST_VERSION}

#=================
# Supervisor conf
#=================
ADD supervisor/etc/supervisor/supervisord.conf /etc/supervisor/
ADD **/etc/supervisor/conf.d/* /etc/supervisor/conf.d/

#==================
# User & ssh stuff
#==================
#======
# User
#======
USER ${NORMAL_USER}
ENV USER ${NORMAL_USER}
ENV HOME ${NORMAL_USER_HOME}
ENV VNC_STORE_PWD_FILE ${HOME}/.vnc/passwd

#========================================================================
# Some configuration options that can be customized at container runtime
#========================================================================
ENV BIN_UTILS /bin-utils
ENV PATH ${PATH}:${BIN_UTILS}
# JVM uses only 1/4 of system memory by default
ENV MEM_JAVA_PERCENT 80
# Max amount of time to wait for other processes dependencies
ENV WAIT_TIMEOUT 5s
ENV SCREEN_WIDTH 1900
ENV SCREEN_HEIGHT 1480
ENV SCREEN_MAIN_DEPTH 24
ENV SCREEN_DEPTH ${SCREEN_MAIN_DEPTH}+32
ENV DISP_N 10
ENV DISPLAY :${DISP_N}
ENV XEPHYR_DISPLAY :${DISP_N}
ENV SCREEN_NUM 0
# ENV XEPHYR_SCREEN_SIZE "${SCREEN_WIDTH}""x""${SCREEN_HEIGHT}"""
# Even though you can change them below, don't worry too much about container
# internal ports since you can map them to the host via `docker run -p`
ENV SELENIUM_PORT 24444
ENV SELENIUM_HUB_PORT ${SELENIUM_PORT}
# You may want to connect to another hub
ENV SELENIUM_HUB_HOST 127.0.0.1
ENV SELENIUM_NODE_HOST 127.0.0.1
ENV SELENIUM_NODE_CH_PORT 25550
ENV SELENIUM_NODE_FF_PORT 25551
# Selenium additional params:
ENV SELENIUM_HUB_PARAMS ""
ENV SELENIUM_NODE_PARAMS ""
# Selenium capabilities descriptive (to avoid opera/ie warnings)
# docs at https://code.google.com/p/selenium/wiki/Grid2
ENV MAX_INSTANCES 1
ENV MAX_SESSIONS 1
ENV SEL_RELEASE_TIMEOUT_SECS 9000
ENV SEL_BROWSER_TIMEOUT_SECS 6000
ENV SEL_CLEANUPCYCLE_MS 70000
ENV SEL_NODEPOLLING_MS 60000
# Vnc
ENV VNC_PORT 25900
ENV NOVNC_PORT 26080
# You can set the VNC password or leave null so a random password is generated:
# ENV VNC_PASSWORD topsecret
ENV SSHD_PORT 22222
# Supervisor (process management) http server
ENV SUPERVISOR_HTTP_PORT 29001
ENV SUPERVISOR_HTTP_USERNAME supervisorweb
ENV SUPERVISOR_HTTP_PASSWORD somehttpbasicauthpwd
ENV SUPERVISOR_REQUIRED_SRV_LIST "vnc|novnc|sshd|selenium-hub|selenium-node-chrome|selenium-node-firefox|xmanager|xterm|xvfb"
# Supervisor loglevel and also general docker log level
# can be: debug, warn, trace, info
ENV LOG_LEVEL info
ENV LOGFILE_MAXBYTES 10MB
ENV LOGFILE_BACKUPS 5
# Logs are now managed by supervisord.conf, see
# ${LOGS_DIR}/*.log
ENV LOGS_DIR /var/log/sele
# ENV VIDEO_FORMAT xxxx
# Encoding movie type "flv", "swf5", "swf7", "mpeg" (PyMedia required)
# or "vnc" more info at http://www.unixuser.org/~euske/vnc2swf/pyvnc2swf.html
ENV VNC2SWF_ENCODING swf5
# Specifies the framerate in fps. (default=12.0). Reducing the frame rate
# sometimes helps reducing the movie size.
ENV VNC2SWF_FRAMERATE 25
# ffmpeg encoding options
ENV FFMPEG_FRAME_RATE 25
# ENV FFMPEG_CODEC_ARGS "-vcodec libx264 -vpre lossless_ultrafast -threads 0"
ENV FFMPEG_CODEC_ARGS ""
# Video recording on container create
ENV VIDEO false
# Video file and extension, e.g. swf, mp4
ENV VIDEO_FILE_EXTENSION "mkv"
ENV VIDEO_FILE_NAME "test"
ENV VIDEOS_DIR "${NORMAL_USER_HOME}/videos"
ENV VIDEO_LOG_FILE "${LOGS_DIR}/video-rec-stdout.log"
ENV VIDEO_PIDFILE "${RUN_DIR}/video.pid"
#===============================
# Run docker from inside docker
# Usage: docker run -v /var/run/docker.sock:/var/run/docker.sock
# -v $(which docker):$(which docker)
ENV DOCKER_SOCK "/var/run/docker.sock"

#======
# Envs
#======
ENV FIREFOX_VERSIONS="${FIREFOX_VERSIONS1}, ${FIREFOX_VERSIONS2}, ${FIREFOX_VERSIONS3}" \
# Firefox version to use during run
# For firefox please pick one of $FIREFOX_VERSIONS, default latest
FIREFOX_VERSION=${FIREFOX_LATEST_VERSION} \
# User and home
USER="${NORMAL_USER}" \
HOME="${NORMAL_USER_HOME}" \
# Vnc password file
VNC_STORE_PWD_FILE="${NORMAL_USER_HOME}/.vnc/passwd" \
BIN_UTILS="/bin-utils" \
# JVM uses only 1/4 of system memory by default
MEM_JAVA_PERCENT=80 \
# Max amount of time to wait for other processes dependencies
WAIT_TIMEOUT="5s" \
SCREEN_WIDTH=1900 \
SCREEN_HEIGHT=1480 \
SCREEN_MAIN_DEPTH=24 \
SCREEN_SUB_DEPTH=32 \
# Display number; see entry.sh for $DISPLAY
DISP_N=10 \
SCREEN_NUM=0 \
# ENV XEPHYR_SCREEN_SIZE "${SCREEN_WIDTH}""x""${SCREEN_HEIGHT}"""
# Even though you can change them below, don't worry too much about container
# internal ports since you can map them to the host via `docker run -p`
SELENIUM_HUB_PORT=24444 \
# You may want to connect to another hub
SELENIUM_HUB_HOST="127.0.0.1" \
SELENIUM_NODE_HOST="127.0.0.1" \
SELENIUM_NODE_CH_PORT=25550 \
SELENIUM_NODE_FF_PORT=25551 \
# Selenium additional params:
SELENIUM_HUB_PARAMS="" \
SELENIUM_NODE_PARAMS="" \
# Selenium capabilities descriptive (to avoid opera/ie warnings)
# docs at https://code.google.com/p/selenium/wiki/Grid2
MAX_INSTANCES=1 \
MAX_SESSIONS=1 \
SEL_RELEASE_TIMEOUT_SECS=9000 \
SEL_BROWSER_TIMEOUT_SECS=6000 \
SEL_CLEANUPCYCLE_MS=70000 \
SEL_NODEPOLLING_MS=60000 \
# Vnc
VNC_PORT=25900 \
NOVNC_PORT=26080 \
# You can set the VNC password or leave null so a random password is generated:
# ENV VNC_PASSWORD topsecret
SSHD_PORT=22222 \
# Supervisor (process management) http server
SUPERVISOR_HTTP_PORT=29001 \
SUPERVISOR_HTTP_USERNAME=supervisorweb \
SUPERVISOR_HTTP_PASSWORD=somehttpbasicauthpwd \
SUPERVISOR_REQUIRED_SRV_LIST="vnc|novnc|sshd|xmanager|xvfb" \
# Supervisor loglevel and also general docker log level
# can be: debug, warn, trace, info
LOG_LEVEL=info \
LOGFILE_MAXBYTES=10MB \
LOGFILE_BACKUPS=5 \
# Logs are now managed by supervisord.conf, see
# ${LOGS_DIR}/*.log
LOGS_DIR="/var/log/sele" \
# ENV VIDEO_FORMAT xxxx
# Encoding movie type "flv", "swf5", "swf7", "mpeg" (PyMedia required)
# or "vnc" more info at http://www.unixuser.org/~euske/vnc2swf/pyvnc2swf.html
VNC2SWF_ENCODING=swf5 \
# Specifies the framerate in fps. (default=12.0). Reducing the frame rate
# sometimes helps reducing the movie size.
VNC2SWF_FRAMERATE=25 \
# ffmpeg encoding options
FFMPEG_FRAME_RATE=25 \
# ENV FFMPEG_CODEC_ARGS "-vcodec libx264 -vpre lossless_ultrafast -threads 0"
FFMPEG_CODEC_ARGS="" \
# Services to start by default; true/false
VIDEO=false \
GRID=true \
CHROME=true \
FIREFOX=true \
# Video file and extension, e.g. swf, mp4, mkv, flv
VIDEO_FILE_EXTENSION="mkv" \
VIDEO_FILE_NAME="test" \
VIDEOS_DIR="${NORMAL_USER_HOME}/videos" \
#===============================
# Run docker from inside docker
# Usage: docker run -v /var/run/docker.sock:/var/run/docker.sock
# -v $(which docker):$(which docker)
DOCKER_SOCK="/var/run/docker.sock"

#================================
# Expose Container's Directories
Expand All @@ -704,7 +700,7 @@ ENV DOCKER_SOCK "/var/run/docker.sock"

# Only expose ssh port given the other services are not secured
# forcing the user to open ssh tunnels or use docker run -p ports...
# EXPOSE ${SELENIUM_PORT} ${VNC_PORT} ${SSHD_PORT} ${TOMCAT_PORT}
# EXPOSE ${SELENIUM_HUB_PORT} ${VNC_PORT} ${SSHD_PORT} ${TOMCAT_PORT}
EXPOSE ${SSHD_PORT}

#================
Expand Down Expand Up @@ -737,7 +733,8 @@ RUN mkdir -p ${NORMAL_USER_HOME}/.vnc \
&& sudo chmod 1777 /tmp/.X11-unix /tmp/.ICE-unix \
# To avoid error "Missing privilege separation directory: /var/run/sshd"
&& sudo mkdir -p /var/run/sshd \
&& sudo chmod 744 /var/run/sshd
&& sudo chmod 744 /var/run/sshd \
&& echo ""

#=====================================================
# Meta JSON file to hold commit info of current build
Expand All @@ -753,5 +750,5 @@ RUN [ $(find ./ -mtime -1 -type f -name "scm-source.json" 2>/dev/null) ] \
# CMD or ENTRYPOINT
#===================
# ENTRYPOINT ["entry.sh"]
CMD ["entry.sh"]
# CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
CMD ["/bin-utils/entry.sh"]
Loading

0 comments on commit 9bc267e

Please sign in to comment.