Browse code

add uec-natty

Jesse Andrews authored on 2011/10/03 12:42:56
Showing 1 changed files
... ...
@@ -565,6 +565,9 @@ screen_it dash "cd $DASH_DIR && sudo /etc/init.d/apache2 restart; sudo tail -f /
565 565
 # ==============
566 566
 
567 567
 if [[ "$ENABLED_SERVICES" =~ "g-reg" ]]; then
568
+
569
+    mkdir -p $FILES/images
570
+
568 571
     # Downloads a tty image (ami/aki/ari style), then extracts it.  Upon extraction
569 572
     # we upload to glance with the glance cli tool.
570 573
     if [ ! -f $FILES/tty.tgz ]; then
... ...
@@ -572,7 +575,6 @@ if [[ "$ENABLED_SERVICES" =~ "g-reg" ]]; then
572 572
     fi
573 573
 
574 574
     # extract ami-tty/image, aki-tty/image & ari-tty/image
575
-    mkdir -p $FILES/images
576 575
     tar -zxf $FILES/tty.tgz -C $FILES/images
577 576
 
578 577
     # add a debugging images to glance
... ...
@@ -581,6 +583,21 @@ if [[ "$ENABLED_SERVICES" =~ "g-reg" ]]; then
581 581
     RVAL=`glance add -A $SERVICE_TOKEN name="tty-ramdisk" is_public=true container_format=ari disk_format=ari < $FILES/images/ari-tty/image`
582 582
     RAMDISK_ID=`echo $RVAL | cut -d":" -f2 | tr -d " "`
583 583
     glance add -A $SERVICE_TOKEN name="tty" is_public=true container_format=ami disk_format=ami kernel_id=$KERNEL_ID ramdisk_id=$RAMDISK_ID < $FILES/images/ami-tty/image
584
+
585
+
586
+    # Ubuntu 11.04 aka Natty - downloaded from ubuntu enterprise cloud images.  This
587
+    # image doesn't use the ramdisk functionality
588
+   
589
+    if [ ! -f $FILES/natty.tgz ]; then
590
+        wget -c http://uec-images.ubuntu.com/natty/current/natty-server-cloudimg-amd64.tar.gz -O $FILES/natty.tgz
591
+    fi
592
+    
593
+    tar -zxf $FILES/natty.tgz -C $FILES/images
594
+
595
+    RVAL=`glance add -A $SERVICE_TOKEN name="uec-natty-kernel" is_public=true container_format=aki disk_format=aki < $FILES/images/natty-server-cloudimg-amd64-vmlinuz-virtual`
596
+    KERNEL_ID=`echo $RVAL | cut -d":" -f2 | tr -d " "`
597
+    glance add -A $SERVICE_TOKEN name="uec-natty" is_public=true container_format=ami disk_format=ami kernel_id=$KERNEL_ID < $FILES/images/natty-server-cloudimg-amd64.img
598
+
584 599
 fi
585 600
 
586 601
 # Using the cloud