Oh, I hate Pollen

Its end of April and the pollen season is in fully bloom here in Chicago. I am on the edge of scratching my eyes out.

It could be worse. I could be living in Atlanta, where everything turns yellow.

Anyway, in my learnings with OpenStack, I was about to go and upload additional images into my lab. While I could build my own images, the nice thing with OpenStack is that I can upload AMI images. I went to the following page to retrieve additional images:

https://github.com/eucalyptus/eucalyptus/wiki/Starter-Images

There are other free AMI images out there, but I choose these because I can use Ubuntu’s built in tool to upload the images:


At openstack@openstackstorage:~/openstack/images$ cloud-publish-tarball opensuse-12.2-x86_64-emi.tar.gz images x86_64 Mon Apr 29 17:06:21 CDT 2013: ====== extracting image ====== kernel : kvm-kernel/vmlinuz-3.4.11-2.16-default ramdisk: kvm-kernel/initrd-3.4.11-2.16-default image : opensuse-12.2-x86_64-emi.img Mon Apr 29 17:07:12 CDT 2013: ====== bundle/upload kernel ====== Mon Apr 29 17:07:19 CDT 2013: ====== bundle/upload ramdisk ====== Mon Apr 29 17:07:23 CDT 2013: ====== bundle/upload image ====== Mon Apr 29 17:13:11 CDT 2013: ====== done ====== emi="ami-0000000b"; eri="ari-0000000a"; eki="aki-00000009";

Of course, I could always use euca2ools to upload individual images (in fact, that is what cloud-publish-tarball is – a wrapper around some of the euca2ools commands). However, the nice thing about the cloud-publish-tarball tool is thattakes care of uploading the images as well as the associated manifests.

At any event, once the images are upload, you will see them present via the nova image-list command:


stardust:openstack rilindo$ nova image-list
+--------------------------------------+-----------------------------------------------------+--------+--------+
| ID                                   | Name                                                | Status | Server |
+--------------------------------------+-----------------------------------------------------+--------+--------+
| 36acf23a-07e4-4253-8183-da60253d919a | images/centos-6.3-x86_64.img                        | ACTIVE |        |
| 1bba647b-111b-4ea7-a614-76229fd63c8c | images/initrd-2.6.32-279.14.1.el6.x86_64.img        | ACTIVE |        |
| 054b1f8b-1051-4fdd-b8a1-0efb442ab127 | images/initrd-3.4.11-2.16-default                   | ACTIVE |        |
| 756ee7b6-831b-4e30-899c-4b6aa2f3fafd | images/opensuse-12.2-x86_64-emi.img                 | ACTIVE |        |
| 6e63d0cd-4e24-4766-ad48-3a01670a607e | images/precise-server-cloudimg-i386-vmlinuz-virtual | ACTIVE |        |
| bedf0e78-c7d4-414e-85fb-291a0ccd851d | images/precise-server-cloudimg-i386.img             | ACTIVE |        |
| 490a92a6-5741-4485-8465-df9fc2c19a5c | images/vmlinuz-2.6.32-279.14.1.el6.x86_64           | ACTIVE |        |
| b9886335-e04a-4086-a860-852240430d53 | images/vmlinuz-3.4.11-2.16-default                  | ACTIVE |        |
+--------------------------------------+-----------------------------------------------------+--------+--------+

The first column is the actual file names of the images. Those are uploaded in the following directory:


root@openstack1:/var/lib/glance/images# ls -la
total 6125848
drwxr-xr-x 2 glance glance       4096 Apr 29 16:40 .
drwxr-xr-x 4 glance glance       4096 Apr 29 16:42 ..
-rw-rw-r-- 1 glance glance    5943048 Apr 29 16:18 1bba647b-111b-4ea7-a614-76229fd63c8c
-rw-rw-r-- 1 glance glance 4781506560 Apr 29 16:42 36acf23a-07e4-4253-8183-da60253d919a
-rw-rw-r-- 1 glance glance    3988752 Apr 29 16:18 490a92a6-5741-4485-8465-df9fc2c19a5c
-rw-rw-r-- 1 glance glance    5017344 Apr 22 18:24 6e63d0cd-4e24-4766-ad48-3a01670a607e
-rw-rw-r-- 1 glance glance 1476395008 Apr 22 18:26 bedf0e78-c7d4-414e-85fb-291a0ccd851d

And registered by glance-registry

Important point: When you do upload the image, CPU utilization for nova-api will temporarily sky-rocketed. On a server system, it would probably be fairly brief. On my desktop “server”, it took about 10-15 minutes


top - 16:34:51 up 3 days, 25 min,  1 user,  load average: 1.83, 1.30, 0.85
Tasks: 116 total,   2 running, 114 sleeping,   0 stopped,   0 zombie
Cpu(s): 97.0%us,  3.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   3791440k total,  3641552k used,   149888k free,   145980k buffers
Swap:  3928060k total,     3232k used,  3924828k free,  2797332k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                     
24048 nova      20   0  247m  86m 5764 R 95.2  2.3  10:09.51 nova-api                                                                                    
 1251 nova      20   0  205m  58m 4588 S  2.0  1.6  21:57.61 nova-network                                                                                
    3 root      20   0     0    0    0 S  0.3  0.0   2:06.05 ksoftirqd/0                                                                                 
   22 root      20   0     0    0    0 D  0.3  0.0   0:00.15 kswapd0                                                                                     
 1250 nova      20   0  197m  50m 4588 S  0.3  1.4  12:52.87 nova-scheduler                                                                              
 1252 nova      20   0  195m  49m 4588 S  0.3  1.3  12:08.12 nova-cert                                                                                   
 1522 mysql     20   0  870m  58m 7820 S  0.3  1.6  11:18.90 mysqld                                                                                      
 1757 rabbitmq  20   0  568m  29m 2284 S  0.3  0.8   5:44.25 beam                                                                                        
27080 root      20   0     0    0    0 S  0.3  0.0   0:00.05 kworker/0:1             

I couldn’t use the nova commands, as they will hang and wait until nova-api finishes. The first time it happened, I restarted nova-api, which killed the image registration, forcing me to delete and restart the image upload. 😦 But eventually it finishes and after some inspection, I was able to build my Fedora, CentOS 6 and OpenSuSE instances.


Linux vmi012 3.4.11-2.16-default #1 SMP Wed Sep 26 17:05:00 UTC 2012 (259fc87) x86_64 x86_64 x86_64 GNU/Linux
stardust:openstack rilindo$ ssh -i mykey.pem -lroot 192.168.15.16 uname -an
Linux vmi013.novalocal 2.6.32-279.14.1.el6.x86_64 #1 SMP Tue Nov 6 23:43:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
stardust:openstack rilindo$ ssh -i mykey.pem -lroot 192.168.15.13 uname -an

Next: Mac OS X and maybe Keystone

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s