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

Commit 1330cdf

Browse files
committed
Add OSX support closes #111 #110
1 parent 860c295 commit 1330cdf

18 files changed

+255
-49
lines changed

.travis.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
# us to pick a language else it will pick Ruby by default
33
language: generic
44

5+
sudo: required
6+
services:
7+
- docker
8+
59
# Omit running tests on temporal branches
610
branches:
711
except:
@@ -12,48 +16,38 @@ env:
1216
- TEST_SLEEPS="0.7"
1317

1418
matrix:
19+
allow_failures:
20+
- os: osx
21+
env:
22+
- DOCKER_VERSION="1.12.0-rc3"
23+
DOCKER_COMPOSE_VERSION="1.8.0-rc2"
1524
include:
1625
# Linux with docker:stable compose:stable
1726
- os: linux
18-
sudo: required
19-
services:
20-
- docker
2127
env:
2228
- DOCKER_VERSION="stable"
2329
DOCKER_COMPOSE_VERSION="1.7.1"
2430
DOCKER_PUSH=true
2531
# Linux with docker:beta compose:stable
2632
- os: linux
27-
sudo: required
28-
services:
29-
- docker
3033
env:
3134
- DOCKER_VERSION="1.12.0-rc3"
3235
DOCKER_COMPOSE_VERSION="1.7.1"
3336
# Linux with docker:stable compose:beta
3437
- os: linux
35-
sudo: required
36-
services:
37-
- docker
3838
env:
3939
- DOCKER_VERSION="stable"
4040
DOCKER_COMPOSE_VERSION="1.8.0-rc2"
4141
# Linux with docker:beta compose:beta
4242
- os: linux
43-
sudo: required
44-
services:
45-
- docker
4643
env:
4744
- DOCKER_VERSION="1.12.0-rc3"
4845
DOCKER_COMPOSE_VERSION="1.8.0-rc2"
4946
# Mac OSX: only test native docker version
5047
- os: osx
51-
osx_image: xcode8
5248
env:
5349
- DOCKER_VERSION="1.12.0-rc3"
5450
DOCKER_COMPOSE_VERSION="1.8.0-rc2"
55-
allow_failures:
56-
- os: osx
5751

5852
before_install:
5953
- travis_retry ./test/before_install_setup

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,36 @@ Note image ids also change after scm-source.json has being updated which trigger
77
###### To get container versions
88
docker exec grid versions
99

10+
## TBD_DOCKER_TAG
11+
+ Date: TBD_DATE
12+
+ TBD_COMMIT_MSG
13+
+ Image tag details:
14+
+ Selenium: vTBD_SELENIUM_VERSION (TBD_SELENIUM_REVISION)
15+
+ Chrome stable: TBD_CHROME_STABLE
16+
+ Firefox stable: TBD_FIREFOX_STABLE
17+
+ Chromedriver: TBD_CHROME_DRIVER (TBD_CHROMEDRIVER_COMMIT)
18+
+ Java: TBD_JAVA_VENDOR Java TBD_JAVA_BUILD
19+
+ Timezone: TBD_TIME_ZONE
20+
+ FROM ubuntu:UBUNTU_FLAVOR-UBUNTU_DATE
21+
+ Python: TBD_PYTHON_VERSION
22+
+ Sauce Connect TBD_SAUCE_CONNECT_VERS, build TBD_SAUCE_CONNECT_BUILD TBD_SAUCE_CONNECT_REVISION
23+
+ BrowserStack Local version TBD_BROWSER_STACK_VERSION
24+
+ Tested on kernel dev host: 4.4.0-30-generic x86_64
25+
+ Tested on kernel CI host: TBD_HOST_UNAME
26+
+ Built at dev host with: Docker version 1.12.0-rc3, build 91e29e8
27+
+ Built at CI host with: Docker version TBD_DOCKER_VERS, build TBD_DOCKER_BUILD
28+
+ Built at dev host with: Docker Compose version 1.8.0-rc2, build c72c966
29+
+ Built at CI host with: Docker Compose version TBD_DOCKER_COMPOSE_VERS, build TBD_DOCKER_COMPOSE_BUILD
30+
+ Image size: TBD_IMAGE_SIZE
31+
+ Digest: TBD_DIGEST
32+
+ Image ID: TBD_IMAGE_ID
33+
1034
## 2.53.1f
1135
+ Date: 2016-07-08
1236
+ Add node -registerCycle customization via SELENIUM_NODE_REGISTER_CYCLE
1337
+ Suicide nodes on selenium exited node.
1438
+ WIP to add OSX support #111 #110
39+
+ Upgrade BrowserStack Local 5.7
1540
+ Image tag details:
1641
+ Selenium: v2.53.1 (a36b8b1)
1742
+ Chrome stable: 51.0.2704.106

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ For pull requests or local commits:
1313

