tweaks to comments and cache organization
This commit is contained in:
parent
2f14020756
commit
303233e2f5
2 changed files with 13 additions and 11 deletions
|
@ -70,7 +70,7 @@ function git_clone {
|
||||||
|
|
||||||
# Warm the base image on first install
|
# Warm the base image on first install
|
||||||
CACHEDIR=/var/cache/lxc/natty/rootfs-amd64
|
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
|
# by deleting the container, we force lxc-create to re-bootstrap (lxc is
|
||||||
# lazy and doesn't do anything if a container already exists)
|
# lazy and doesn't do anything if a container already exists)
|
||||||
lxc-destroy -n $CONTAINER
|
lxc-destroy -n $CONTAINER
|
||||||
|
@ -79,7 +79,9 @@ if [ ! -d $CACHEDIR/opt/nova ]; then
|
||||||
chroot $CACHEDIR apt-get update
|
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 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/*`
|
chroot $CACHEDIR pip install `cat files/pips/*`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Cache openstack code
|
||||||
git_clone $NOVA_REPO $CACHEDIR/opt/nova $NOVA_BRANCH
|
git_clone $NOVA_REPO $CACHEDIR/opt/nova $NOVA_BRANCH
|
||||||
git_clone $GLANCE_REPO $CACHEDIR/opt/glance $GLANCE_BRANCH
|
git_clone $GLANCE_REPO $CACHEDIR/opt/glance $GLANCE_BRANCH
|
||||||
git_clone $KEYSTONE_REPO $CACHEDIR/opt/keystone $KEYSTONE_BRANCH
|
git_clone $KEYSTONE_REPO $CACHEDIR/opt/keystone $KEYSTONE_BRANCH
|
||||||
|
@ -89,7 +91,6 @@ if [ ! -d $CACHEDIR/opt/nova ]; then
|
||||||
git_clone $NOVACLIENT_REPO $CACHEDIR/opt/python-novaclient $NOVACLIENT_BRANCH
|
git_clone $NOVACLIENT_REPO $CACHEDIR/opt/python-novaclient $NOVACLIENT_BRANCH
|
||||||
git_clone $OPENSTACKX_REPO $CACHEDIR/opt/openstackx $OPENSTACKX_BRANCH
|
git_clone $OPENSTACKX_REPO $CACHEDIR/opt/openstackx $OPENSTACKX_BRANCH
|
||||||
git_clone $MUNIN_REPO $CACHEDIR/opt/openstack-munin $MUNIN_BRANCH
|
git_clone $MUNIN_REPO $CACHEDIR/opt/openstack-munin $MUNIN_BRANCH
|
||||||
fi
|
|
||||||
|
|
||||||
# Destroy the old container
|
# Destroy the old container
|
||||||
lxc-destroy -n $CONTAINER
|
lxc-destroy -n $CONTAINER
|
||||||
|
|
1
stack.sh
1
stack.sh
|
@ -144,6 +144,7 @@ function git_clone {
|
||||||
sudo chown `whoami` $2
|
sudo chown `whoami` $2
|
||||||
git clone $1 $2
|
git clone $1 $2
|
||||||
cd $2
|
cd $2
|
||||||
|
# This checkout syntax works for both branches and tags
|
||||||
git checkout $3
|
git checkout $3
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue