Browse code

Add architecture to tempest configuration

Cirros may be also built in other architectures other than
x86_64 (ex: ppc). This option should be broader,
so adding a new variable CIRROS_ARCH

Change-Id: I9fcd3f15e04bb581cf647ad49172c7d698e8e574

Adalberto Medeiros authored on 2014/07/11 04:55:49
Showing 2 changed files
... ...
@@ -307,9 +307,9 @@ function configure_tempest {
307 307
     iniset $TEMPEST_CONFIG boto ec2_url "http://$SERVICE_HOST:8773/services/Cloud"
308 308
     iniset $TEMPEST_CONFIG boto s3_url "http://$SERVICE_HOST:${S3_SERVICE_PORT:-3333}"
309 309
     iniset $TEMPEST_CONFIG boto s3_materials_path "$BOTO_MATERIALS_PATH"
310
-    iniset $TEMPEST_CONFIG boto ari_manifest cirros-${CIRROS_VERSION}-x86_64-initrd.manifest.xml
311
-    iniset $TEMPEST_CONFIG boto ami_manifest cirros-${CIRROS_VERSION}-x86_64-blank.img.manifest.xml
312
-    iniset $TEMPEST_CONFIG boto aki_manifest cirros-${CIRROS_VERSION}-x86_64-vmlinuz.manifest.xml
310
+    iniset $TEMPEST_CONFIG boto ari_manifest cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-initrd.manifest.xml
311
+    iniset $TEMPEST_CONFIG boto ami_manifest cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-blank.img.manifest.xml
312
+    iniset $TEMPEST_CONFIG boto aki_manifest cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-vmlinuz.manifest.xml
313 313
     iniset $TEMPEST_CONFIG boto instance_type "$boto_instance_type"
314 314
     iniset $TEMPEST_CONFIG boto http_socket_timeout 30
315 315
     iniset $TEMPEST_CONFIG boto ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
... ...
@@ -329,10 +329,10 @@ function configure_tempest {
329 329
     fi
330 330
 
331 331
     # Scenario
332
-    iniset $TEMPEST_CONFIG scenario img_dir "$FILES/images/cirros-${CIRROS_VERSION}-x86_64-uec"
333
-    iniset $TEMPEST_CONFIG scenario ami_img_file "cirros-${CIRROS_VERSION}-x86_64-blank.img"
334
-    iniset $TEMPEST_CONFIG scenario ari_img_file "cirros-${CIRROS_VERSION}-x86_64-initrd"
335
-    iniset $TEMPEST_CONFIG scenario aki_img_file "cirros-${CIRROS_VERSION}-x86_64-vmlinuz"
332
+    iniset $TEMPEST_CONFIG scenario img_dir "$FILES/images/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec"
333
+    iniset $TEMPEST_CONFIG scenario ami_img_file "cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-blank.img"
334
+    iniset $TEMPEST_CONFIG scenario ari_img_file "cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-initrd"
335
+    iniset $TEMPEST_CONFIG scenario aki_img_file "cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-vmlinuz"
336 336
 
337 337
     # Large Ops Number
338 338
     iniset $TEMPEST_CONFIG scenario large_ops_number ${TEMPEST_LARGE_OPS_NUMBER:-0}
... ...
@@ -411,8 +411,8 @@ function install_tempest {
411 411
 
412 412
 # init_tempest() - Initialize ec2 images
413 413
 function init_tempest {
414
-    local base_image_name=cirros-${CIRROS_VERSION}-x86_64
415
-    # /opt/stack/devstack/files/images/cirros-${CIRROS_VERSION}-x86_64-uec
414
+    local base_image_name=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}
415
+    # /opt/stack/devstack/files/images/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec
416 416
     local image_dir="$FILES/images/${base_image_name}-uec"
417 417
     local kernel="$image_dir/${base_image_name}-vmlinuz"
418 418
     local ramdisk="$image_dir/${base_image_name}-initrd"
... ...
@@ -424,9 +424,9 @@ function init_tempest {
424 424
         ( #new namespace
425 425
             # tenant:demo ; user: demo
426 426
             source $TOP_DIR/accrc/demo/demo
427
-            euca-bundle-image -r x86_64 -i "$kernel" --kernel true -d "$BOTO_MATERIALS_PATH"
428
-            euca-bundle-image -r x86_64 -i "$ramdisk" --ramdisk true -d "$BOTO_MATERIALS_PATH"
429
-            euca-bundle-image -r x86_64 -i "$disk_image" -d "$BOTO_MATERIALS_PATH"
427
+            euca-bundle-image -r ${CIRROS_ARCH} -i "$kernel" --kernel true -d "$BOTO_MATERIALS_PATH"
428
+            euca-bundle-image -r ${CIRROS_ARCH} -i "$ramdisk" --ramdisk true -d "$BOTO_MATERIALS_PATH"
429
+            euca-bundle-image -r ${CIRROS_ARCH} -i "$disk_image" -d "$BOTO_MATERIALS_PATH"
430 430
         ) 2>&1 </dev/null | cat
431 431
     else
432 432
         echo "Boto materials are not prepared"
... ...
@@ -332,14 +332,15 @@ esac
332 332
 #    glance as a disk image.  If it ends in .gz, it is uncompressed first.
333 333
 #    example:
334 334
 #      http://cloud-images.ubuntu.com/releases/precise/release/ubuntu-12.04-server-cloudimg-armel-disk1.img
335
-#      http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-rootfs.img.gz
335
+#      http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs.img.gz
336 336
 #  * OpenVZ image:
337 337
 #    OpenVZ uses its own format of image, and does not support UEC style images
338 338
 
339 339
 #IMAGE_URLS="http://smoser.brickies.net/ubuntu/ttylinux-uec/ttylinux-uec-amd64-11.2_2.6.35-15_1.tar.gz" # old ttylinux-uec image
340
-#IMAGE_URLS="http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-disk.img" # cirros full disk image
340
+#IMAGE_URLS="http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.img" # cirros full disk image
341 341
 
342 342
 CIRROS_VERSION=${CIRROS_VERSION:-"0.3.2"}
343
+CIRROS_ARCH=${CIRROS_ARCH:-"x86_64"}
343 344
 
344 345
 # Set default image based on ``VIRT_DRIVER`` and ``LIBVIRT_TYPE``, either of
345 346
 # which may be set in ``localrc``.  Also allow ``DEFAULT_IMAGE_NAME`` and
... ...
@@ -351,11 +352,11 @@ case "$VIRT_DRIVER" in
351 351
     libvirt)
352 352
         case "$LIBVIRT_TYPE" in
353 353
             lxc) # the cirros root disk in the uec tarball is empty, so it will not work for lxc
354
-                DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-x86_64-rootfs}
355
-                IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-rootfs.img.gz"};;
354
+                DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs}
355
+                IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs.img.gz"};;
356 356
             *) # otherwise, use the uec style image (with kernel, ramdisk, disk)
357
-                DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-x86_64-uec}
358
-                IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-uec.tar.gz"};;
357
+                DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec}
358
+                IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec.tar.gz"};;
359 359
         esac
360 360
         ;;
361 361
     vsphere)
... ...
@@ -366,8 +367,8 @@ case "$VIRT_DRIVER" in
366 366
         IMAGE_URLS=${IMAGE_URLS:-"https://github.com/downloads/citrix-openstack/warehouse/cirros-0.3.0-x86_64-disk.vhd.tgz"}
367 367
         IMAGE_URLS+=",http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-uec.tar.gz";;
368 368
     *) # Default to Cirros with kernel, ramdisk and disk image
369
-        DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-x86_64-uec}
370
-        IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-uec.tar.gz"};;
369
+        DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec}
370
+        IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec.tar.gz"};;
371 371
 esac
372 372
 
373 373
 # Use 64bit fedora image if heat is enabled