Merge lp:~jsuh/glance/glance-doc-jsuh into lp:~hudson-openstack/glance/trunk
- glance-doc-jsuh
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Jay Pipes | ||||
Approved revision: | 118 | ||||
Merged at revision: | 123 | ||||
Proposed branch: | lp:~jsuh/glance/glance-doc-jsuh | ||||
Merge into: | lp:~hudson-openstack/glance/trunk | ||||
Diff against target: |
244 lines (+81/-40) 2 files modified
doc/source/controllingservers.rst (+69/-28) doc/source/glance.rst (+12/-12) |
||||
To merge this branch: | bzr merge lp:~jsuh/glance/glance-doc-jsuh | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jay Pipes (community) | Approve | ||
Review via email: mp+58184@code.launchpad.net |
Commit message
Description of the change
I modified documentation to show more first-time user friendly examples on using glance. With the previous examples, I followed it as a first-time user and had to spend more than necessary time to figure out how to use it. With this modification, other first-time users would make it work on their systems more quickly.
Jay Pipes (jaypipes) wrote : | # |
Hi Joseph! Thanks for fixing it up! :)
Jinwoo "Joseph" Suh (jsuh) wrote : | # |
Jay,
It was my pleasure.
Thanks,
Joseph
----- Original Message -----
From: "Jay Pipes" <email address hidden>
To: <email address hidden>
Sent: Thursday, April 21, 2011 11:05:53 AM
Subject: Re: [Merge] lp:~jsuh/glance/glance-doc-jsuh into lp:glance
Review: Approve
Hi Joseph! Thanks for fixing it up! :)
--
https:/
You are the owner of lp:~jsuh/glance/glance-doc-jsuh.
Preview Diff
1 | === modified file 'doc/source/controllingservers.rst' |
2 | --- doc/source/controllingservers.rst 2011-02-09 21:56:48 +0000 |
3 | +++ doc/source/controllingservers.rst 2011-04-18 20:38:35 +0000 |
4 | @@ -30,6 +30,8 @@ |
5 | |
6 | * Using the ``glance-control`` server daemon wrapper program |
7 | |
8 | +We recommend using the second way. |
9 | + |
10 | Manually starting the server |
11 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
12 | |
13 | @@ -41,7 +43,7 @@ |
14 | |
15 | Glance ships with an ``etc/`` directory that contains sample ``paste.deploy`` |
16 | configuration files that you can copy to a standard configuation directory and |
17 | - adapt for your own uses. |
18 | + adapt for your own uses. Specifically, bind_host must be set properly. |
19 | |
20 | If you do `not` specifiy a configuration file on the command line, Glance will |
21 | do its best to locate a ``glance.conf`` configuration file in one of the |
22 | @@ -57,30 +59,62 @@ |
23 | |
24 | * /etc |
25 | |
26 | -If no configuration file is found, you will see any error, like so:: |
27 | +If no configuration file is found, you will see an error, like:: |
28 | |
29 | $> glance-api |
30 | ERROR: Unable to locate any configuration file. Cannot load application glance-api |
31 | |
32 | -Here is an example showing how you can manually start the ``glance-api`` server |
33 | -in a shell.:: |
34 | - |
35 | - $> sudo glance-api etc/glance.conf.sample --debug |
36 | - 2011-02-09 14:58:29 DEBUG [glance-api] ******************************************************************************** |
37 | - 2011-02-09 14:58:29 DEBUG [glance-api] Configuration options gathered from config file: |
38 | - 2011-02-09 14:58:29 DEBUG [glance-api] /home/jpipes/repos/glance/trunk/etc/glance.conf.sample |
39 | - 2011-02-09 14:58:29 DEBUG [glance-api] ================================================ |
40 | - 2011-02-09 14:58:29 DEBUG [glance-api] bind_host 0.0.0.0 |
41 | - 2011-02-09 14:58:29 DEBUG [glance-api] bind_port 9292 |
42 | - 2011-02-09 14:58:29 DEBUG [glance-api] debug True |
43 | - 2011-02-09 14:58:29 DEBUG [glance-api] default_store file |
44 | - 2011-02-09 14:58:29 DEBUG [glance-api] filesystem_store_datadir /var/lib/glance/images/ |
45 | - 2011-02-09 14:58:29 DEBUG [glance-api] registry_host 0.0.0.0 |
46 | - 2011-02-09 14:58:29 DEBUG [glance-api] registry_port 9191 |
47 | - 2011-02-09 14:58:29 DEBUG [glance-api] verbose False |
48 | - 2011-02-09 14:58:29 DEBUG [glance-api] ******************************************************************************** |
49 | - 2011-02-09 14:58:29 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True |
50 | - (16333) wsgi starting up on http://0.0.0.0:9292/ |
51 | +Here is an example showing how you can manually start the ``glance-api`` server and ``glance-registry`` in a shell.:: |
52 | + |
53 | + $ sudo glance-api glance.conf --debug & |
54 | + jsuh@mc-ats1:~$ 2011-04-13 14:50:12 DEBUG [glance-api] ******************************************************************************** |
55 | + 2011-04-13 14:50:12 DEBUG [glance-api] Configuration options gathered from config file: |
56 | + 2011-04-13 14:50:12 DEBUG [glance-api] /home/jsuh/glance.conf |
57 | + 2011-04-13 14:50:12 DEBUG [glance-api] ================================================ |
58 | + 2011-04-13 14:50:12 DEBUG [glance-api] bind_host 65.114.169.29 |
59 | + 2011-04-13 14:50:12 DEBUG [glance-api] bind_port 9292 |
60 | + 2011-04-13 14:50:12 DEBUG [glance-api] debug True |
61 | + 2011-04-13 14:50:12 DEBUG [glance-api] default_store file |
62 | + 2011-04-13 14:50:12 DEBUG [glance-api] filesystem_store_datadir /home/jsuh/images/ |
63 | + 2011-04-13 14:50:12 DEBUG [glance-api] registry_host 65.114.169.29 |
64 | + 2011-04-13 14:50:12 DEBUG [glance-api] registry_port 9191 |
65 | + 2011-04-13 14:50:12 DEBUG [glance-api] verbose False |
66 | + 2011-04-13 14:50:12 DEBUG [glance-api] ******************************************************************************** |
67 | + 2011-04-13 14:50:12 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True |
68 | + 2011-04-13 14:50:12 DEBUG [eventlet.wsgi.server] (21354) wsgi starting up on http://65.114.169.29:9292/ |
69 | + |
70 | + $ sudo glance-registry glance.conf & |
71 | + jsuh@mc-ats1:~$ 2011-04-13 14:51:16 INFO [sqlalchemy.engine.base.Engine.0x...feac] PRAGMA table_info("images") |
72 | + 2011-04-13 14:51:16 INFO [sqlalchemy.engine.base.Engine.0x...feac] () |
73 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Col ('cid', 'name', 'type', 'notnull', 'dflt_value', 'pk') |
74 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (0, u'created_at', u'DATETIME', 1, None, 0) |
75 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (1, u'updated_at', u'DATETIME', 0, None, 0) |
76 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (2, u'deleted_at', u'DATETIME', 0, None, 0) |
77 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (3, u'deleted', u'BOOLEAN', 1, None, 0) |
78 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (4, u'id', u'INTEGER', 1, None, 1) |
79 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (5, u'name', u'VARCHAR(255)', 0, None, 0) |
80 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (6, u'disk_format', u'VARCHAR(20)', 0, None, 0) |
81 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (7, u'container_format', u'VARCHAR(20)', 0, None, 0) |
82 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (8, u'size', u'INTEGER', 0, None, 0) |
83 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (9, u'status', u'VARCHAR(30)', 1, None, 0) |
84 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (10, u'is_public', u'BOOLEAN', 1, None, 0) |
85 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (11, u'location', u'TEXT', 0, None, 0) |
86 | + 2011-04-13 14:51:16 INFO [sqlalchemy.engine.base.Engine.0x...feac] PRAGMA table_info("image_properties") |
87 | + 2011-04-13 14:51:16 INFO [sqlalchemy.engine.base.Engine.0x...feac] () |
88 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Col ('cid', 'name', 'type', 'notnull', 'dflt_value', 'pk') |
89 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (0, u'created_at', u'DATETIME', 1, None, 0) |
90 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (1, u'updated_at', u'DATETIME', 0, None, 0) |
91 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (2, u'deleted_at', u'DATETIME', 0, None, 0) |
92 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (3, u'deleted', u'BOOLEAN', 1, None, 0) |
93 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (4, u'id', u'INTEGER', 1, None, 1) |
94 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (5, u'image_id', u'INTEGER', 1, None, 0) |
95 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (6, u'key', u'VARCHAR(255)', 1, None, 0) |
96 | + 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Row (7, u'value', u'TEXT', 0, None, 0) |
97 | + |
98 | + $ ps aux | grep glance |
99 | + root 20009 0.7 0.1 12744 9148 pts/1 S 12:47 0:00 /usr/bin/python /usr/bin/glance-api glance.conf --debug |
100 | + root 20012 2.0 0.1 25188 13356 pts/1 S 12:47 0:00 /usr/bin/python /usr/bin/glance-registry glance.conf |
101 | + jsuh 20017 0.0 0.0 3368 744 pts/1 S+ 12:47 0:00 grep glance |
102 | |
103 | Simply supply the configuration file as the first argument |
104 | (``etc/glance.conf.sample`` in the above example) and then any common options |
105 | @@ -93,9 +127,8 @@ |
106 | configuration files, see the section entitled |
107 | :doc:`Configuring Glance servers <configuring>` |
108 | |
109 | -Note that the server does not `daemonize` itself when run manually |
110 | -from the terminal. You can force the server to daemonize using the standard |
111 | -shell backgrounding indicator, ``&``. However, for most use cases, we recommend |
112 | +Note that the server `daemonizes` itself by using the standard |
113 | +shell backgrounding indicator, ``&``, in the previous example. For most use cases, we recommend |
114 | using the ``glance-control`` server daemon wrapper for daemonizing. See below |
115 | for more details on daemonization with ``glance-control``. |
116 | |
117 | @@ -125,8 +158,16 @@ |
118 | Here is an example that shows how to start the ``glance-registry`` server |
119 | with the ``glance-control`` wrapper script. :: |
120 | |
121 | - $> sudo glance-control registry start etc/glance.conf.sample |
122 | - Starting glance-registry with /home/jpipes/repos/glance/trunk/etc/glance.conf.sample |
123 | + |
124 | + $ sudo glance-control all start glance.conf |
125 | + Starting glance-api with /home/jsuh/glance.conf |
126 | + Starting glance-registry with /home/jsuh/glance.conf |
127 | + |
128 | + $ ps aux | grep glance |
129 | + root 20038 4.0 0.1 12728 9116 ? Ss 12:51 0:00 /usr/bin/python /usr/bin/glance-api /home/jsuh/glance.conf |
130 | + root 20039 6.0 0.1 25188 13356 ? Ss 12:51 0:00 /usr/bin/python /usr/bin/glance-registry /home/jsuh/glance.conf |
131 | + jsuh 20042 0.0 0.0 3368 744 pts/1 S+ 12:51 0:00 grep glance |
132 | + |
133 | |
134 | The same ``paste.deploy`` configuration files are used by ``glance-control`` |
135 | to start the Glance server programs, and you can specify (as the example above |
136 | @@ -134,8 +175,8 @@ |
137 | |
138 | .. note:: |
139 | |
140 | - To start all the Glance servers (currently the glance-api and glance-registry |
141 | - programs) at once, you can specify "all" for the <SERVER> |
142 | + To start each of Glance servers (currently the glance-api and glance-registry |
143 | + programs), you can specify glance-api and glance-registry, respectively for the <SERVER>. |
144 | |
145 | Stopping a server |
146 | ----------------- |
147 | |
148 | === modified file 'doc/source/glance.rst' |
149 | --- doc/source/glance.rst 2011-02-25 16:33:24 +0000 |
150 | +++ doc/source/glance.rst 2011-04-18 20:38:35 +0000 |
151 | @@ -149,20 +149,20 @@ |
152 | We'd also like to tell Glance that this image should be called "My Image", and |
153 | that the image should be public -- anyone should be able to fetch it. |
154 | |
155 | -Here is how we'd upload this image to Glance:: |
156 | +Here is how we'd upload this image to Glance. Change example ip number to your server ip number.:: |
157 | |
158 | - $> glance add name="My Image" is_public=true < /tmp/images/myimage.tar.gz |
159 | + $> glance add name="My Image" is_public=true < /tmp/images/myimage.tar.gz --host=65.114.169.29 |
160 | |
161 | If Glance was able to successfully upload and store your VM image data and |
162 | metadata attributes, you would see something like this:: |
163 | |
164 | - $> glance add name="My Image" is_public=true < /tmp/images/myimage.tar.gz |
165 | + $> glance add name="My Image" is_public=true < /tmp/images/myimage.tar.gz --host=65.114.169.29 |
166 | Added new image with ID: 2 |
167 | |
168 | You can use the ``--verbose`` (or ``-v``) command-line option to print some more |
169 | information about the metadata that was saved with the image:: |
170 | |
171 | - $> glance --verbose add name="My Image" is_public=true < /tmp/images/myimage.tar.gz |
172 | + $> glance --verbose add name="My Image" is_public=true < /tmp/images/myimage.tar.gz --host=65.114.169.29 |
173 | Added new image with ID: 4 |
174 | Returned the following metadata for the new image: |
175 | container_format => ovf |
176 | @@ -183,7 +183,7 @@ |
177 | If you are unsure about what will be added, you can use the ``--dry-run`` |
178 | command-line option, which will simply show you what *would* have happened:: |
179 | |
180 | - $> glance --dry-run add name="Foo" distro="Ubuntu" is_publi=True < /tmp/images/myimage.tar.gz |
181 | + $> glance --dry-run add name="Foo" distro="Ubuntu" is_publi=True < /tmp/images/myimage.tar.gz --host=65.114.169.29 |
182 | Dry run. We would have done the following: |
183 | Add new image with metadata: |
184 | container_format => ovf |
185 | @@ -250,12 +250,12 @@ |
186 | Let's say we have an image with identifier 5 that we wish to change the is_public |
187 | attribute of the image from False to True. The following would accomplish this:: |
188 | |
189 | - $> glance update 5 is_public=true |
190 | + $> glance update 5 is_public=true --host=65.114.169.29 |
191 | Updated image 5 |
192 | |
193 | Using the ``--verbose`` flag will show you all the updated data about the image:: |
194 | |
195 | - $> glance --verbose update 5 is_public=true |
196 | + $> glance --verbose update 5 is_public=true --host=65.114.169.29 |
197 | Updated image 5 |
198 | Updated image metadata for image 5: |
199 | URI: http://example.com/images/5 |
200 | @@ -273,7 +273,7 @@ |
201 | |
202 | You can delete an image by using the ``delete`` command, shown below:: |
203 | |
204 | - $> glance --verbose delete 5 |
205 | + $> glance --verbose delete 5 --host=65.114.169.29 |
206 | Deleted image 5 |
207 | |
208 | The ``index`` command |
209 | @@ -282,7 +282,7 @@ |
210 | The ``index`` command displays brief information about the *public* images |
211 | available in Glance, as shown below:: |
212 | |
213 | - $> glance index |
214 | + $> glance index --host=65.114.169.29 |
215 | Found 4 public images... |
216 | ID Name Disk Format Container Format Size |
217 | ---------------- ------------------------------ -------------------- -------------------- -------------- |
218 | @@ -297,7 +297,7 @@ |
219 | The ``details`` command displays detailed information about the *public* images |
220 | available in Glance, as shown below:: |
221 | |
222 | - $> glance details |
223 | + $> glance details --host=65.114.169.29 |
224 | Found 4 public images... |
225 | ================================================================================ |
226 | URI: http://example.com/images/1 |
227 | @@ -349,7 +349,7 @@ |
228 | The ``show`` command displays detailed information about a specific image, specified |
229 | with ``<ID>``, as shown below:: |
230 | |
231 | - $> glance show 3 |
232 | + $> glance show 3 --host=65.114.169.29 |
233 | URI: http://example.com/images/3 |
234 | Id: 3 |
235 | Public? Yes |
236 | @@ -368,7 +368,7 @@ |
237 | and all image metadata. Passing the ``--verbose`` command will print brief |
238 | information about all the images that were deleted, as shown below:: |
239 | |
240 | - $> glance --verbose clear |
241 | + $> glance --verbose clear --host=65.114.169.29 |
242 | Deleting image 1 "Some web image" ... done |
243 | Deleting image 2 "Some other web image" ... done |
244 | Completed in 0.0328 sec. |
OK, Joseph, I still see the merge conflict marks in the diff (search below for <<<<<<< TREE).
These appear because you did not properly resolve the merge conflict before doing a bzr resolve --all.
You need to go into the doc/source/ controllingserv ers.rst file and cut out the lines that you do not want and keep the lines you do. The lines between <<<<<<< TREE and ======= represent the lines you will want to keep. The lines between ======= and >>>>>>> MERGE-SOURCE are the lines you will want to remove, I believe.
Cheers,
jay