aboutsummaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorDiogo Monteiro <diogo.gmt@gmail.com>2015-11-30 19:23:16 -0500
committerDiogo Monteiro <diogo.gmt@gmail.com>2015-12-07 10:18:40 -0500
commitc7297e04c15eb3dd7fbf0825c51932452c8c1275 (patch)
tree07497bff2f3f369d73fe8f31ff18175ccf8d1275 /dev
parent917b4df01ea342b4bb43d12399322caab53d482a (diff)
downloadkolla-c7297e04c15eb3dd7fbf0825c51932452c8c1275.tar.gz
kolla-c7297e04c15eb3dd7fbf0825c51932452c8c1275.zip
Update Vagrant's Ubuntu box provisioning script
Starting from Vivid Ubuntu uses systemd as the default boot manager instead of upstart. Updating the way the docker daemon is configured to follow the systemd way. Setting env variable GUNICORN_OPTS=[--preload] to fix race condition and avoid IntegrityError when pushing images to local registry Change-Id: I841f85015c2c3683ef7e1e454ec1369263063c45 Related-bug: https://github.com/docker/docker-registry/issues/518 Closes-Bug: #1523336
Diffstat (limited to 'dev')
-rw-r--r--dev/vagrant/ubuntu-bootstrap.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/dev/vagrant/ubuntu-bootstrap.sh b/dev/vagrant/ubuntu-bootstrap.sh
index 04b9591d0..2f2565030 100644
--- a/dev/vagrant/ubuntu-bootstrap.sh
+++ b/dev/vagrant/ubuntu-bootstrap.sh
@@ -25,10 +25,13 @@ EOF
install_docker() {
echo "Installing Docker"
apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
- echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list
+ echo "deb https://apt.dockerproject.org/repo ubuntu-vivid main" > /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y docker-engine=1.8.2*
- sed -i -r "s,^[# ]*DOCKER_OPTS=.+$,DOCKER_OPTS=\"--insecure-registry ${REGISTRY}:${REGISTRY_PORT}\"," /etc/default/docker
+ sed -i -r "s,(ExecStart)=(.+),\1=/usr/bin/docker daemon -H fd:// -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --insecure-registry ${REGISTRY}:${REGISTRY_PORT}," /lib/systemd/system/docker.service
+ systemctl daemon-reload
+ systemctl enable docker
+ systemctl restart docker
}
install_python_deps() {
@@ -55,8 +58,10 @@ create_registry() {
-e MIRROR_SOURCE=https://registry-1.docker.io \
-e MIRROR_SOURCE_INDEX=https://index.docker.io \
-e STORAGE_PATH=/var/lib/registry \
+ -e GUNICORN_OPTS=[--preload] \
+ -e SEARCH_BACKEND=sqlalchemy \
-v /data/host/registry-storage:/var/lib/registry \
- registry
+ registry:0.9.1
}
configure_kolla() {