1414
For repository owners only:
1515

16-
git commit -m "Add node registerCycle. Suicide nodes on selenium exited node."
16+
git commit -m "Add OSX support closes #111 #110"
1717
git tag -d latest #tag latest will be updated from TravisCI
1818
git tag 2.53.1f && git push origin tmp-2.53.1f && git push --tags
1919

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ MAINTAINER Leo Gallucci <[email protected]>
3737
ENV DEBIAN_FRONTEND=noninteractive \
3838
DEBCONF_NONINTERACTIVE_SEEN=true
3939

40+
# http://askubuntu.com/a/235911/134645
41+
RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com \
42+
3B4FE6ACC0B21F32 \
43+
40976EAF437D05B5 \
44+
2EA8F35793D8809A
45+
4046
#========================
4147
# Miscellaneous packages
4248
#========================

docker-compose-host.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
version: '2'
2+
3+
services:
4+
hub:
5+
image: elgalu/selenium
6+
network_mode: host
7+
environment:
8+
- SELENIUM_HUB_PORT
9+
- VNC_START=false
10+
- PICK_ALL_RANDMON_PORTS=true
11+
- GRID=true
12+
- CHROME=false
13+
- FIREFOX=false
14+
15+
chrome:
16+
image: elgalu/selenium
17+
network_mode: host
18+
shm_size: 1g
19+
environment:
20+
- SELENIUM_HUB_PORT
21+
- VNC_START=false
22+
- PICK_ALL_RANDMON_PORTS=true
23+
- GRID=false
24+
- CHROME=true
25+
- FIREFOX=false
26+
depends_on:
27+
- hub
28+
29+
firefox:
30+
image: elgalu/selenium
31+
network_mode: host
32+
environment:
33+
- SELENIUM_HUB_PORT
34+
- VNC_START=false
35+
- PICK_ALL_RANDMON_PORTS=true
36+
- GRID=false
37+
- CHROME=false
38+
- FIREFOX=true
39+
depends_on:
40+
- hub
41+
42+
#-- Notes --#
43+
# shm_size: 1g
44+
# Fixes small 64 mb /dev/shm inside docker containers
45+
# see: https://github.com/docker/compose/blob/1.7.1/compose/config/config.py#L79
46+
# Can also be fixed with:
47+
# volumes:
48+
# - /dev/shm:/dev/shm
49+
# Can also be fixed with:
50+
# environment:
51+
# - SHM_TRY_MOUNT_UNMOUNT=true

docker-compose.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
version: '2'
2+
23
services:
34
hub:
45
image: elgalu/selenium
5-
network_mode: host
6+
ports:
7+
- 4444:${SELENIUM_HUB_PORT}
68
environment:
79
- SELENIUM_HUB_PORT
810
- VNC_START=false
@@ -13,7 +15,9 @@ services:
1315

1416
chrome:
1517
image: elgalu/selenium
16-
network_mode: host
18+
depends_on:
19+
- hub
20+
network_mode: "service:hub"
1721
shm_size: 1g
1822
environment:
1923
- SELENIUM_HUB_PORT
@@ -22,21 +26,19 @@ services:
2226
- GRID=false
2327
- CHROME=true
2428
- FIREFOX=false
25-
depends_on:
26-
- hub
2729

2830
firefox:
2931
image: elgalu/selenium
30-
network_mode: host
32+
depends_on:
33+
- hub
34+
network_mode: "service:hub"
3135
environment:
3236
- SELENIUM_HUB_PORT
3337
- VNC_START=false
3438
- PICK_ALL_RANDMON_PORTS=true
3539
- GRID=false
3640
- CHROME=false
3741
- FIREFOX=true
38-
depends_on:
39-
- hub
4042

4143
#-- Notes --#
4244
# shm_size: 1g

