Skip to content

Commit

Permalink
Fix bug 939269
Browse files Browse the repository at this point in the history
Change-Id: I2bb67224c76fe559c8da145dc5ed91c502ec5c62
  • Loading branch information
annegentle committed Apr 17, 2012
1 parent e6bcfa9 commit 3879349
Showing 1 changed file with 58 additions and 46 deletions.
104 changes: 58 additions & 46 deletions doc/src/docbkx/api-quick-start/src/docbkx/cli-uses.xml
Expand Up @@ -26,75 +26,87 @@ usage: nova [--debug] [--os_username OS_USERNAME] [--os_password OS_PASSWORD]
[--version VERSION]
<subcommand> ...
</programlisting>
<para>In return, you will get a listing of all the commands and parameters for the nova command line client.
By setting up the required parameters as environment variables, you can fly through these commands on the command line.
You can add --os_username on the nova command, or set them as environment variables. When using an OpenStack, you are supplied with an endpoint,
which the nova client recognizes as the NOVA_URL. </para>
<para>In return, you will get a listing of all the commands and
parameters for the nova command line client. By setting up the
required parameters as environment variables, you can fly
through these commands on the command line. You can add
--os_username on the nova command, or set them as environment
variables. When using TryStack, you are supplied with an
endpoint, which the nova client recognizes as the NOVA_URL. On
TryStack, you can retrieve these environment variables at
https://trystack.org/dash/api_info/ after logging in.</para>
<para><programlisting>
export OS_USERNAME=joecool
export OS_PASSWORD=coolword
export OS_TENANT_NAME=coolu
export OS_AUTH_URL=http://trystack.org:5000/v2.0
export NOVA_USERNAME=facebook12345679
export NOVA_API_KEY=coolword
export NOVA_PROJECT_ID=facebook12345679
export NOVA_URL=https://nova-api.trystack.org:5443/v2.0
export NOVA_VERSION=1.1
</programlisting>
</para>

<section xml:id="Launching-Images-a09140"><title>Listing Images</title><para>Before you can go about the business of building your cloud, you want to know what images are
available to you by asking the image service what kinds of configurations are available.
The image service could be compared to iTunes for your cloud - you can view the playlist
of images before using your favorite image to create a new instance in the cloud. To get
the list of images, their names, status, and ID, use this command:
<programlisting>
<section xml:id="Launching-Images-a09140"><title>Listing Images</title><para>Before you can go about the business of building your cloud, you
want to know what images are available to you by asking
the image service what kinds of configurations are
available. The image service could be compared to iTunes
for your cloud - you can view the playlist of images
before using your favorite image to create a new instance
in the cloud. To get the list of images, their names,
status, and ID, use this command:
<programlisting>
$ nova image-list

+----+-------------------------------------------------------+--------+
| ID | Name | Status |
+----+-------------------------------------------------------+--------+
| 1 | aki-tty | ACTIVE |
| 2 | ari-tty | ACTIVE |
| 3 | ami-tty | ACTIVE |
| 6 | CentOS_5.4_x64 | ACTIVE |
| 14 | maverick-kernel | ACTIVE |
| 15 | maverick | ACTIVE |
| 20 | ubuntu-kernel | ACTIVE |
| 21 | ubuntu-ramdisk | ACTIVE |
| 22 | ubuntu | ACTIVE |
| 24 | CentOS_5.6_x64_v5.7.14_Dev1 | ACTIVE |
+----+-------------------------------------------------------+--------+
+----+--------------------------------------+--------+--------+
| ID | Name | Status | Server |
+----+--------------------------------------+--------+--------+
| 12 | natty-server-cloudimg-amd64-kernel | ACTIVE | |
| 13 | natty-server-cloudimg-amd64 | ACTIVE | |
| 14 | oneiric-server-cloudimg-amd64-kernel | ACTIVE | |
| 15 | oneiric-server-cloudimg-amd64 | ACTIVE | |
+----+--------------------------------------+--------+--------+
</programlisting></para>
<para>Next you need to know the relative sizes of each of these. </para>
<para><programlisting>
$ nova flavor-list

+----+-----------+-----------+------+----------+-------+------------+----------+
| ID | Name | Memory_MB | Swap | Local_GB | VCPUs | RXTX_Quota | RXTX_Cap |
+----+-----------+-----------+------+----------+-------+------------+----------+
| 1 | m1.tiny | 512 | | 0 | | | |
| 2 | m1.small | 2048 | | 20 | | | |
| 3 | m1.medium | 4096 | | 40 | | | |
| 4 | m1.large | 8192 | | 80 | | | |
| 5 | m1.xlarge | 16384 | | 160 | | | |
| 89 | Boom | 2 | | 20 | | | |
+----+-----------+-----------+------+----------+-------+------------+----------+

+----+-----------+-----------+------+-----------+------+-------+-------------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor |
+----+-----------+-----------+------+-----------+------+-------+-------------+
| 1 | m1.tiny | 512 | 0 | N/A | 0 | 1 | |
| 2 | m1.small | 2048 | 20 | N/A | 0 | 1 | |
| 3 | m1.medium | 4096 | 40 | N/A | 0 | 2 | |
| 4 | m1.large | 8192 | 80 | N/A | 0 | 4 | |
| 5 | m1.xlarge | 16384 | 160 | N/A | 0 | 8 | |
+----+-----------+-----------+------+-----------+------+-------+-------------+
</programlisting></para>
<para>You can also narrow down the list by using grep to find only the CentOS images with a command like this: </para>
<para>
<programlisting>

$ nova image-list | grep 'CentOS'

| 6 | CentOS_5.4_x64 | ACTIVE |
| 24 | CentOS_5.6_x64_v5.7.14_Dev1 | ACTIVE |
$ nova image-list | grep 'natty'

| 12 | natty-server-cloudimg-amd64-kernel | ACTIVE | |
| 13 | natty-server-cloudimg-amd64 | ACTIVE | |
</programlisting>
</para>
<para>With the information about what is available to you, you can choose the combination of image and flavor to create your virtual servers and launch instances. </para></section>
<section xml:id="Listing-Images-a01518"><title>Launching Instances </title>

<para>
To launch a server, you choose an image you want to match up to a size, find the ID for the image and the ID for the flavor so you can size it, and create the command with the IDs. From the information we got previously, we know that an Ubuntu Maverick image has an ID of 15, and if you want to start small with about 2 GB of memory and 20 GB of disk space, you'd choose the m1.small flavor which has an ID of 2. Put those parameters in with the "boot" command and you can create a new virtual server.
</para>
<para> To launch a server, you choose an image you want to match
up to a size, find the ID for the image and the ID for the
flavor so you can size it, and create the command with the
IDs. From the information we got previously, we know that
an Ubuntu Maverick image has an ID of 15, and if you want
to start small with about 2 GB of memory and 20 GB of disk
space, you'd choose the m1.small flavor which has an ID of
2 when using the 1.1 API on TryStack. Put those parameters
in with the "boot" command and you can create a new
virtual server. <note>
<para>When using an endpoint that supports 1.1 of the
Compute API, you can launch instances with an ID.
When using an endpoint that supports v2 of the
Compute API, you must use the UUID to launch an
instance.</para>
</note></para>
<para>
<programlisting>
$ nova boot --flavor=2 --image=15 testserver
Expand Down

0 comments on commit 3879349

Please sign in to comment.