Permalink
Browse files

Switch to smoser's loader kernel for lucid image

  • Loading branch information...
kiall committed Nov 21, 2011
1 parent 25a2ee8 commit 6204bfcd57ed983a25feab6ce7cdbd6b68bdca60
Showing with 52 additions and 2 deletions.
  1. +2 −0 .gitignore
  2. +1 −1 clean.sh
  3. +25 −0 glance-upload-loader.sh
  4. +22 −0 glance-upload-lucid-loader.sh
  5. +2 −1 glance.sh
  6. 0 keystone.conf.tmpl
  7. 0 settings
View
@@ -11,3 +11,5 @@ glance-registry.conf
keystone.conf
local_settings.py
nova.conf
+kernels/
+loader*
View
@@ -1,3 +1,3 @@
#!/bin/bash
-rm -f api-paste-keystone.ini keystone.log keystone_data.sh glance-registry.conf glance-api.conf oneiric* lucid* local_settings.py README.files nova.conf
+rm -rf api-paste-keystone.ini keystone.log keystone_data.sh glance-registry.conf glance-api.conf oneiric* lucid* local_settings.py README.files nova.conf kernels loader*
View
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Import Settings
+. settings
+
+if [ ! -f "loader-lucid-amd64-linux-image-2.6.32-34-virtual-v-2.6.32-34.77~smloader0-build0.tar.gz" ] ; then
+ echo "Downloading loader"
+ wget http://people.canonical.com/~smoser/lucid-loaders/loader-lucid-amd64-linux-image-2.6.32-34-virtual-v-2.6.32-34.77~smloader0-build0.tar.gz
+fi
+
+if [ ! -f "loader-ramdisks.txt" ] ; then
+ echo "Extracting loader"
+ tar xfzv loader-lucid-amd64-linux-image-2.6.32-34-virtual-v-2.6.32-34.77~smloader0-build0.tar.gz
+fi
+
+TOKEN=`./obtain-token.sh`
+
+echo "Uploading loader kernel"
+RVAL=`glance -A $TOKEN add name="loader-kernel" is_public=true container_format=aki disk_format=aki < kernels/lucid-amd64-linux-image-2.6.32-34-virtual-v-2.6.32-34.77~smloader0-kernel`
+KERNEL_ID=`echo $RVAL | cut -d":" -f2 | tr -d " "`
+
+echo "Uploading loader ramdisk"
+RVAL=`glance -A $TOKEN add name="loader-ramdisk" is_public=true container_format=ari disk_format=ari < loader-ramdisks/lucid-amd64-linux-image-2.6.32-34-virtual-v-2.6.32-34.77~smloader0-build0-loader`
+RAMDISK_ID=`echo $RVAL | cut -d":" -f2 | tr -d " "`
+
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# Import Settings
+. settings
+
+if [ ! -f "lucid-server-cloudimg-amd64.tar.gz" ] ; then
+ echo "Downloading image"
+ wget http://cloud-images.ubuntu.com/lucid/current/lucid-server-cloudimg-amd64.tar.gz
+fi
+
+if [ ! -f "lucid-server-cloudimg-amd64.img" ] ; then
+ echo "Extracting image"
+ tar xfzv lucid-server-cloudimg-amd64.tar.gz
+fi
+
+TOKEN=`./obtain-token.sh`
+
+KERNEL_ID=`glance index -A $TOKEN --limit=99999999999 | grep loader-kernel | cut -d" " -f1`
+RAMDISK_ID=`glance index -A $TOKEN --limit=99999999999 | grep loader-ramdisk | cut -d" " -f1`
+
+echo "Uploading image"
+glance -A $TOKEN add name="ubuntu-lucid" is_public=true container_format=ami disk_format=ami kernel_id=$KERNEL_ID ramdisk_id=$RAMDISK_ID < lucid-server-cloudimg-amd64.img
View
@@ -32,6 +32,7 @@ sleep 2
./glance-upload-ttylinux.sh
./glance-upload-oneiric.sh
-./glance-upload-lucid.sh
+./glance-upload-loader.sh
+./glance-upload-lucid-loader.sh
View
0 keystone.conf.tmpl 100755 → 100644
No changes.
View
0 settings 100755 → 100644
No changes.

0 comments on commit 6204bfc

Please sign in to comment.