|
...
|
...
|
@@ -123,6 +123,33 @@ set `echo $GLANCE_HOSTPORT | tr ':' ' '`
|
|
123
|
123
|
GLANCE_HOST=$1
|
|
124
|
124
|
GLANCE_PORT=$2
|
|
125
|
125
|
|
|
|
126
|
+# Set up downloaded images
|
|
|
127
|
+# Defaults to use first image
|
|
|
128
|
+
|
|
|
129
|
+IMAGE_DIR=""
|
|
|
130
|
+for imagedir in $TOP_DIR/files/images/*; do
|
|
|
131
|
+ KERNEL=""
|
|
|
132
|
+ RAMDISK=""
|
|
|
133
|
+ IMAGE=""
|
|
|
134
|
+ IMAGE_RAMDISK=""
|
|
|
135
|
+ KERNEL=$(for f in "$imagedir/"*-vmlinuz*; do
|
|
|
136
|
+ [ -f "$f" ] && echo "$f" && break; done; true)
|
|
|
137
|
+ [ -n "$KERNEL" ] && ln -sf $KERNEL $imagedir/kernel
|
|
|
138
|
+ RAMDISK=$(for f in "$imagedir/"*-initrd*; do
|
|
|
139
|
+ [ -f "$f" ] && echo "$f" && break; done; true)
|
|
|
140
|
+ [ -n "$RAMDISK" ] && ln -sf $RAMDISK $imagedir/ramdisk && \
|
|
|
141
|
+ IMAGE_RAMDISK="ari_location = $imagedir/ramdisk"
|
|
|
142
|
+ IMAGE=$(for f in "$imagedir/"*.img; do
|
|
|
143
|
+ [ -f "$f" ] && echo "$f" && break; done; true)
|
|
|
144
|
+ if [ -n "$IMAGE" ]; then
|
|
|
145
|
+ ln -sf $IMAGE $imagedir/disk
|
|
|
146
|
+ # Save the first image directory that contains a disk image link
|
|
|
147
|
+ if [ -z "$IMAGE_DIR" ]; then
|
|
|
148
|
+ IMAGE_DIR=$imagedir
|
|
|
149
|
+ fi
|
|
|
150
|
+ fi
|
|
|
151
|
+done
|
|
|
152
|
+
|
|
126
|
153
|
# Create storm.conf
|
|
127
|
154
|
|
|
128
|
155
|
CONFIG_CONF_TMP=$(mktemp $CONFIG_CONF.XXXXXX)
|
|
...
|
...
|
@@ -154,9 +181,9 @@ CONFIG_INI_TMP=$(mktemp $CONFIG_INI.XXXXXX)
|
|
154
|
154
|
if [ "$UPLOAD_LEGACY_TTY" ]; then
|
|
155
|
155
|
cat >$CONFIG_INI_TMP <<EOF
|
|
156
|
156
|
[environment]
|
|
157
|
|
-aki_location = $DEST/devstack/files/images/aki-tty/image
|
|
158
|
|
-ari_location = $DEST/devstack/files/images/ari-tty/image
|
|
159
|
|
-ami_location = $DEST/devstack/files/images/ami-tty/image
|
|
|
157
|
+aki_location = $TOP_DIR/files/images/aki-tty/image
|
|
|
158
|
+ari_location = $TOP_DIR/files/images/ari-tty/image
|
|
|
159
|
+ami_location = $TOP_DIR/files/images/ami-tty/image
|
|
160
|
160
|
image_ref = 3
|
|
161
|
161
|
image_ref_alt = 3
|
|
162
|
162
|
flavor_ref = 1
|
|
...
|
...
|
@@ -173,9 +200,9 @@ EOF
|
|
173
|
173
|
else
|
|
174
|
174
|
cat >$CONFIG_INI_TMP <<EOF
|
|
175
|
175
|
[environment]
|
|
176
|
|
-aki_location = $DEST/openstack-integration-tests/include/sample_vm/$DIST_NAME-server-cloudimg-amd64-vmlinuz-virtual
|
|
177
|
|
-#ari_location = $DEST/openstack-integration-tests/include/sample_vm/$DIST_NAME-server-cloudimg-amd64-loader
|
|
178
|
|
-ami_location = $DEST/openstack-integration-tests/include/sample_vm/$DIST_NAME-server-cloudimg-amd64.img
|
|
|
176
|
+aki_location = $IMAGE_DIR/kernel
|
|
|
177
|
+ami_location = $IMAGE_DIR/disk
|
|
|
178
|
+$IMAGE_RAMDISK
|
|
179
|
179
|
image_ref = 2
|
|
180
|
180
|
image_ref_alt = 2
|
|
181
|
181
|
flavor_ref = 1
|
|
...
|
...
|
@@ -185,8 +212,8 @@ flavor_ref_alt = 2
|
|
185
|
185
|
host = $GLANCE_HOST
|
|
186
|
186
|
apiver = v1
|
|
187
|
187
|
port = $GLANCE_PORT
|
|
188
|
|
-image_id = 1
|
|
189
|
|
-image_id_alt = 1
|
|
|
188
|
+image_id = 2
|
|
|
189
|
+image_id_alt = 2
|
|
190
|
190
|
tenant_id = 1
|
|
191
|
191
|
EOF
|
|
192
|
192
|
fi
|