| ... | ... |
@@ -18,6 +18,9 @@ CWD=`pwd` |
| 18 | 18 |
|
| 19 | 19 |
DEST=${DEST:-/opt/stack}
|
| 20 | 20 |
|
| 21 |
+# Param string to pass to stack.sh. Like "EC2_DMZ_HOST=192.168.1.1 MYSQL_USER=nova" |
|
| 22 |
+STACKSH_PARAMS=${STACKSH_PARAMS:-}
|
|
| 23 |
+ |
|
| 21 | 24 |
# Option to use the version of devstack on which we are currently working |
| 22 | 25 |
USE_CURRENT_DEVSTACK=${USE_CURRENT_DEVSTACK:-1}
|
| 23 | 26 |
|
| ... | ... |
@@ -112,6 +115,29 @@ auto eth0 |
| 112 | 112 |
iface eth0 inet dhcp |
| 113 | 113 |
EOF |
| 114 | 114 |
|
| 115 |
+# Configure the runner |
|
| 116 |
+RUN_SH=$CHROOTCACHE/natty-stack/$DEST/run.sh |
|
| 117 |
+cat > $RUN_SH <<EOF |
|
| 118 |
+#!/usr/bin/env bash |
|
| 119 |
+ |
|
| 120 |
+# Pre-empt download of natty image |
|
| 121 |
+tar czf $DEST/devstack/files/natty.tgz /etc/hosts |
|
| 122 |
+touch $DEST/devstack/files/images/natty-server-cloudimg-amd64-vmlinuz-virtual |
|
| 123 |
+touch $DEST/devstack/files/images/natty-server-cloudimg-amd64.img |
|
| 124 |
+ |
|
| 125 |
+# Kill any existing screens |
|
| 126 |
+killall screen |
|
| 127 |
+ |
|
| 128 |
+# Run stack.sh |
|
| 129 |
+cd $DEST/devstack && \$STACKSH_PARAMS ./stack.sh > $DEST/run.sh.log |
|
| 130 |
+echo >> $DEST/run.sh.log |
|
| 131 |
+echo >> $DEST/run.sh.log |
|
| 132 |
+echo "All done! Time to start clicking." >> $DEST/run.sh.log |
|
| 133 |
+EOF |
|
| 134 |
+ |
|
| 135 |
+# Make the run.sh executable |
|
| 136 |
+chmod 755 $RUN_SH |
|
| 137 |
+ |
|
| 115 | 138 |
# build a new image |
| 116 | 139 |
BASE=$CHROOTCACHE/build.$$ |
| 117 | 140 |
IMG=$BASE.img |