tweaks to comments and cache organization

This commit is contained in:
Anthony Young 2011-09-26 13:12:57 -07:00
parent 2f14020756
commit 303233e2f5
2 changed files with 13 additions and 11 deletions

View file

@ -70,7 +70,7 @@ function git_clone {
# Warm the base image on first install
CACHEDIR=/var/cache/lxc/natty/rootfs-amd64
if [ ! -d $CACHEDIR/opt/nova ]; then
if [ ! -d $CACHEDIR/ ]; then
# by deleting the container, we force lxc-create to re-bootstrap (lxc is
# lazy and doesn't do anything if a container already exists)
lxc-destroy -n $CONTAINER
@ -79,18 +79,19 @@ if [ ! -d $CACHEDIR/opt/nova ]; then
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/*`
git_clone $NOVA_REPO $CACHEDIR/opt/nova $NOVA_BRANCH
git_clone $GLANCE_REPO $CACHEDIR/opt/glance $GLANCE_BRANCH
git_clone $KEYSTONE_REPO $CACHEDIR/opt/keystone $KEYSTONE_BRANCH
git_clone $NOVNC_REPO $CACHEDIR/opt/novnc $NOVNC_BRANCH
git_clone $DASH_REPO $CACHEDIR/opt/dash $DASH_BRANCH $DASH_TAG
git_clone $NIXON_REPO $CACHEDIR/opt/nixon $NIXON_BRANCH
git_clone $NOVACLIENT_REPO $CACHEDIR/opt/python-novaclient $NOVACLIENT_BRANCH
git_clone $OPENSTACKX_REPO $CACHEDIR/opt/openstackx $OPENSTACKX_BRANCH
git_clone $MUNIN_REPO $CACHEDIR/opt/openstack-munin $MUNIN_BRANCH
fi
# Cache openstack code
git_clone $NOVA_REPO $CACHEDIR/opt/nova $NOVA_BRANCH
git_clone $GLANCE_REPO $CACHEDIR/opt/glance $GLANCE_BRANCH
git_clone $KEYSTONE_REPO $CACHEDIR/opt/keystone $KEYSTONE_BRANCH
git_clone $NOVNC_REPO $CACHEDIR/opt/novnc $NOVNC_BRANCH
git_clone $DASH_REPO $CACHEDIR/opt/dash $DASH_BRANCH $DASH_TAG
git_clone $NIXON_REPO $CACHEDIR/opt/nixon $NIXON_BRANCH
git_clone $NOVACLIENT_REPO $CACHEDIR/opt/python-novaclient $NOVACLIENT_BRANCH
git_clone $OPENSTACKX_REPO $CACHEDIR/opt/openstackx $OPENSTACKX_BRANCH
git_clone $MUNIN_REPO $CACHEDIR/opt/openstack-munin $MUNIN_BRANCH
# Destroy the old container
lxc-destroy -n $CONTAINER

View file

@ -144,6 +144,7 @@ function git_clone {
sudo chown `whoami` $2
git clone $1 $2
cd $2
# This checkout syntax works for both branches and tags
git checkout $3
fi
}