diff --git a/Dockerfile b/Dockerfile index ca768e95..2225c4e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM ceph/rbd -ADD bin/apiserver /bin/apiserver -ADD bin/volplugin /bin/volplugin -ADD bin/volcli /bin/volcli -ADD bin/volsupervisor /bin/volsupervisor +COPY bin/apiserver /bin/apiserver +COPY bin/volplugin /bin/volplugin +COPY bin/volcli /bin/volcli +COPY bin/volsupervisor /bin/volsupervisor ENTRYPOINT [] diff --git a/Dockerfile.autorun b/Dockerfile.autorun index 50aaac57..82955c8d 100644 --- a/Dockerfile.autorun +++ b/Dockerfile.autorun @@ -1,7 +1,8 @@ FROM docker:1.11.2 -ADD systemtests/testdata/ceph/policy1.json /policy.json -ADD systemtests/testdata/globals/global1.json /global.json -ADD build/scripts/autorun-bootstrap.sh /bootstrap.sh +COPY systemtests/testdata/ceph/policy1.json /policy.json +COPY systemtests/testdata/globals/global1.json /global.json +COPY build/scripts/autorun-bootstrap.sh /bootstrap.sh +COPY build/scripts/build-volplugin-containers.sh /build.sh RUN chmod +x /bootstrap.sh ENTRYPOINT [ "/bin/sh", "/bootstrap.sh" ] diff --git a/build/release-materials/build-release.sh b/build/release-materials/build-release.sh index acd79f09..cf85bfc5 100644 --- a/build/release-materials/build-release.sh +++ b/build/release-materials/build-release.sh @@ -20,7 +20,10 @@ cd /tmp tar cvjf ${OLDPWD}/$(basename $dir).tar.bz2 volplugin-${1} cd $OLDPWD +docker build -t contiv/volplugin:$1 . +docker build -t contiv/volplugin-autorun:$1 -f Dockerfile.autorun . + git tag $1 -echo "Tag $1 has been created but not pushed; push it if you're sure you're ready to release!" +echo "Tag $1 has been created but not pushed; run release.sh if you're sure you're ready to release!" echo "Your tarball is in $PWD/$(basename $dir).tar.bz2!" diff --git a/build/release-materials/release.sh b/build/release-materials/release.sh index af4024cb..b133a8eb 100644 --- a/build/release-materials/release.sh +++ b/build/release-materials/release.sh @@ -33,3 +33,6 @@ git push git@github.com:contiv/volplugin $1 set -x github-release release -u contiv -r volplugin --tag $1 --name "Contiv Storage release $1" --description "$(cat $2)" github-release upload -u contiv -r volplugin --tag $1 --name "64-bit Linux release $1" --file $3 + +docker push contiv/volplugin:$1 +docker push contiv/volplugin-autorun:$1 diff --git a/build/scripts/autorun-bootstrap.sh b/build/scripts/autorun-bootstrap.sh index d26c4795..862d85ad 100644 --- a/build/scripts/autorun-bootstrap.sh +++ b/build/scripts/autorun-bootstrap.sh @@ -2,7 +2,7 @@ set -e -docker rm -f apiserver volplugin volsupervisor &>/dev/null || : +docker rm -f volplugin-etcd apiserver volplugin volsupervisor &>/dev/null || : ## test for shared mount capability if ! docker run -it -v /mnt:/mnt:shared alpine true &>/dev/null @@ -16,47 +16,38 @@ fi set -x -docker run --net host --name apiserver \ - --privileged -it -d \ - -v /dev:/dev \ - -v /etc/ceph:/etc/ceph \ - -v /var/lib/ceph:/var/lib/ceph \ - -v /lib/modules:/lib/modules:ro \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v /mnt:/mnt:shared \ - contiv/volplugin apiserver - -set +x +docker run --name volplugin-etcd -itd --net host quay.io/coreos/etcd -sleep 1 +sleep 2 -if [ ! -n "${NO_UPLOAD}" ] -then - set -x - docker exec -i apiserver volcli policy upload policy1 < /policy.json - docker exec -i apiserver volcli global upload < /global.json -fi +set -e -set -x +docker run --net host --name apiserver \ + --privileged -i -d \ + -v /dev:/dev \ + -v /etc/ceph:/etc/ceph \ + -v /var/lib/ceph:/var/lib/ceph \ + -v /lib/modules:/lib/modules:ro \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v /mnt:/mnt:shared \ + contiv/volplugin apiserver docker run --net host --name volsupervisor \ - -itd --privileged \ - -v /lib/modules:/lib/modules:ro \ - -v /etc/ceph:/etc/ceph \ - -v /var/lib/ceph:/var/lib/ceph \ - contiv/volplugin volsupervisor - -set +x -sleep 1 -set -x + -id --privileged \ + -v /lib/modules:/lib/modules:ro \ + -v /etc/ceph:/etc/ceph \ + -v /var/lib/ceph:/var/lib/ceph \ + contiv/volplugin volsupervisor docker run --net host --name volplugin \ - --privileged -it -d \ - -v /dev:/dev \ - -v /lib/modules:/lib/modules:ro \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v /run/docker/plugins:/run/docker/plugins \ - -v /mnt:/mnt:shared \ - -v /etc/ceph:/etc/ceph \ - -v /var/lib/ceph:/var/lib/ceph \ - contiv/volplugin volplugin + --privileged -i -d \ + -v /dev:/dev \ + -v /lib/modules:/lib/modules:ro \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v /run/docker/plugins:/run/docker/plugins \ + -v /mnt:/mnt:shared \ + -v /etc/ceph:/etc/ceph \ + -v /var/lib/ceph:/var/lib/ceph \ + -v /var/run/ceph:/var/run/ceph \ + -v /sys/fs/cgroup:/sys/fs/cgroup \ + contiv/volplugin volplugin