a few more speed tweaks - try to pre-download tty.gz and don't git pull

This commit is contained in:
Jesse Andrews 2011-09-11 16:46:44 -07:00
parent 5f0982007f
commit 3107deb2c5
2 changed files with 13 additions and 8 deletions

View file

@ -22,6 +22,7 @@ if [ ! -d proto ]; then
git clone https://github.com/cloudbuilders/python-novaclient.git proto/opt/python-novaclient git clone https://github.com/cloudbuilders/python-novaclient.git proto/opt/python-novaclient
git clone https://github.com/cloudbuilders/keystone.git proto/opt/keystone git clone https://github.com/cloudbuilders/keystone.git proto/opt/keystone
git clone https://github.com/cloudbuilders/glance.git proto/opt/glance git clone https://github.com/cloudbuilders/glance.git proto/opt/glance
wget -c http://images.ansolabs.com/tty.tgz -O proto/opt/tty.tgz
fi fi
cp -pr proto $DEST cp -pr proto $DEST

View file

@ -43,9 +43,10 @@ SQL_CONN=sqlite:///$NOVA_DIR/nova.sqlite
# exists, fetch and checkout remote master # exists, fetch and checkout remote master
function clone_or_up { function clone_or_up {
if [ -d $2 ]; then if [ -d $2 ]; then
cd $2 echo commenting out update for now for speed
git fetch origin # cd $2
git checkout origin/master # git fetch origin
# git checkout origin/master
else else
git clone $1 $2 git clone $1 $2
fi fi
@ -127,9 +128,12 @@ EOF
mkdir -p /var/log/glance mkdir -p /var/log/glance
if [ ! -f $DEST/tty.tgz ]; then
wget -c http://images.ansolabs.com/tty.tgz -O $DEST/tty.tgz
fi
mkdir -p $DEST/images mkdir -p $DEST/images
wget -c http://images.ansolabs.com/tty.tgz tar -C $DEST/images -zxf $DEST/tty.tgz
tar -C $DEST/images -zxf tty.tgz
exit exit
fi fi
@ -172,6 +176,7 @@ if [ "$CMD" == "run" ] || [ "$CMD" == "run_detached" ]; then
screen -d -m -S nova -t nova screen -d -m -S nova -t nova
sleep 1 sleep 1
rm -f $NOVA_DIR/nova.sqlite rm -f $NOVA_DIR/nova.sqlite
# TODO(ja): mount local partition nova-instances (can we use labels?)
rm -rf $NOVA_DIR/instances rm -rf $NOVA_DIR/instances
mkdir -p $NOVA_DIR/instances mkdir -p $NOVA_DIR/instances
rm -rf $NOVA_DIR/networks rm -rf $NOVA_DIR/networks
@ -190,12 +195,11 @@ if [ "$CMD" == "run" ] || [ "$CMD" == "run_detached" ]; then
# create some floating ips # create some floating ips
$NOVA_DIR/bin/nova-manage floating create $FLOATING_RANGE $NOVA_DIR/bin/nova-manage floating create $FLOATING_RANGE
# nova api crashes if we start it with a regular screen command,
# so send the start command by forcing text into the window.
rm -rf /var/lib/glance/images/* rm -rf /var/lib/glance/images/*
rm -f $GLANCE_DIR/glance.sqlite rm -f $GLANCE_DIR/glance.sqlite
# nova api crashes if we start it with a regular screen command,
# so send the start command by forcing text into the window.
screen_it n-api "$NOVA_DIR/bin/nova-api" screen_it n-api "$NOVA_DIR/bin/nova-api"
screen_it g-api "cd $GLANCE_DIR; bin/glance-api --config-file=etc/glance-api.conf" screen_it g-api "cd $GLANCE_DIR; bin/glance-api --config-file=etc/glance-api.conf"
screen_it g-reg "cd $GLANCE_DIR; bin/glance-registry --config-file=etc/glance-registry.conf" screen_it g-reg "cd $GLANCE_DIR; bin/glance-registry --config-file=etc/glance-registry.conf"