From 542af0539100cb8cd84884dc4ef8b3cdac51af1b Mon Sep 17 00:00:00 2001 From: Isabel Jimenez Date: Wed, 16 Dec 2015 14:19:19 -0500 Subject: [PATCH 1/2] updrading tests to use mesos 0.25 Signed-off-by: Isabel Jimenez --- test/integration/mesos/Dockerfile-0.25 | 10 ++++++++++ test/integration/mesos/mesos_helpers.bash | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 test/integration/mesos/Dockerfile-0.25 diff --git a/test/integration/mesos/Dockerfile-0.25 b/test/integration/mesos/Dockerfile-0.25 new file mode 100644 index 0000000000..e6a34684b3 --- /dev/null +++ b/test/integration/mesos/Dockerfile-0.25 @@ -0,0 +1,10 @@ +FROM debian:8 + +MAINTAINER Victor Vieux + +RUN apt-get update && apt-get install wget python -y +RUN wget http://downloads.mesosphere.io/master/debian/8/mesos_0.25.0-0.2.70.debian81_amd64.deb -O /tmp/mesos.deb +RUN dpkg -i /tmp/mesos.deb || true +RUN apt-get install -f -y + +USER daemon \ No newline at end of file diff --git a/test/integration/mesos/mesos_helpers.bash b/test/integration/mesos/mesos_helpers.bash index d310630b93..ae0dcea247 100644 --- a/test/integration/mesos/mesos_helpers.bash +++ b/test/integration/mesos/mesos_helpers.bash @@ -5,7 +5,7 @@ load ../../helpers export SWARM_MESOS_TASK_TIMEOUT=30s export SWARM_MESOS_USER=daemon -MESOS_IMAGE=dockerswarm/mesos:0.24.1 +MESOS_IMAGE=dockerswarm/mesos:0.25 MESOS_MASTER_PORT=$(( ( RANDOM % 1000 ) + 10000 )) # Start mesos master and slave. From 2ec3c16efeaf472c1c9d5dc6210b1a18ca3ff35b Mon Sep 17 00:00:00 2001 From: Isabel Jimenez Date: Wed, 16 Dec 2015 14:24:53 -0500 Subject: [PATCH 2/2] adapting tests to mesos0.25 upgrade Signed-off-by: Isabel Jimenez --- test/integration/helpers.bash | 5 +++-- test/integration/mesos/Dockerfile-0.25 | 3 ++- test/integration/mesos/mesos_helpers.bash | 12 ++++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/test/integration/helpers.bash b/test/integration/helpers.bash index cfb5238bad..7a0bb781d0 100644 --- a/test/integration/helpers.bash +++ b/test/integration/helpers.bash @@ -193,12 +193,13 @@ function start_docker() { # We have to manually call `hostname` since --hostname and --net cannot # be used together. DOCKER_CONTAINERS[$i]=$( - # -v /usr/local/bin -v /var/run/docker.sock are specific to mesos, so the slave can do a --volumes-from and use the docker cli - docker_host run -d --name node-$i --privileged -v /usr/local/bin -v /var/run/docker.sock -it --net=host \ + # -v /usr/local/bin -v /var/run are specific to mesos, so the slave can do a --volumes-from and use the docker cli + docker_host run -d --name node-$i --privileged -v /usr/local/bin -v /var/run -it --net=host \ ${DOCKER_IMAGE}:${DOCKER_VERSION} \ bash -c "\ hostname node-$i && \ docker daemon -H 127.0.0.1:$port \ + -H=unix:///var/run/docker.sock \ --storage-driver=$STORAGE_DRIVER \ `join ' ' $@` \ ") diff --git a/test/integration/mesos/Dockerfile-0.25 b/test/integration/mesos/Dockerfile-0.25 index e6a34684b3..ea4bd461c3 100644 --- a/test/integration/mesos/Dockerfile-0.25 +++ b/test/integration/mesos/Dockerfile-0.25 @@ -7,4 +7,5 @@ RUN wget http://downloads.mesosphere.io/master/debian/8/mesos_0.25.0-0.2.70.debi RUN dpkg -i /tmp/mesos.deb || true RUN apt-get install -f -y -USER daemon \ No newline at end of file +USER daemon + diff --git a/test/integration/mesos/mesos_helpers.bash b/test/integration/mesos/mesos_helpers.bash index ae0dcea247..c0bd2a35c9 100644 --- a/test/integration/mesos/mesos_helpers.bash +++ b/test/integration/mesos/mesos_helpers.bash @@ -3,9 +3,9 @@ load ../../helpers export SWARM_MESOS_TASK_TIMEOUT=30s -export SWARM_MESOS_USER=daemon +export SWARM_MESOS_USER=root -MESOS_IMAGE=dockerswarm/mesos:0.25 +MESOS_IMAGE=dockerswarm/mesos:0.25.0 MESOS_MASTER_PORT=$(( ( RANDOM % 1000 ) + 10000 )) # Start mesos master and slave. @@ -20,8 +20,8 @@ function start_mesos() { for ((i=0; i < current; i++)); do local docker_port=$(echo ${HOSTS[$i]} | cut -d: -f2) MESOS_SLAVES[$i]=$( - docker_host run --privileged -d --name mesos-slave-$i --volumes-from node-$i -e DOCKER_HOST="${HOSTS[$i]}" -v /sys/fs/cgroup:/sys/fs/cgroup --net=host \ - $MESOS_IMAGE mesos-slave --master=127.0.0.1:$MESOS_MASTER_PORT --containerizers=docker --attributes="docker_port:$docker_port" --hostname=127.0.0.1 --port=$(($MESOS_MASTER_PORT + (1 + $i))) --docker=/usr/local/bin/docker --executor_environment_variables="{\"DOCKER_HOST\":\"${HOSTS[$i]}\"}" + docker_host run --privileged -d --name mesos-slave-$i --volumes-from node-$i -v /sys/fs/cgroup:/sys/fs/cgroup --net=host -u root \ + $MESOS_IMAGE mesos-slave --master=127.0.0.1:$MESOS_MASTER_PORT --containerizers=docker --attributes="docker_port:$docker_port" --hostname=127.0.0.1 --port=$(($MESOS_MASTER_PORT + (1 + $i))) --docker=/usr/local/bin/docker ) retry 10 1 eval "docker_host ps | grep 'mesos-slave-$i'" done @@ -38,8 +38,8 @@ function start_mesos_zk() { for ((i=0; i < current; i++)); do local docker_port=$(echo ${HOSTS[$i]} | cut -d: -f2) MESOS_SLAVES[$i]=$( - docker_host run --privileged -d --name mesos-slave-$i --volumes-from node-$i -e DOCKER_HOST="${HOSTS[$i]}" -v /sys/fs/cgroup:/sys/fs/cgroup --net=host \ - $MESOS_IMAGE mesos-slave --master=127.0.0.1:$MESOS_MASTER_PORT --containerizers=docker --attributes="docker_port:$docker_port" --hostname=127.0.0.1 --port=$(($MESOS_MASTER_PORT + (1 + $i))) --docker=/usr/local/bin/docker --executor_environment_variables="{\"DOCKER_HOST\":\"${HOSTS[$i]}\"}" + docker_host run --privileged -d --name mesos-slave-$i --volumes-from node-$i -v /sys/fs/cgroup:/sys/fs/cgroup --net=host -u root \ + $MESOS_IMAGE mesos-slave --master=127.0.0.1:$MESOS_MASTER_PORT --containerizers=docker --attributes="docker_port:$docker_port" --hostname=127.0.0.1 --port=$(($MESOS_MASTER_PORT + (1 + $i))) --docker=/usr/local/bin/docker ) retry 10 1 eval "docker_host ps | grep 'mesos-slave-$i'" done