X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2FVCA%2Fupdate-lxd-image.sh;h=81b210c83993c88c600682d2096511527164484e;hb=3f761ada8cd0a90a0e0b9dfd20342a63ed7f48b8;hp=07ba90b02b790d6764564b84a2205b3a00bcb808;hpb=ae197f2614349f5f76ed4ef43effcfc6a8115d04;p=osm%2Fdevops.git diff --git a/jenkins/VCA/update-lxd-image.sh b/jenkins/VCA/update-lxd-image.sh index 07ba90b0..81b210c8 100755 --- a/jenkins/VCA/update-lxd-image.sh +++ b/jenkins/VCA/update-lxd-image.sh @@ -10,7 +10,7 @@ set -eux # The basic charm layer also installs all the things. 47 packages. -LAYER_BASIC="gcc build-essential python3-pip python3-setuptools python3-yaml" +LAYER_BASIC="gcc build-essential python3-pip python3-setuptools libyaml-dev python3-yaml python3-dev" # the basic layer also installs virtualenv, but the name changed in xenial. TRUSTY_PACKAGES="python-virtualenv" @@ -35,9 +35,13 @@ function cache() { # Wait for the container to get an IP address lxc exec $container -- bash -c "for i in {1..60}; do sleep 1; ping -c1 10.44.127.1 &> /dev/null && break; done" + # Wait for cloud-init to finish + lxc exec $container -- bash -c "while [ ! -f /var/lib/cloud/instance/boot-finished ]; do sleep 1; done" + lxc exec $container -- apt-get update -y - lxc exec $container -- apt-get upgrade -y + lxc exec $container -- apt-get upgrade -y -o Dpkg::Options::='--force-confold' lxc exec $container -- apt-get install -y $PACKAGES $2 + lxc exec $container -- pip3 install --upgrade pip lxc exec $container -- pip3 install --upgrade $PYPI lxc stop $container