Merge lp:~jaypipes/glance/bug754221 into lp:~hudson-openstack/glance/trunk

Proposed by Jay Pipes
Status: Merged
Approved by: Jay Pipes
Approved revision: 124
Merged at revision: 127
Proposed branch: lp:~jaypipes/glance/bug754221
Merge into: lp:~hudson-openstack/glance/trunk
Diff against target: 191 lines (+44/-21)
1 file modified
doc/source/glance.rst (+44/-21)
To merge this branch: bzr merge lp:~jaypipes/glance/bug754221
Reviewer Review Type Date Requested Status
Devin Carlen (community) Approve
Brian Waldon (community) Approve
Wayne A. Walls Pending
Jordan Rinke Pending
Review via email: mp+58845@code.launchpad.net

Commit message

Documentation updates to make glance add command clearer, hopefully :)

Description of the change

Documentation updates to make glance add command clearer, hopefully :)

Jordan and Wayne, please do let me know if these edits make it clearer, and whether you would add anything additional. Thanks much!

-jay

To post a comment you must log in.
Revision history for this message
Brian Waldon (bcwaldon) wrote :

Looks good to me, assuming it is all syntactically correct.

review: Approve
Revision history for this message
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve
Revision history for this message
Jay Pipes (jaypipes) wrote :