docs/docker-compose.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Compose
2-
Scale up and down the nodes by using [docker-compose](https://docs.docker.com/compose/). Install the tooling by following that link and make sure you have latest stable versions of both tools, docker and docker-compose:
2+
Scale up and down the nodes by using [docker-compose](https://docs.docker.com/compose/).
3+
Install the tooling by following that link and make sure you have latest stable versions of both tools.
4+
5+
## Requisites
6+
Docker and docker-compose:
37

48
docker --version #=> 1.11.2
59
docker-compose --version #=> 1.7.1
@@ -12,7 +16,8 @@ Either clone this repository or download the file [docker-compose.yml](../docker
1216
### Run
1317
Either start with `docker-compose ... scale` as shown in below example or you can also use `docker-compose up` and scale after in a second command.
1418

15-
SELENIUM_HUB_PORT=4444 docker-compose -p selenium scale hub=1 chrome=3 firefox=3
19+
SELENIUM_HUB_PORT=4444 docker-compose -p selenium up -d
20+
docker-compose -p selenium scale chrome=3 firefox=3
1621

1722
Wait until the grid starts properly before starting the tests _(Optional but recommended)_
1823

docs/jenkins.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Compose
2+
Scale up and down the nodes by using [docker-compose](https://docs.docker.com/compose/).
3+
For requirements check [docker-compose#requisites](./docker-compose.md#requisites)
4+
5+
## Usage
6+
Either clone this repository or download the file [docker-compose-host.yml](../docker-compose-host.yml) using `wget`
7+
8+
wget -nv -O docker-compose.yml "https://raw.githubusercontent.com/elgalu/docker-selenium/master/docker-compose-host.yml"
9+
10+
### Run
11+
Either start with `docker-compose ... scale` as shown in below example or you can also use `docker-compose up` and scale after in a second command.
12+
13+
SELENIUM_HUB_PORT=4444 docker-compose -p selenium scale hub=1 chrome=3 firefox=3
14+
15+
Wait until the grid starts properly before starting the tests _(Optional but recommended)_
16+
17+
docker-compose -p selenium exec -T --index=3 chrome wait_all_done 30s
18+
19+
### Cleanup
20+
The `down` compose command stops and remove containers, networks, volumes, and images created by `up` or `scale`
21+
22+
docker-compose -p selenium down

osx/dockertoolbox-pkg-rc.rb

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Forked from:
2+
# https://github.com/caskroom/homebrew-cask/blob/master/Casks/dockertoolbox.rb
3+
# Docs:
4+
# https://github.com/astorije/homebrew-cask/blob/master/CONTRIBUTING.md#cask-stanzas
5+
cask 'dockertoolbox-rc' do
6+
version '1.12.0-rc3'
7+
8+
# shasum -a 256 DockerToolbox-1.12.0-rc3.pkg
9+
sha256 'e661176aa37223a081ed6bcb82ff94e6c8be15d48075badf4d32c4ddb2ac8cb9'
10+
# github.com/docker/toolbox was verified as official when first introduced to the cask
11+
url "https://github.com/docker/toolbox/releases/download/v#{version}/DockerToolbox-#{version}.pkg"
12+
13+
# appcast URL for an appcast which provides information on future updates
14+
# https://github.com/caskroom/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/appcast.md
15+
# curl --compressed -L "https://github.com/docker/toolbox/releases.atom" | \
16+
# sed 's|<pubDate>[^<]*</pubDate>||g' | shasum -a 256
17+
appcast 'https://github.com/docker/toolbox/releases.atom',
18+
checkpoint: '634a681112d156cbcdc75e66508b2a759f70b7e8ce9ff8e8b794338705a8ead7'
19+
20+
name 'Docker Toolbox'
21+
homepage 'https://www.docker.com/toolbox'
22+
license :apache
23+
24+
pkg "DockerToolbox-#{version}.pkg"
25+
26+
postflight do
27+
set_ownership '~/.docker'
28+
end
29+
30+
uninstall pkgutil: [
31+
'io.boot2dockeriso.pkg.boot2dockeriso',
32+
'io.docker.pkg.docker',
33+
'io.docker.pkg.dockercompose',
34+
'io.docker.pkg.dockermachine',
35+
'io.docker.pkg.dockerquickstartterminalapp',
36+
'io.docker.pkg.kitematicapp',
37+
]
38+
end

osx/dockertoolbox-rc.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Refs:
2+
# https://github.com/caskroom/homebrew-cask/blob/master/Casks/docker.rb
3+
# https://github.com/caskroom/homebrew-cask/issues/22281
4+
cask 'dockertoolbox-rc' do
5+
version 'beta'
6+
7+
# shasum -a 256 Docker.dmg
8+
sha256 '7ac7c061b135f821fac39e53f7b74233dcaf8f926e4c6d28031acc8717b85107'
9+
url "https://download.docker.com/mac/#{version}/Docker.dmg"
10+
11+
name 'Docker for Mac'
12+
homepage 'http://www.docker.com/products/docker#/mac'
13+
license :mit
14+
15+
auto_updates true
16+
17+
app 'Docker.app'
18+
end

0 commit comments

Comments
 (0)