Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable web and nginx slaves #20

Merged
merged 53 commits into from
Apr 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
f38fd5d
web: Add web support (+ more slack)
joshmoore Feb 29, 2016
6946a08
web: use omero-install
joshmoore Mar 14, 2016
4396b5c
fix web slave:
atarkowska Mar 24, 2016
d4f712a
update git ignore
atarkowska Mar 24, 2016
c7aa973
- uses systemd to start services on web and nginx
atarkowska Mar 24, 2016
adf2432
update number in rename.py
atarkowska Mar 26, 2016
2e8cf58
revert to trigger
atarkowska Mar 27, 2016
70452e0
move platform specific config to osx file
atarkowska Mar 28, 2016
7e73a63
fix web job
atarkowska Mar 29, 2016
c418975
fix permission denied in nginx
atarkowska Mar 29, 2016
58af84d
fix redis IP
atarkowska Mar 29, 2016
bcc5724
fix jenkins host in web job
atarkowska Mar 29, 2016
f811631
use redis and fix gunicorn IP
atarkowska Mar 29, 2016
9947186
update number in rename
atarkowska Mar 31, 2016
dff519e
managing daemons with init scripts
atarkowska Mar 31, 2016
af2b571
add selenium hub
atarkowska Apr 1, 2016
d79eef8
update rename
atarkowska Apr 1, 2016
6c9bbfb
add JAVA_OPTS to improve selenium nodes
atarkowska Apr 1, 2016
8a47256
find slave IP
atarkowska Apr 1, 2016
7c99dcd
use label rather then name to allow scaling
atarkowska Apr 1, 2016
4c6aed5
add robot node
atarkowska Apr 3, 2016
9d5ae2a
add robot job
atarkowska Apr 4, 2016
2692d4e
clean up hosts
atarkowska Apr 4, 2016
be4c46b
more fixes to robot
atarkowska Apr 4, 2016
283c6e6
install more dependences
atarkowska Apr 4, 2016
632a4c6
more fixes
atarkowska Apr 4, 2016
feb4f01
install slice2java
atarkowska Apr 4, 2016
d216b1b
add robot plugin
atarkowska Apr 4, 2016
b9a301a
fix robot job
atarkowska Apr 4, 2016
0e86638
update robot job to publish test results
atarkowska Apr 4, 2016
ca05c24
revert BF to push only PRs with default Travis status no-errors
atarkowska Apr 5, 2016
d743d1a
fix robot test results
atarkowska Apr 5, 2016
78ea568
add web and robot to daily trigger
atarkowska Apr 5, 2016
bfc77f2
add more java opts for selenium hub
atarkowska Apr 5, 2016
59cbbff
adding server systemd node and server job
atarkowska Apr 5, 2016
c6f3b59
improving server settings
atarkowska Apr 5, 2016
34d24b1
add server host to web server list
atarkowska Apr 5, 2016
70e55ca
run robot on server host
atarkowska Apr 5, 2016
9aed6b4
update trigger job
atarkowska Apr 5, 2016
bd89be8
more selenium java opts
atarkowska Apr 5, 2016
ffacf26
update rename.py
atarkowska Apr 5, 2016
8258c08
clean up robot workspace
atarkowska Apr 6, 2016
6e5c61f
manage nginx reload via trigger
atarkowska Apr 6, 2016
df7a8aa
use ome/omero-install repo
atarkowska Apr 6, 2016
88af7f5
use SPACENAME for webserver host for robot
atarkowska Apr 6, 2016
60c4aa8
renaming containers and jobs, cleanup
atarkowska Apr 6, 2016
6a38f32
remove robot volume
atarkowska Apr 6, 2016
7914b33
node label remains unchanged
atarkowska Apr 6, 2016
04dc7a7
add custom compose for unix
atarkowska Apr 6, 2016
6a4bef8
change number in rename
atarkowska Apr 6, 2016
2bbd608
remove slack
atarkowska Apr 7, 2016
e6cdf81
fix travis
atarkowska Apr 7, 2016
565886f
handle USER_ID in ds
atarkowska Apr 7, 2016
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.*un~
home/.*
home/*.log
home/cache/
home/fingerprints/
home/identity.key.enc
home/init.groovy.d/
Expand Down Expand Up @@ -35,3 +36,4 @@ slave/.matplotlib
slave/.oracle_jre_usage
slave/.local
slave/.ssh
web/.jenkins
25 changes: 21 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,29 @@ language: java
services:
- docker

env:
global:
- DOCKER_VERSION=1.10.1-0~trusty
- DOCKER_COMPOSE_VERSION=1.6.0

before_install:
- ./rename.py travis
- sudo apt-get update
- sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" install docker-engine=${DOCKER_VERSION}
- sudo gpasswd -a $USER docker
- export USER_ID=`id -u $USER`
- docker -v

- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- docker-compose -v

- ./rename.py travis

install:
- docker-compose build
- docker-compose -f docker-compose.yml -f docker-compose.unix.yml build

script:
- docker-compose up -d slave
- docker-compose stop
- docker-compose -f docker-compose.yml -f docker-compose.unix.yml up -d
- docker-compose -f docker-compose.yml -f docker-compose.unix.yml stop
18 changes: 18 additions & 0 deletions docker-compose.osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,21 @@ jenkins:
user: "1000"
slave:
user: "1000"
omero:
privileged: true
web:
ports:
- "4080:4080"
privileged: true
nginx:
ports:
- "8888:80"
privileged: true
redis:
ports:
- "6379:6379"
seleniumhub:
ports:
- "4444:4444"
robot:
privileged: true
22 changes: 22 additions & 0 deletions docker-compose.unix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
jenkins:
user: ${USER_ID}

omero:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /run

web:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /run

nginx:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /run

robot:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /run
80 changes: 73 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,84 @@ slave:
- jenkins
volumes:
- ./slave:/home/slave
volumes_from:
- git
environment:
- JAVA_HOME=/etc/alternatives/java_sdk
- SERVICE_NAME=SPACENAME-omero
- DOCKER_FIX=' '
command: -labels centos6 -labels slave -executors 4

nginx:
image: nginx
omero:
build: server
links:
- jenkins
- pg
volumes:
- ./server:/home/omero
environment:
- JENKINS_LABEL=/etc/alternatives/java_sdk
- JENKINS_MODE=exclusive
- SERVICE_NAME=SPACENAME-omero

web:
build: web
links:
- jenkins
- redis
- slave
- omero
volumes:
- ./slave:/home/jenkins-slave
- ./web:/home/omero
- ./nginx/conf.d:/home/omero/nginx
environment:
- JENKINS_LABEL=/etc/alternatives/java_sdk
- JENKINS_MODE=exclusive

nginx:
build: nginx
links:
- jenkins
- web
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./web/static/web:/home/omero/static/web
environment:
- JENKINS_LABEL=/etc/alternatives/java_sdk
- JENKINS_MODE=exclusive
- SERVICE_NAME=SPACENAME-nginx

redis:
image: redis
environment:
- SERVICE_NAME=SPACENAME-redis

seleniumhub:
image: selenium/hub
environment:
- "JAVA_OPTS: -d64 -Xmx512m -Djava.security.egd=file:/dev/./urandom"
- SERVICE_NAME=SPACENAME-seleniumhub
- GRID_BROWSER_TIMEOUT=5000
- GRID_TIMEOUT=5000
seleniumfirefox:
image: selenium/node-firefox
links:
- seleniumhub:hub
environment:
- "JAVA_OPTS: -d64 -Xmx512m -Djava.security.egd=file:/dev/./urandom"
seleniumchrome:
image: selenium/node-chrome
links:
- seleniumhub:hub
environment:
- "JAVA_OPTS: -d64 -Xmx512m -Djava.security.egd=file:/dev/./urandom"

robot:
build: robot
links:
- jenkins
- slave
- omero
- nginx
- seleniumhub
environment:
- SERVICE_NAME=SPACENAME-web
- JENKINS_LABEL=/etc/alternatives/java_sdk
- JENKINS_MODE=exclusive
- SERVICE_NAME=SPACENAME-robot
4 changes: 2 additions & 2 deletions ds
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

EXTRA=${EXTRA:-"docker-compose.osx.yml"}
exec docker-compose -f docker-compose.yml -f "$EXTRA" "$@"
EXTRA=${EXTRA:-"docker-compose.unix.yml"}
exec env USER_ID=$UID docker-compose -f docker-compose.yml -f "$EXTRA" "$@"
2 changes: 1 addition & 1 deletion home/hudson.plugins.git.GitSCM.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
<globalConfigName></globalConfigName>
<globalConfigEmail></globalConfigEmail>
<createAccountBasedOnEmail>false</createAccountBasedOnEmail>
</hudson.plugins.git.GitSCM_-DescriptorImpl>
</hudson.plugins.git.GitSCM_-DescriptorImpl>
2 changes: 1 addition & 1 deletion home/hudson.plugins.git.GitTool.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
<properties/>
</hudson.plugins.git.GitTool>
</installations>
</hudson.plugins.git.GitTool_-DescriptorImpl>
</hudson.plugins.git.GitTool_-DescriptorImpl>
4 changes: 3 additions & 1 deletion home/hudson.tasks.Shell.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
<?xml version='1.0' encoding='UTF-8'?>
<hudson.tasks.Shell_-DescriptorImpl/>
<hudson.tasks.Shell_-DescriptorImpl>
<shell>/bin/bash</shell>
</hudson.tasks.Shell_-DescriptorImpl>
3 changes: 2 additions & 1 deletion home/jobs/BIOFORMATS-maven/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
<submoduleCfg class="list"/>
<extensions/>
</scm>
<canRoam>true</canRoam>
<assignedNode>slave</assignedNode>
<canRoam>false</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
Expand Down
5 changes: 3 additions & 2 deletions home/jobs/BIOFORMATS-push/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<description></description>
<choices class="java.util.Arrays$ArrayList">
<a class="string-array">
<string>success-only</string>
<string>no-error</string>
<string>none</string>
Copy link
Member

Choose a reason for hiding this comment

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

Is this reordering made on purpose ? This will set none as the default Travis status to use which might have some unwanted effect.

<string>success-only</string>
</a>
</choices>
</hudson.model.ChoiceParameterDefinition>
Expand Down Expand Up @@ -57,7 +57,8 @@
</hudson.plugins.git.extensions.impl.CloneOption>
</extensions>
</scm>
<canRoam>true</canRoam>
<assignedNode>slave</assignedNode>
<canRoam>false</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
Expand Down
4 changes: 3 additions & 1 deletion home/jobs/OMERO-build/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
<hudson.plugins.git.extensions.impl.CleanCheckout/>
</extensions>
</scm>
<canRoam>true</canRoam>
<assignedNode>slave</assignedNode>
<canRoam>false</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
Expand All @@ -54,6 +55,7 @@ source docs/hudson/OMERO.sh
<onlyIfSuccessful>false</onlyIfSuccessful>
<fingerprint>false</fingerprint>
<defaultExcludes>true</defaultExcludes>
<caseSensitive>true</caseSensitive>
</hudson.tasks.ArtifactArchiver>
</publishers>
<buildWrappers/>
Expand Down
5 changes: 3 additions & 2 deletions home/jobs/OMERO-push/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
</hudson.plugins.git.extensions.impl.RelativeTargetDirectory>
</extensions>
</scm>
<canRoam>true</canRoam>
<assignedNode>slave</assignedNode>
<canRoam>false</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
Expand All @@ -68,4 +69,4 @@ $HOME/.local/bin/scc $MERGE_COMMAND -S $STATUS --push $PUSH_BRANCH</command>
</builders>
<publishers/>
<buildWrappers/>
</project>
</project>
99 changes: 99 additions & 0 deletions home/jobs/OMERO-robot/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties>
<hudson.model.ParametersDefinitionProperty>
<parameterDefinitions>
<hudson.model.StringParameterDefinition>
<name>HOSTNAME</name>
<description></description>
<defaultValue>omero</defaultValue>
</hudson.model.StringParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<scm class="hudson.scm.NullSCM"/>
<assignedNode>robot</assignedNode>
<canRoam>false</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers/>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>rm -rf src</command>
</hudson.tasks.Shell>
<hudson.plugins.copyartifact.CopyArtifact plugin="[email protected]">
<project>OMERO-build</project>
<filter>src/target/openmicroscopy*zip</filter>
<target></target>
<excludes></excludes>
<selector class="hudson.plugins.copyartifact.StatusBuildSelector"/>
<flatten>true</flatten>
<doNotFingerprintArtifacts>false</doNotFingerprintArtifacts>
</hudson.plugins.copyartifact.CopyArtifact>
<hudson.plugins.copyartifact.CopyArtifact plugin="[email protected]">
<project>OMERO-build</project>
<filter>src/target/OMERO.server*zip</filter>
<target></target>
<excludes></excludes>
<selector class="hudson.plugins.copyartifact.StatusBuildSelector"/>
<flatten>true</flatten>
<doNotFingerprintArtifacts>false</doNotFingerprintArtifacts>
</hudson.plugins.copyartifact.CopyArtifact>
<hudson.tasks.Shell>
<command>SRC=$WORKSPACE/src

# Setup configuration for robot job
ZIP_SRC=$(ls openmicroscopy*zip)
unzip $ZIP_SRC
rm -f $ZIP_SRC
mv $WORKSPACE/${ZIP_SRC%.zip} $SRC

ZIP_DIST=$(ls OMERO.server*.zip)
unzip $ZIP_DIST
rm -f $ZIP_DIST
mv $WORKSPACE/${ZIP_DIST%.zip} $SRC/dist

source $HOME/omero-virtualenv/bin/activate

pip install --upgrade --no-deps --force-reinstall -r $SRC/dist/share/web/requirements-py27-nginx.txt

$SRC/dist/bin/omero config set omero.web.prefix &quot;/web&quot;

cd $SRC/dist
bash ../components/tests/ui/robot_setup.sh
mv $SRC/dist/robot_ice.config $SRC/components/tests/ui/resources/
export ICE_CONFIG=$SRC/components/tests/ui/resources/robot_ice.config
$SRC/dist/bin/omero --path $SRC/components/tests/ui/plugins robot config --protocol http --webhost &apos;SPACENAME-nginx.docker.openmicroscopy.org&apos; --remoteurl &apos;http://seleniumhub:4444/wd/hub&apos; --dc &apos;browserName:${BROWSER},javascriptEnabled:True&apos; &gt; $SRC/components/tests/ui/resources/config.txt

echo Running the UI tests

$SRC/build.py -f components/tests/ui/build.xml -Dtest.with.fail=false ui-test-web

#aggregate the various output files.
$SRC/build.py -f components/tests/ui/build.xml aggregate-results
</command>
</hudson.tasks.Shell>
</builders>
<publishers>
<hudson.plugins.robot.RobotPublisher plugin="[email protected]">
<outputPath>$WORKSPACE/src/components/tests/ui/target/reports</outputPath>
<reportFileName>report.html</reportFileName>
<logFileName>log.html</logFileName>
<outputFileName>output.xml</outputFileName>
<disableArchiveOutput>false</disableArchiveOutput>
<passThreshold>100.0</passThreshold>
<unstableThreshold>80.0</unstableThreshold>
<otherFiles>
<string></string>
</otherFiles>
<enableCache>true</enableCache>
<onlyCritical>true</onlyCritical>
</hudson.plugins.robot.RobotPublisher>
</publishers>
<buildWrappers/>
</project>
Loading