Browse code

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

Jesse Andrews authored on 2011/09/12 08:46:44
Showing 2 changed files
... ...
@@ -22,6 +22,7 @@ if [ ! -d proto ]; then
22 22
     git clone https://github.com/cloudbuilders/python-novaclient.git proto/opt/python-novaclient
23 23
     git clone https://github.com/cloudbuilders/keystone.git proto/opt/keystone
24 24
     git clone https://github.com/cloudbuilders/glance.git proto/opt/glance
25
+    wget -c http://images.ansolabs.com/tty.tgz -O proto/opt/tty.tgz
25 26
 fi
26 27
 
27 28
 cp -pr proto $DEST
... ...
@@ -43,9 +43,10 @@ SQL_CONN=sqlite:///$NOVA_DIR/nova.sqlite
43 43
 # exists, fetch and checkout remote master
44 44
 function clone_or_up {
45 45
     if [ -d $2 ]; then
46
-        cd $2
47
-        git fetch origin
48
-        git checkout origin/master
46
+        echo commenting out update for now for speed
47
+        # cd $2
48
+        # git fetch origin
49
+        # git checkout origin/master
49 50
     else
50 51
         git clone $1 $2
51 52
     fi
... ...
@@ -127,9 +128,12 @@ EOF
127 127
 
128 128
     mkdir -p /var/log/glance
129 129
 
130
+    if [ ! -f $DEST/tty.tgz ]; then
131
+        wget -c http://images.ansolabs.com/tty.tgz -O $DEST/tty.tgz
132
+    fi
133
+
130 134
     mkdir -p $DEST/images
131
-    wget -c http://images.ansolabs.com/tty.tgz
132
-    tar -C $DEST/images -zxf tty.tgz
135
+    tar -C $DEST/images -zxf $DEST/tty.tgz
133 136
     exit
134 137
 fi
135 138
 
... ...
@@ -172,6 +176,7 @@ if [ "$CMD" == "run" ] || [ "$CMD" == "run_detached" ]; then
172 172
     screen -d -m -S nova -t nova
173 173
     sleep 1
174 174
     rm -f $NOVA_DIR/nova.sqlite
175
+    # TODO(ja): mount local partition nova-instances (can we use labels?)
175 176
     rm -rf $NOVA_DIR/instances
176 177
     mkdir -p $NOVA_DIR/instances
177 178
     rm -rf $NOVA_DIR/networks
... ...
@@ -190,12 +195,11 @@ if [ "$CMD" == "run" ] || [ "$CMD" == "run_detached" ]; then
190 190
     # create some floating ips
191 191
     $NOVA_DIR/bin/nova-manage floating create $FLOATING_RANGE
192 192
 
193
-    # nova api crashes if we start it with a regular screen command,
194
-    # so send the start command by forcing text into the window.
195
-
196 193
     rm -rf /var/lib/glance/images/*
197 194
     rm -f $GLANCE_DIR/glance.sqlite
198 195
 
196
+    # nova api crashes if we start it with a regular screen command,
197
+    # so send the start command by forcing text into the window.
199 198
     screen_it n-api "$NOVA_DIR/bin/nova-api"
200 199
     screen_it g-api "cd $GLANCE_DIR; bin/glance-api --config-file=etc/glance-api.conf"
201 200
     screen_it g-reg "cd $GLANCE_DIR; bin/glance-registry --config-file=etc/glance-registry.conf"