got approval from annegentle...setting to Approved.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'doc/source/glance.rst'
2--- doc/source/glance.rst 2011-04-18 20:37:48 +0000
3+++ doc/source/glance.rst 2011-04-22 19:04:32 +0000
4@@ -17,44 +17,44 @@
5 Using the Glance CLI Tool
6 =========================
7
8-Glance ships with a command-line tool for quering and managing Glance
9+Glance ships with a command-line tool for querying and managing Glance
10 It has a fairly simple but powerful interface of the form::
11
12 Usage: glance <command> [options] [args]
13
14 Where ``<command>`` is one of the following:
15
16-* help
17+* ``help``
18
19 Show detailed help information about a specific command
20
21-* add
22+* ``add``
23
24 Adds an image to Glance
25
26-* update
27+* ``update``
28
29 Updates an image's stored metadata in Glance
30
31-* delete
32+* ``delete``
33
34 Deletes an image and its metadata from Glance
35
36-* index
37+* ``index``
38
39 Lists brief information about *public* images that Glance knows about
40
41-* details
42+* ``details``
43
44 Lists detailed information about *public* images that Glance knows about
45
46-* show
47+* ``show``
48
49 Lists detailed information about a specific image
50
51-* clear
52+* ``clear``
53
54- Destroys *all* images and their associated metadata
55+ Destroys all **public** images and their associated metadata
56
57 This document describes how to use the ``glance`` tool for each of
58 the above commands.
59@@ -134,6 +134,23 @@
60
61 We cover both use cases below.
62
63+Important Information about Uploading Images
64+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65+
66+Before we go over the commands for adding an image to Glance, it is
67+important to understand that Glance **does not currently inspect** the image
68+files you add to it. In other words, **Glance only understands what you tell it,
69+via attributes and custom properties**.
70+
71+If the file extension of the file you upload to Glance ends in '.vhd', Glance
72+**does not** know that the image you are uploading has a disk format of ``vhd``.
73+You have to **tell** Glance that the image you are uploading has a disk format by
74+using the ``disk_format=vhd`` on the command line (see more below).
75+
76+By the same token, Glance does not currently allow you to upload "multi-part"
77+disk images at once. **The common operation of bundling a kernel image and ramdisk image
78+into a machine image is not done automagically by Glance.**
79+
80 Store virtual machine image data and metadata
81 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
82
83@@ -142,27 +159,27 @@
84 you will use a standard shell redirect to stream the image data file to
85 ``glance``.
86
87-Let's walk through a simple example. Suppose we have an image stored on our
88-local filesystem that we wish to "upload" to Glance. This image is stored
89-on our local filesystem in ``/tmp/images/myimage.tar.gz``.
90+Let's walk through a simple example. Suppose we have a virtual disk image
91+stored on our local filesystem that we wish to "upload" to Glance. This image is stored
92+on our local filesystem in ``/tmp/images/myimage.iso``.
93
94 We'd also like to tell Glance that this image should be called "My Image", and
95 that the image should be public -- anyone should be able to fetch it.
96
97 Here is how we'd upload this image to Glance. Change example ip number to your server ip number.::
98
99- $> glance add name="My Image" is_public=true < /tmp/images/myimage.tar.gz --host=65.114.169.29
100+ $> glance add name="My Image" is_public=true < /tmp/images/myimage.iso --host=65.114.169.29
101
102 If Glance was able to successfully upload and store your VM image data and
103 metadata attributes, you would see something like this::
104
105- $> glance add name="My Image" is_public=true < /tmp/images/myimage.tar.gz --host=65.114.169.29
106+ $> glance add name="My Image" is_public=true < /tmp/images/myimage.iso --host=65.114.169.29
107 Added new image with ID: 2
108
109 You can use the ``--verbose`` (or ``-v``) command-line option to print some more
110 information about the metadata that was saved with the image::
111
112- $> glance --verbose add name="My Image" is_public=true < /tmp/images/myimage.tar.gz --host=65.114.169.29
113+ $> glance --verbose add name="My Image" is_public=true < /tmp/images/myimage.iso --host=65.114.169.29
114 Added new image with ID: 4
115 Returned the following metadata for the new image:
116 container_format => ovf
117@@ -183,7 +200,7 @@
118 If you are unsure about what will be added, you can use the ``--dry-run``
119 command-line option, which will simply show you what *would* have happened::
120
121- $> glance --dry-run add name="Foo" distro="Ubuntu" is_publi=True < /tmp/images/myimage.tar.gz --host=65.114.169.29
122+ $> glance --dry-run add name="Foo" distro="Ubuntu" is_publi=True < /tmp/images/myimage.iso --host=65.114.169.29
123 Dry run. We would have done the following:
124 Add new image with metadata:
125 container_format => ovf
126@@ -213,10 +230,11 @@
127 setting the ``location`` field. Below is an example of doing this.
128
129 Let's assume that there is a virtual machine image located at the URL
130-``http://example.com/images/myimage.tar.gz``. We can register this image with
131+``http://example.com/images/myimage.vhd``. We can register this image with
132 Glance using the following::
133
134- $> glance --verbose add name="Some web image" location="http://example.com/images/myimage.tar.gz"
135+ $> glance --verbose add name="Some web image" disk_format=vhd container_format=ovf\
136+ location="http://example.com/images/myimage.vhd"
137 Added new image with ID: 1
138 Returned the following metadata for the new image:
139 container_format => ovf
140@@ -226,7 +244,7 @@
141 disk_format => vhd
142 id => 1
143 is_public => True
144- location => http://example.com/images/myimage.tar.gz
145+ location => http://example.com/images/myimage.vhd
146 name => Some web image
147 properties => {}
148 size => 0
149@@ -304,6 +322,7 @@
150 Id: 1
151 Public? Yes
152 Name: Ubuntu 10.10
153+ Status: active
154 Size: 58520278
155 Location: file:///tmp/images/1
156 Disk format: vhd
157@@ -315,6 +334,7 @@
158 Id: 2
159 Public? Yes
160 Name: Ubuntu 10.04
161+ Status: active
162 Size: 58520278
163 Location: file:///tmp/images/2
164 Disk format: ami
165@@ -326,6 +346,7 @@
166 Id: 3
167 Public? Yes
168 Name: Fedora 9
169+ Status: active
170 Size: 3040
171 Location: file:///tmp/images/3
172 Disk format: vdi
173@@ -337,8 +358,9 @@
174 Id: 4
175 Public? Yes
176 Name: Vanilla Linux 2.6.22
177+ Status: active
178 Size: 0
179- Location: http://example.com/images/vanilla.tar.gz
180+ Location: http://example.com/images/vanilla.iso
181 Disk format: qcow2
182 Container format: bare
183 ================================================================================
184@@ -354,6 +376,7 @@
185 Id: 3
186 Public? Yes
187 Name: Fedora 9
188+ Status: active
189 Size: 3040
190 Location: file:///tmp/images/3
191 Disk format: vdi

Subscribers

People subscribed via source and target branches