QA:Testcase register images with OpenStack

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(Created page with "{{QA/Test_Case |description=A brief description of the functionality being tested. |setup=Optionally include information on preparing the test environment |actions= Be as specifi...")
 
(Replace deprecated `glance add` with `glance image-create` and remove deprecated `glance index`.)
 
(19 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
{{QA/Test_Case
 
{{QA/Test_Case
|description=A brief description of the functionality being tested.
+
|description=Test downloading and registering images with OpenStack.
|setup=Optionally include information on preparing the test environment
+
|setup=
 +
# Follow [[QA:Testcase_add_SSH_keypair_to_OpenStack]]
 
|actions=
 
|actions=
Be as specific as required for the target audience.  
+
 
# Start here ...
+
1. Directly register a Fedora 17 appliance image. Note this will download a 200MB image (without a progress bar)
# Next do this ...
+
 
# Finally click that
+
  $> glance image-create --name f17-x86_64-openstack-sda-ic \
 +
      --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
 +
$> <nowiki>curl http://images.ansolabs.com/tty.tgz | tar -xzv</nowiki>
 +
$> 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
 +
$><nowiki> 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</nowiki>
 +
 
 
|results=
 
|results=
The following must be true to consider this a successful test run. Be brief ... but explicit.  
+
Verify that the images have been registered.
# Step #1 completes without error
+
 
# The system boots into runlevel 5
+
$> glance image-list<nowiki>
# Program completes wth exit code 0
+
+--------------------------------------+--------------------------+-------------+------------------+-----------+--------+
 +
| 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 glance logs.
 +
$> grep -i error /var/log/glance/*.log
 
}}
 
}}
  
 
[[Category:OpenStack Test Cases]]
 
[[Category:OpenStack Test Cases]]
[[Category:Cloud SIG]]
 

Latest revision as of 14:08, 11 April 2013

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 17 appliance image. Note this will download a 200MB image (without a progress bar)

 $> glance image-create --name f17-x86_64-openstack-sda-ic \
      --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 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