Browse code

download fedora x86_64 image if heat is enabled

clean up the logic around producing a valid cfn image for heat
testing. If heat is enabled, add the f20 x86_64 imageurl to the
list of images that we support, and set that as the tempest
orchestration image.

The crux of this change is left commented out for now because we
need a two phase update of nodepool content before we can move
away from the old image (otherwise fedora mirrors will kill us
with bad downloads).

Change-Id: I1da9f259a3267b1bd27e9899755204c8fff41153

Sean Dague authored on 2014/04/03 23:43:33
Showing 2 changed files
... ...
@@ -321,11 +321,8 @@ function configure_tempest {
321 321
     iniset $TEMPEST_CONFIG boto ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
322 322
 
323 323
     # Orchestration test image
324
-    if [[ ! -z "$HEAT_FETCHED_TEST_IMAGE" ]]; then
325
-        iniset $TEMPEST_CONFIG orchestration image_ref "$HEAT_FETCHED_TEST_IMAGE"
326
-    elif [[ "$HEAT_CREATE_TEST_IMAGE" = "True" ]]; then
327
-        disk_image_create /usr/share/tripleo-image-elements "vm fedora heat-cfntools" "i386" "fedora-vm-heat-cfntools-tempest"
328
-        iniset $TEMPEST_CONFIG orchestration image_ref "fedora-vm-heat-cfntools-tempest"
324
+    if [[ ! -z "$HEAT_CFN_IMAGE_URL" ]]; then
325
+        iniset $TEMPEST_CONFIG orchestration image_ref $(basename "$HEAT_CFN_IMAGE_URL" ".qcow2")
329 326
     fi
330 327
 
331 328
     # Scenario
... ...
@@ -341,11 +341,23 @@ case "$VIRT_DRIVER" in
341 341
         IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz"};;
342 342
 esac
343 343
 
344
+# if heat is enabled, bring in a linux image with cfn enabled
345
+# TODO(sdague) this next block can be removed after nodepool has the 64bit image in it's cache
344 346
 HEAT_FETCHED_TEST_IMAGE=${HEAT_FETCHED_TEST_IMAGE:-""}
345 347
 if [[ "$HEAT_FETCHED_TEST_IMAGE" == "Fedora-i386-20-20131211.1-sda" ]]; then
348
+    HEAT_CFN_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/releases/20/Images/i386/$HEAT_FETCHED_TEST_IMAGE.qcow2"
346 349
     IMAGE_URLS+=",https://dl.fedoraproject.org/pub/fedora/linux/releases/20/Images/i386/$HEAT_FETCHED_TEST_IMAGE.qcow2"
350
+elif [[ "$HEAT_FETCHED_TEST_IMAGE" == "Fedora-x86_64-20-20131211.1-sda" ]]; then
351
+    HEAT_CFN_IMAGE_URL="https://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2"
352
+    IMAGE_URLS+=",https://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2"
347 353
 fi
348 354
 
355
+# Uncomment after nodepool changes land
356
+#if [[ "$ENABLED_SERVICES" =~ 'h-api' ]]; then
357
+#    HEAT_CFN_IMAGE_URL=${HEAT_CFN_IMAGE_URL:-"https://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2"}
358
+#    IMAGE_URLS+=",$HEAT_CFN_IMAGE_URL"
359
+#fi
360
+
349 361
 # 10Gb default volume backing file size
350 362
 VOLUME_BACKING_FILE_SIZE=${VOLUME_BACKING_FILE_SIZE:-10250M}
351 363