Migration of cli sections in End User Guide

DocBook to RST conversion of the following sections:

- Manage instances and hosts
- Change the size of your server
- Manage IP addresses
- Start and stop an instance
- Provide user data to instances

Change-Id: Id3a2c1aa9ad7d44fac87274b14e4a1f4ced9539b
This commit is contained in:
daz
2015-02-19 17:17:44 +11:00
parent 31c1ded5f9
commit e44128255a
6 changed files with 353 additions and 3 deletions

View File

@@ -84,9 +84,10 @@ service with its package name and description.
.. toctree::
:maxdepth: 2
cli_launch_instances.rst
cli_cheat_sheet.rst
trove-manage-db.rst
.. TODO(ajaeger): Add further sections
cli_cheat_sheet.rst
cli_launch_instances.rst
cli_manage_instances_hosts.rst
cli_provide_user_data_to_instances.rst

View File

@@ -0,0 +1,91 @@
==============================
Change the size of your server
==============================
Change the size of a server by changing its flavor.
#. Show information about your server, including its size, which is shown
as the value of the flavor property::
$ nova show myCirrosServer
+-------------------------------------+-------------------------------------+
| Property | Value |
+-------------------------------------+-------------------------------------+
| status | ACTIVE |
| updated | 2013-07-18T15:08:20Z |
| OS-EXT-STS:task_state | None |
| OS-EXT-SRV-ATTR:host | devstack |
| key_name | None |
| image | cirros-0.3.2-x86_64-uec (397e71... |
| private network | 10.0.0.3 |
| hostId | 6e1e69b71ac9b1e6871f91e2dfc9a9b9... |
| OS-EXT-STS:vm_state | active |
| OS-EXT-SRV-ATTR:instance_name | instance-00000005 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | devstack |
| flavor | m1.small (2) |
| id | 84c6e57d-a6b1-44b6-81eb-fcb36afd31b5|
| security_groups | [{u'name': u'default'}] |
| user_id | 376744b5910b4b4da7d8e6cb483b06a8 |
| name | myCirrosServer |
| created | 2013-07-18T15:07:59Z |
| tenant_id | 66265572db174a7aa66eba661f58eb9e |
| OS-DCF:diskConfig | MANUAL |
| metadata | {u'description': u'Small test ima...|
| accessIPv4 | |
| accessIPv6 | |
| progress | 0 |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-AZ:availability_zone | nova |
| config_drive | |
+-------------------------------------+-------------------------------------+
The size (flavor) of the server is ``m1.small (2)``.
#. List the available flavors with the following command::
$ nova flavor-list
+-----+-----------+-----------+------+-----------+------+-------+-------------+----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public|
+-----+-----------+-----------+------+-----------+------+-------+-------------+----------+
| 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True |
+-----+-----------+-----------+------+-----------+------+-------+-------------+----------+
#. To resize the server, use the ``nova resize`` command and add the server
ID or name and the new flavor. Include the ``--poll`` parameter to display
the resize progress. For example::
$ nova resize myCirrosServer 4 --poll
Instance resizing... 100% complete
Finished
#. Show the status for your server::
$ nova list
+----------------------+----------------+--------+-----------------------------------------+
| ID | Name | Status | Networks |
+----------------------+----------------+--------+-----------------------------------------+
| 84c6e57d-a6b1-44b... | myCirrosServer | RESIZE | private=172.16.101.6, public=10.4.113.6 |
+----------------------+----------------+--------+-----------------------------------------+
When the resize completes, the status becomes VERIFY\_RESIZE.
#. Confirm the resize,for example::
$ nova resize-confirm 84c6e57d-a6b1-44b6-81eb-fcb36afd31b5
The server status becomes ACTIVE.
#. If the resize fails or does not work as expected, you can revert the
resize. For example::
$ nova resize-revert 84c6e57d-a6b1-44b6-81eb-fcb36afd31b5
The server status becomes ACTIVE.

View File

@@ -0,0 +1,28 @@
==========================
Manage instances and hosts
==========================
Instances are virtual machines that run inside the cloud on physical
compute nodes. The Compute service manages instances. A host is the node
on which a group of instances resides.
This section describes how to perform the different tasks involved in
instance management, such as adding floating IP addresses, stopping and
starting instances, and terminating instances. This section also
discusses node management tasks.
.. toctree::
:maxdepth: 2
cli_manage_ip_addresses.rst
cli_change_the_size_of_your_server.rst
cli_stop_and_start_an_instance.rst
..
Add the following when converted TODO(DC)
section_cli_nova_search_ip.xml
section_cli_nova_reboot.xml
section_cli_nova_terminate.xml
section_cli_nova_get_console.xml
section_cli_nova_baremetal.xml
/common/section_cli_nova_usage_statistics.xml

View File

@@ -0,0 +1,148 @@
===================
Manage IP addresses
===================
Each instance has a private, fixed IP address and can also have a
public, or floating IP address. Private IP addresses are used for
communication between instances, and public addresses are used for
communication with networks outside the cloud, including the Internet.
When you launch an instance, it is automatically assigned a private IP
address that stays the same until you explicitly terminate the instance.
Rebooting an instance has no effect on the private IP address.
A pool of floating IP addresses, configured by the cloud administrator,
is available in OpenStack Compute. The project quota defines the maximum
number of floating IP addresses that you can allocate to the project.
After you allocate a floating IP address to a project, you can:
- Associate the floating IP address with an instance of the project. Only one
floating IP address can be allocated to an instance at any given time.
- Disassociate a floating IP address from an instance in the project.
- Delete a floating IP from the project which automatically deletes that IP's
associations.
Use the ``nova floating-ip-*`` commands to manage floating IP addresses.
List floating IP address information
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To list all pools that provide floating IP addresses, run:
.. code::
$ nova floating-ip-pool-list
+--------+
| name |
+--------+
| public |
| test |
+--------+
.. note::
If this list is empty, the cloud administrator must configure a pool
of floating IP addresses.
To list all floating IP addresses that are allocated to the current project,
run:
.. code::
$ nova floating-ip-list
+--------------+--------------------------------------+----------+--------+
| Ip | Instance Id | Fixed Ip | Pool |
+--------------+--------------------------------------+----------+--------+
| 172.24.4.225 | 4a60ff6a-7a3c-49d7-9515-86ae501044c6 | 10.0.0.2 | public |
| 172.24.4.226 | None | None | public |
+--------------+--------------------------------------+----------+--------+
For each floating IP address that is allocated to the current project, the
command outputs the floating IP address, the ID for the instance to which
the floating IP address is assigned, the associated fixed IP address, and the pool from which the floating IP address was allocated.
Associate floating IP addresses
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can assign a floating IP address to a project and to an instance.
#. Run the following command to allocate a floating IP address to the
current project. By default, the floating IP address is allocated from
the public pool. The command outputs the allocated IP address::
$ nova floating-ip-create
+--------------+-------------+----------+--------+
| Ip | Instance Id | Fixed Ip | Pool |
+--------------+-------------+----------+--------+
| 172.24.4.225 | None | None | public |
+--------------+-------------+----------+--------+
.. note::
If more than one IP address pool is available, you can specify from which
pool to allocate the IP address, using the pool's name. For example, to
allocate a floating IP address from the ``test`` pool, run:
.. code::
$ nova floating-ip-create test
#. List all project instances with which a floating IP address could be
associated::
$ nova list
+---------------------+------+---------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+---------------------+------+---------+------------+-------------+------------------+
| d5c854f9-d3e5-4f... | VM1 | ACTIVE | - | Running | private=10.0.0.3 |
| 42290b01-0968-43... | VM2 | SHUTOFF | - | Shutdown | private=10.0.0.4 |
+---------------------+------+---------+------------+-------------+------------------+
#. Associate an IP address with an instance in the project, as follows::
$ nova floating-ip-associate INSTANCE_NAME_OR_ID FLOATING_IP_ADDRESS
For example::
$ nova floating-ip-associate VM1 172.24.4.225
The instance is now associated with two IP addresses::
$ nova list
+------------------+------+--------+------------+-------------+-------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+------------------+------+--------+------------+-------------+-------------------------------+
| d5c854f9-d3e5... | VM1 | ACTIVE | - | Running | private=10.0.0.3, 172.24.4.225|
| 42290b01-0968... | VM2 | SHUTOFF| - | Shutdown | private=10.0.0.4 |
+------------------+------+--------+------------+-------------+-------------------------------+
After you associate the IP address and configure security group rules
for the instance, the instance is publicly available at the floating IP
address.
.. note::
If an instance is connected to multiple networks, you can associate a
floating IP address with a specific fixed IP address using the optional
``--fixed-address`` parameter:
.. code:
$ nova floating-ip-associate --fixed-address FIXED_IP_ADDRESS
INSTANCE_NAME_OR_ID FLOATING_IP_ADDRESS
Disassociate floating IP addresses
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To disassociate a floating IP address from an instance::
$ nova floating-ip-disassociate INSTANCE_NAME_OR_ID FLOATING_IP_ADDRESS
To remove the floating IP address from a project::
$ nova floating-ip-delete FLOATING_IP_ADDRESS
The IP address is returned to the pool of IP addresses that is available
for all projects. If the IP address is still associated with a running
instance, it is automatically disassociated from that instance.

View File

@@ -0,0 +1,16 @@
==============================
Provide user data to instances
==============================
A user data file is a special key in the metadata service that holds a
file that cloud-aware applications in the guest instance can access. For
example, one application that uses user data is the
`cloud-init <https://help.ubuntu.com/community/CloudInit>`__ system,
which is an open-source package from Ubuntu that is available on various
Linux distributions and which handles early initialization of a cloud
instance.
You can place user data in a local file and pass it through the
``--user-data <user-data-file>`` parameter at instance creation::
$ nova boot --image ubuntu-cloudimage --flavor 1 --user-data mydata.file

View File

@@ -0,0 +1,66 @@
==========================
Stop and start an instance
==========================
Use one of the following methods to stop and start an instance.
Pause and unpause an instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To pause an instance, run the following command::
$ nova pause INSTANCE_NAME
This command stores the state of the VM in RAM. A paused instance
continues to run in a frozen state.
To unpause an instance, run the following command::
$ nova unpause INSTANCE_NAME
Suspend and resume an instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To initiate a hypervisor-level suspend operation, run the following
command::
$ nova suspend INSTANCE_NAME
To resume a suspended instance, run the following command::
$ nova resume INSTANCE_NAME
Shelve and unshelve an instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shelving is useful if you have an instance that you are not using, but
would like retain in your list of servers. For example, you can stop an
instance at the end of a work week, and resume work again at the start
of the next week. All associated data and resources are kept; however,
anything still in memory is not retained. If a shelved instance is no
longer needed, it can also be entirely removed.
You can run the following shelving tasks:
- Shelve an instance - Shuts down the instance, and stores it together
with associated data and resources (a snapshot is taken if not volume
backed). Anything in memory is lost.
.. code::
$ nova shelve SERVERNAME
- Unshelve an instance - Restores the instance.
.. code::
$ nova unshelve SERVERNAME
- Remove a shelved instance - Removes the instance from the server;
data and resource associations are deleted. If an instance is no longer
needed, you can move the instance off the hypervisor in order to minimize
resource usage.
.. code::
$ nova shelve-offload SERVERNAME