From 3107deb2c5eaf1d0275fbf28729ef901d08d7543 Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Sun, 11 Sep 2011 16:46:44 -0700 Subject: [PATCH] a few more speed tweaks - try to pre-download tty.gz and don't git pull --- build.sh | 1 + stack.sh | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/build.sh b/build.sh index beb964c..b487287 100755 --- a/build.sh +++ b/build.sh @@ -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/keystone.git proto/opt/keystone 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 cp -pr proto $DEST diff --git a/stack.sh b/stack.sh index c3d7bbf..2d32f1e 100755 --- a/stack.sh +++ b/stack.sh @@ -43,9 +43,10 @@ SQL_CONN=sqlite:///$NOVA_DIR/nova.sqlite # exists, fetch and checkout remote master function clone_or_up { if [ -d $2 ]; then - cd $2 - git fetch origin - git checkout origin/master + echo commenting out update for now for speed + # cd $2 + # git fetch origin + # git checkout origin/master else git clone $1 $2 fi @@ -127,9 +128,12 @@ EOF 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 - wget -c http://images.ansolabs.com/tty.tgz - tar -C $DEST/images -zxf tty.tgz + tar -C $DEST/images -zxf $DEST/tty.tgz exit fi @@ -172,6 +176,7 @@ if [ "$CMD" == "run" ] || [ "$CMD" == "run_detached" ]; then screen -d -m -S nova -t nova sleep 1 rm -f $NOVA_DIR/nova.sqlite + # TODO(ja): mount local partition nova-instances (can we use labels?) rm -rf $NOVA_DIR/instances mkdir -p $NOVA_DIR/instances rm -rf $NOVA_DIR/networks @@ -190,12 +195,11 @@ if [ "$CMD" == "run" ] || [ "$CMD" == "run_detached" ]; then # create some floating ips $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 -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 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"