From aaa38eaf5b9d36d59b4e6eb72fdd11764d19cee9 Mon Sep 17 00:00:00 2001 From: Daniel Gonzalez Date: Sat, 20 Feb 2016 15:48:31 +0100 Subject: Fix vagrant bootstrapping for ubuntu The ubuntu-bootstrap.sh script used by vagrant to provision ubuntu boxes was lacking many of the features of centos-bootstrap.sh. For instance, ubuntu-bootstrap.sh did not install kolla, so the kolla-build executable was not available after initial provisioning. This patch adapts the bootstrap script to match the centos bootstrap script as closely as possible. Change-Id: I6cdacb993a9b6856912ea7cfb73a28f3867f472a Closes-Bug: #1547114 --- dev/vagrant/centos-bootstrap.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'dev/vagrant/centos-bootstrap.sh') diff --git a/dev/vagrant/centos-bootstrap.sh b/dev/vagrant/centos-bootstrap.sh index 2555eb479..d73c130d7 100644 --- a/dev/vagrant/centos-bootstrap.sh +++ b/dev/vagrant/centos-bootstrap.sh @@ -40,7 +40,7 @@ function prep_work { # Install and configure a quick&dirty docker daemon. function install_docker { # Allow for an externally supplied docker binary. - if [ -f "/data/docker" ]; then + if [[ -f "/data/docker" ]]; then cp /vagrant/docker /usr/bin/docker chmod +x /usr/bin/docker else @@ -90,7 +90,7 @@ function configure_operator { pip install ~vagrant/kolla # Note: this trickery requires a patched docker binary. - if [ "$http_proxy" = "" ]; then + if [[ "$http_proxy" = "" ]]; then su - vagrant sh -c "echo BUILDFLAGS=\\\"--build-env=http_proxy=$http_proxy --build-env=https_proxy=$https_proxy\\\" > ~/kolla/.buildconf" fi @@ -136,7 +136,6 @@ EOF # Launch a local registry (and mirror) to speed up pulling images. - # 0.9.1 is actually the _latest_ tag. if [[ ! $(docker ps -a -q -f name=registry) ]]; then docker run -d \ --name registry \ @@ -154,6 +153,6 @@ EOF prep_work install_docker -if [ "$VM" = "operator" ]; then +if [[ "$VM" = "operator" ]]; then configure_operator fi -- cgit v1.2.3