From b1304f2d353bc0de780f4d635fc9cbd48328bfcb Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Sun, 16 Oct 2011 12:18:50 -0700 Subject: [PATCH 1/7] if RECLONE is set, reclone the directories --- stack.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stack.sh b/stack.sh index a7eacbf..7334232 100755 --- a/stack.sh +++ b/stack.sh @@ -297,6 +297,12 @@ function git_clone { cd $2 # This checkout syntax works for both branches and tags git checkout $3 + elif [[ "$RECLONE" == "yes" ]]; then + cd $2 + git remote set-url origin $1 + git fetch origin + git branch -D $3 + git checkout $3 fi } From aa8bb244be4cda5a83d0e5faee9767e3f0171ff9 Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Sun, 16 Oct 2011 12:24:11 -0700 Subject: [PATCH 2/7] rearrange order of setup.py develop as novaclient is needed by nova in essex --- stack.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stack.sh b/stack.sh index 7334232..65b991f 100755 --- a/stack.sh +++ b/stack.sh @@ -328,10 +328,10 @@ git_clone $OPENSTACKX_REPO $OPENSTACKX_DIR $OPENSTACKX_BRANCH # setup our checkouts so they are installed into python path # allowing ``import nova`` or ``import glance.client`` -cd $NOVA_DIR; sudo python setup.py develop -cd $NOVACLIENT_DIR; sudo python setup.py develop cd $KEYSTONE_DIR; sudo python setup.py develop cd $GLANCE_DIR; sudo python setup.py develop +cd $NOVACLIENT_DIR; sudo python setup.py develop +cd $NOVA_DIR; sudo python setup.py develop cd $OPENSTACKX_DIR; sudo python setup.py develop cd $DASH_DIR/django-openstack; sudo python setup.py develop cd $DASH_DIR/openstack-dashboard; sudo python setup.py develop From 64c2ba225a936af765be4229243666c26ccd42b9 Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Sun, 16 Oct 2011 19:08:04 -0700 Subject: [PATCH 3/7] fixes anthony's comment about not working if you aren't switching branches --- stack.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stack.sh b/stack.sh index 65b991f..e96ffbc 100755 --- a/stack.sh +++ b/stack.sh @@ -301,8 +301,9 @@ function git_clone { cd $2 git remote set-url origin $1 git fetch origin + git checkout origin/$3 git branch -D $3 - git checkout $3 + git checkout -b $3 fi } From 04db155a70a3e2baf91d1610bb05f921f8d37f09 Mon Sep 17 00:00:00 2001 From: Anthony Young Date: Mon, 17 Oct 2011 09:40:45 -0700 Subject: [PATCH 4/7] make sure to kill tail on exit --- tools/build_lxc.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/build_lxc.sh b/tools/build_lxc.sh index 42bd328..39046f0 100755 --- a/tools/build_lxc.sh +++ b/tools/build_lxc.sh @@ -282,6 +282,7 @@ if [ "$WAIT_TILL_LAUNCH" = "1" ]; then TAIL_PID=$! function kill_tail() { + kill $TAIL_PID exit 1 } From 6b9d6dad6ad460b2b5fede659363cfca51e33c8d Mon Sep 17 00:00:00 2001 From: Anthony Young Date: Mon, 17 Oct 2011 10:12:22 -0700 Subject: [PATCH 5/7] force dep updates every run for now --- tools/build_lxc.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/build_lxc.sh b/tools/build_lxc.sh index 39046f0..0f17378 100755 --- a/tools/build_lxc.sh +++ b/tools/build_lxc.sh @@ -119,12 +119,14 @@ if [ ! -f $CACHEDIR/bootstrapped ]; then lxc-destroy -n $CONTAINER # trigger the initial debootstrap create_lxc - chroot $CACHEDIR apt-get update - chroot $CACHEDIR apt-get install -y --force-yes `cat files/apts/* | cut -d\# -f1 | egrep -v "(rabbitmq|libvirt-bin|mysql-server)"` - chroot $CACHEDIR pip install `cat files/pips/*` touch $CACHEDIR/bootstrapped fi +# Make sure that base requirements are installed +chroot $CACHEDIR apt-get update +chroot $CACHEDIR apt-get install -y --force-yes `cat files/apts/* | cut -d\# -f1 | egrep -v "(rabbitmq|libvirt-bin|mysql-server)"` +chroot $CACHEDIR pip install `cat files/pips/*` + # Clean out code repos if directed to do so if [ "$CLEAN" = "1" ]; then rm -rf $CACHEDIR/$DEST From ae8bc12d1ad5f4325a63e0efdbe902d6ab31b901 Mon Sep 17 00:00:00 2001 From: Anthony Young Date: Mon, 17 Oct 2011 10:38:05 -0700 Subject: [PATCH 6/7] automatically use the nameserver of the launching host if not specified --- tools/build_lxc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build_lxc.sh b/tools/build_lxc.sh index 0f17378..580581b 100755 --- a/tools/build_lxc.sh +++ b/tools/build_lxc.sh @@ -32,7 +32,7 @@ CONTAINER_IP=${CONTAINER_IP:-192.168.1.50} CONTAINER_CIDR=${CONTAINER_CIDR:-$CONTAINER_IP/24} CONTAINER_NETMASK=${CONTAINER_NETMASK:-255.255.255.0} CONTAINER_GATEWAY=${CONTAINER_GATEWAY:-192.168.1.1} -NAMESERVER=${NAMESERVER:-$CONTAINER_GATEWAY} +NAMESERVER=${NAMESERVER:-`cat /etc/resolv.conf | grep nameserver | head -1 | cut -d " " -f2`} COPYENV=${COPYENV:-1} DEST=${DEST:-/opt/stack} WAIT_TILL_LAUNCH=${WAIT_TILL_LAUNCH:-1} From 59a285cd863ef2a7e2eed22eafbfd0a1fac6f1a9 Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Mon, 17 Oct 2011 10:39:28 -0700 Subject: [PATCH 7/7] change variable to RESET_BRANCHES --- stack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack.sh b/stack.sh index e96ffbc..a953c9e 100755 --- a/stack.sh +++ b/stack.sh @@ -297,7 +297,7 @@ function git_clone { cd $2 # This checkout syntax works for both branches and tags git checkout $3 - elif [[ "$RECLONE" == "yes" ]]; then + elif [[ "$RESET_BRANCHES" == "yes" ]]; then cd $2 git remote set-url origin $1 git fetch origin