QA:Testcase register images with OpenStack

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(Add updated fedora 17 image)
(9 intermediate revisions by 5 users not shown)
Line 7: Line 7:
 
1. Directly register a Fedora 16 appliance image. Note this will download a 200MB image (without a progress bar)
 
1. Directly register a Fedora 16 appliance image. Note this will download a 200MB image (without a progress bar)
  
   $> glance add name=f16 is_public=true disk_format=qcow2 container_format=ovf \
+
   $> glance add name=f17-x86_64-openstack-sda is_public=true disk_format=qcow2 container_format=bare \
       copy_from=http://berrange.fedorapeople.org/images/2012-02-29/f16-x86_64-openstack-sda.qcow2
+
       copy_from=http://berrange.fedorapeople.org/images/2012-11-15/f17-x86_64-openstack-sda.qcow2
  
 
2. Download and register the tty images
 
2. Download and register the tty images
Line 15: Line 15:
 
  $> cd images
 
  $> cd images
 
  $> <nowiki>curl http://images.ansolabs.com/tty.tgz | tar -xzv</nowiki>
 
  $> <nowiki>curl http://images.ansolabs.com/tty.tgz | tar -xzv</nowiki>
  $> KERNEL_ID=<nowiki>$(glance add name=aki-tty is_public=true container_format=aki disk_format=aki --silent-upload \
+
  $> glance add name=aki-tty is_public=true container_format=aki disk_format=aki < aki-tty/image
      < aki-tty/image | cut -f2 -d:)</nowiki>
+
  $> glance add name=ari-tty is_public=true container_format=ari disk_format=ari < ari-tty/image
  $> RAMDISK_ID=<nowiki>$(glance add name=ari-tty is_public=true container_format=ari disk_format=ari --silent-upload \
+
  $><nowiki> glance add name=ami-tty is_public=true container_format=ami disk_format=ami \
      < ari-tty/image | cut -f2 -d:)</nowiki>
+
        "kernel_id=$(glance index | awk '/aki-tty/ {print $1}')" \
  $> IMAGE_ID=<nowiki>$(glance add name=ami-tty is_public=true container_format=ami disk_format=ami "kernel_id=$KERNEL_ID" \
+
        "ramdisk_id=$(glance index | awk '/ari-tty/ {print $1}')" \
      "ramdisk_id=$RAMDISK_ID" --silent-upload < <(zcat --force ami-tty/image) | cut -f2 -d:)</nowiki>
+
            < ami-tty/image</nowiki>
  
 
|results=
 
|results=
 
Verify that the images have been registered.
 
Verify that the images have been registered.
 +
 
  $> glance index
 
  $> glance index
 
  ID                                  Name                          Disk Format          Container Format    Size           
 
  ID                                  Name                          Disk Format          Container Format    Size           
Line 30: Line 31:
 
  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ari-tty                        ari                  ari                        5882349
 
  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ari-tty                        ari                  ari                        5882349
 
  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx aki-tty                        aki                  aki                        4404752
 
  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx aki-tty                        aki                  aki                        4404752
  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx f16                            qcow2                ovf                       213581824
+
  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx f17-x86_64-openstack-sda      qcow2                bare                       251985920
 
+
$> glance image-list<nowiki>
 +
+--------------------------------------+--------------------------+-------------+------------------+-----------+--------+
 +
| ID                                  | Name                    | Disk Format | Container Format | Size      | Status |
 +
+--------------------------------------+--------------------------+-------------+------------------+-----------+--------+
 +
| xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | ami-tty                  | ami        | ami              |          | queued |
 +
| xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | aki-tty                  | aki        | aki              | 4404752  | active |
 +
| xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | ari-tty                  | ari        | ari              | 5882349  | active |
 +
| xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | f17-x86_64-openstack-sda | qcow2      | ovf              | 251985920 | active |
 +
+--------------------------------------+--------------------------+-------------+------------------+-----------+--------+
 +
</nowiki>
  
Check for errors in nova logs.
+
Check for errors in glance logs.
  $> grep -i error /var/log/{nova,glance}/*.log
+
  $> grep -i error /var/log/glance/*.log
 
}}
 
}}
  
 
[[Category:OpenStack Test Cases]]
 
[[Category:OpenStack Test Cases]]
[[Category:Cloud SIG]]
 

Revision as of 12:31, 16 November 2012

Contents

Description

Test downloading and registering images with OpenStack.

Setup

  1. Follow QA:Testcase_add_SSH_keypair_to_OpenStack

How to test

1. Directly register a Fedora 16 appliance image. Note this will download a 200MB image (without a progress bar)

 $> glance add name=f17-x86_64-openstack-sda is_public=true disk_format=qcow2 container_format=bare \
      copy_from=http://berrange.fedorapeople.org/images/2012-11-15/f17-x86_64-openstack-sda.qcow2

2. Download and register the tty images

$> mkdir images
$> cd images
$> curl http://images.ansolabs.com/tty.tgz | tar -xzv
$> glance add name=aki-tty is_public=true container_format=aki disk_format=aki < aki-tty/image
$> glance add name=ari-tty is_public=true container_format=ari disk_format=ari < ari-tty/image
$> glance add name=ami-tty is_public=true container_format=ami disk_format=ami \
        "kernel_id=$(glance index | awk '/aki-tty/ {print $1}')" \
        "ramdisk_id=$(glance index | awk '/ari-tty/ {print $1}')" \
            < ami-tty/image

Expected Results

Verify that the images have been registered.

$> glance index
ID                                   Name                           Disk Format          Container Format     Size          
------------------------------------ ------------------------------ -------------------- -------------------- --------------
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ami-tty                        ami                  ami                        25165824
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ari-tty                        ari                  ari                         5882349
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx aki-tty                        aki                  aki                         4404752
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx f17-x86_64-openstack-sda       qcow2                bare                       251985920
$> glance image-list
+--------------------------------------+--------------------------+-------------+------------------+-----------+--------+
| ID                                   | Name                     | Disk Format | Container Format | Size      | Status |
+--------------------------------------+--------------------------+-------------+------------------+-----------+--------+
| xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | ami-tty                  | ami         | ami              |           | queued |
| xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | aki-tty                  | aki         | aki              | 4404752   | active |
| xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | ari-tty                  | ari         | ari              | 5882349   | active |
| xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | f17-x86_64-openstack-sda | qcow2       | ovf              | 251985920 | active |
+--------------------------------------+--------------------------+-------------+------------------+-----------+--------+

Check for errors in glance logs.

$> grep -i error /var/log/glance/*.log