Removed deprecated *-floating-ip from procedures

Switched out 'nova add-floating-ip' for 'nova floating-ip-associate'
and 'nova remove-floating-ip' for 'nova floating-ip-disassociate'.
Redid basic descriptions in End User Guide, and removed from Admin
User Guide.
Added floating-IP-bulk* procedures to the Admin User Guide (as the
only admin-specific procedures). Added references to EUG and CAG to
Admin User Guide.

Change-Id: I7076ff26a369aa8615eb68350df8823ffe841a84
This commit is contained in:
Summer Long 2014-05-01 10:13:37 +10:00 committed by Anne Gentle
parent 8ae3041776
commit e1185730aa
3 changed files with 204 additions and 206 deletions

View File

@ -1926,11 +1926,11 @@
project, use the nova list command.</para> project, use the nova list command.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>$ nova add-floating-ip INSTANCE_NAME_OR_ID <para>$ nova floating-ip-associate INSTANCE_NAME_OR_ID
FLOATING_IP</para> FLOATING_IP</para>
</listitem> </listitem>
<listitem> <listitem>
<para>After you assign the IP with nova add-floating-ipand <para>After you assign the IP with nova floating-ip-associate, and
configure security group rules for the instance, the configure security group rules for the instance, the
instance is publicly available at the floating IP instance is publicly available at the floating IP
address.</para> address.</para>
@ -1944,7 +1944,7 @@
the IP.</para> the IP.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>$ nova remove-floating-ip INSTANCE_NAME_OR_ID <para>$ nova floating-ip-disassociate INSTANCE_NAME_OR_ID
FLOATING_IP</para> FLOATING_IP</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>

View File

@ -4,131 +4,105 @@
xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"> xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<title>Manage IP addresses</title> <title>Manage IP addresses</title>
<para>Each instance can have a private, or <emphasis role="italic" <para>Each instance has a private, fixed IP address (assigned when launched) and can also have a
>fixed</emphasis>, IP address and an IP address, often public, or floating, address. Private IP addresses are used for communication between
public, that is movable from instance to instance called a instances, and public addresses are used for communication with networks outside the cloud,
<emphasis role="italic">floating</emphasis> IP including the Internet.</para>
address.</para> <para>
<para>Private IP addresses are used for communication between <itemizedlist>
instances and public ones are used for communication with the <listitem>
outside world.</para> <para>By default, both administrative and end users can associate floating IP
<para>When you launch an instance, it is automatically assigned a addresses with projects and instances. You can change user permissions for
private IP address that stays the same until you explicitly managing IP addresses by updating the <filename>/etc/nova/policy.json</filename>
terminate the instance. Rebooting an instance has no effect on file. For basic floating-IP procedures, refer to the <citetitle>Manage IP
its private IP address.</para> Addresses</citetitle> section in the <link
<para>The cloud operator must configure a pool of floating IP xlink:href="http://docs.openstack.org/user-guide/content/"
addresses. Then, you can allocate a certain number of floating ><citetitle>OpenStack End User Guide</citetitle></link>.</para>
IP addresses from this pool to a project. A project quota </listitem>
defines the maximum number of floating IP addresses for the <listitem>
project.</para> <para>For details on creating public networks using OpenStack Networking
<para>You can add a floating IP address from this pool to an (<systemitem>neutron</systemitem>), refer to the <link
instance in the project. You can dynamically associate xlink:href="http://docs.openstack.org/admin-guide-cloud/content/"
floating IP addresses with or disassociate floating IP ><citetitle>OpenStack Cloud Administrator Guide</citetitle></link>. No
addresses from instances in the same project at any floating IP addresses are created by default in OpenStack Networking.</para>
time.</para> </listitem>
<para>Before you can assign a floating IP address to an instance, </itemizedlist>
you must allocate floating IP addresses to a project. After </para>
you allocate floating IP addresses to the current project, you <para>As an administrator using legacy networking (<systemitem>nova-network</systemitem>), you
can assign them to running instances.</para> can use the following bulk commands to list, create, and delete ranges of floating IP
<para>You can assign one floating IP address to only one instance addresses. These addresses can then be associated with instances by end users:</para>
at a time. Use the <command>nova *floating-ip-*</command> <variablelist>
commands to manage floating IP addresses.</para> <varlistentry><term>List addresses for all projects</term>
<procedure> <listitem><para>To list all floating IP addresses for all projects, run:</para>
<title>To manage floating IP addresses</title> <screen><prompt>$</prompt> <userinput>nova floating-ip-bulk-list</userinput>
<step> <computeroutput>+------------+---------------+---------------+--------+-----------+
<para>To list the floating IP address pools:</para> | project_id | address | instance_uuid | pool | interface |
<screen><prompt>$</prompt> <userinput>nova floating-ip-pool-list</userinput> +------------+---------------+---------------+--------+-----------+
<computeroutput>+--------+ | None | 172.24.4.225 | None | public | eth0 |
| name | | None | 172.24.4.226 | None | public | eth0 |
+--------+ | None | 172.24.4.227 | None | public | eth0 |
| public | | None | 172.24.4.228 | None | public | eth0 |
| test | | None | 172.24.4.229 | None | public | eth0 |
+--------+</computeroutput></screen> | None | 172.24.4.230 | None | public | eth0 |
<note> | None | 172.24.4.231 | None | public | eth0 |
<para>If this list is empty, the cloud operator must configure a pool of floating IP | None | 172.24.4.232 | None | public | eth0 |
addresses.</para> | None | 172.24.4.233 | None | public | eth0 |
</note> | None | 172.24.4.234 | None | public | eth0 |
</step> | None | 172.24.4.235 | None | public | eth0 |
<step> | None | 172.24.4.236 | None | public | eth0 |
<para>To allocate a floating IP address to the current | None | 172.24.4.237 | None | public | eth0 |
project:</para> | None | 172.24.4.238 | None | public | eth0 |
<screen><prompt>$</prompt> <userinput>nova floating-ip-create</userinput> | None | 192.168.253.1 | None | test | eth0 |
<computeroutput>+--------------+-------------+----------+--------+ | None | 192.168.253.2 | None | test | eth0 |
| Ip | Instance Id | Fixed Ip | Pool | | None | 192.168.253.3 | None | test | eth0 |
+--------------+-------------+----------+--------+ | None | 192.168.253.4 | None | test | eth0 |
| 172.24.4.226 | None | None | public | | None | 192.168.253.5 | None | test | eth0 |
+--------------+-------------+----------+--------+</computeroutput></screen> | None | 192.168.253.6 | None | test | eth0 |
<para>By default, the floating IP address is allocated +------------+---------------+---------------+--------+-----------+</computeroutput></screen></listitem>
from the <literal>public</literal> pool. The command </varlistentry>
shows the allocated IP address.</para> <varlistentry><term>Bulk create floating IP addresses</term>
<para>If more than one IP address pool is available, you <listitem><para>To create a range of floating IP addresses, run:</para>
can specify the pool from which to allocate the <para>
address:</para> <screen><prompt>$</prompt> <userinput>nova floating-ip-bulk-create [--pool <replaceable>POOL_NAME</replaceable>] [--interface <replaceable>INTERFACE</replaceable>] <replaceable>RANGE_TO_CREATE</replaceable></userinput></screen>
<screen><prompt>$</prompt> <userinput>nova floating-ip-create <replaceable>POOL_NAME</replaceable></userinput></screen> </para>
</step> <para>For example:</para>
<step> <screen><prompt>$</prompt> <userinput>nova floating-ip-bulk-create --pool test 192.168.1.56/29</userinput></screen>
<para>To list floating IP addresses that are allocated to <para>By default, <command>floating-ip-bulk-create</command> uses the
the current project:</para> <systemitem>public</systemitem> pool and <systemitem>eth0</systemitem>
<screen><prompt>$</prompt> <userinput>nova floating-ip-list</userinput> interface values.</para>
<computeroutput>+--------------+--------------------------------------+----------+--------+ <para>
| Ip | Instance Id | Fixed Ip | Pool | <note>
+--------------+--------------------------------------+----------+--------+ <para>You should use a range of free IP addresses that is correct for your
| 172.24.4.225 | 4a60ff6a-7a3c-49d7-9515-86ae501044c6 | 10.0.0.2 | public | network. If you are not sure, at least try to avoid the DHCP address
| 172.24.4.226 | None | None | public | range:</para>
+--------------+--------------------------------------+----------+--------+</computeroutput></screen> <para>
<para>For each floating IP address that is allocated to <itemizedlist>
the current project, the command shows the floating IP <listitem>
address, the ID for the instance to which the floating <para>Pick a small range (/29 gives an 8 address range, 6 of
IP address is assigned, the associated fixed IP which will be usable)</para>
address, and the pool from which the floating IP </listitem>
address was allocated.</para> <listitem>
</step> <para>Use <command>nmap</command> to check a range's
<step> availability. For example, 192.168.1.56/29 represents a
<para>To associate a floating IP address with an instance, small range of addresses (192.168.1.56-63, with 57-62
first allocate that address to the current usable), and you could run the command <command>nmap -sn
project:</para> 192.168.1.56/29</command> to check whether the entire
<screen><prompt>$</prompt> <userinput>nova floating-ip-create</userinput> range is currently unused.</para>
<computeroutput>+--------------+-------------+----------+--------+ </listitem>
| Ip | Instance Id | Fixed Ip | Pool | </itemizedlist>
+--------------+-------------+----------+--------+ </para>
| 172.24.4.226 | None | None | public | </note>
+--------------+-------------+----------+--------+</computeroutput></screen> </para>
<para>List instances to get the instance ID:</para> </listitem>
<screen><prompt>$</prompt> <userinput>nova list</userinput> </varlistentry>
<computeroutput>+--------------------------------------+-------------+--------+------------+-------------+--------------------------------+ <varlistentry><term>Bulk delete floating IP addresses</term>
| ID | Name | Status | Task State | Power State | Networks | <listitem><para>To delete a range of floating IP addresses, run:</para>
+--------------------------------------+-------------+--------+------------+-------------+--------------------------------+ <para>
| 4a60ff6a-7a3c-49d7-9515-86ae501044c6 | my-instance | ACTIVE | None | Running | private=10.0.0.2, 172.24.4.225 | <screen><prompt>$</prompt> <userinput>nova floating-ip-bulk-delete <replaceable>RANGE_TO_DELETE</replaceable></userinput></screen>
+--------------------------------------+-------------+--------+------------+-------------+--------------------------------+</computeroutput></screen> </para>
<para>Then, assign the floating IP address to the <para>For example:</para>
instance, as follows:</para> <screen><prompt>$</prompt> <userinput>nova floating-ip-bulk-delete 192.168.1.56/29</userinput></screen>
<screen><prompt>$</prompt> <userinput>nova add-floating-ip my-instance 172.24.4.226</userinput></screen> </listitem>
<para>Notice that the instance is now associated with two </varlistentry>
floating IP addresses:</para> </variablelist>
<screen><prompt>$</prompt> <userinput>nova list</userinput>
<computeroutput>+--------------------------------------+-------------+--------+------------+-------------+----------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------------+--------+------------+-------------+----------------------------------------------+
| 4a60ff6a-7a3c-49d7-9515-86ae501044c6 | my-instance | ACTIVE | None | Running | private=10.0.0.2, 172.24.4.225, 172.24.4.226 |
+--------------------------------------+-------------+--------+------------+-------------+----------------------------------------------+</computeroutput></screen>
<para>To assign a fixed IP address to a floating IP
address that you assign to an instance, add the fixed
IP address as an optional parameter:</para>
<screen><prompt>$</prompt> <userinput>nova add-floating-ip --fixed-address=<replaceable>FIXED_IP_ADDRESS</replaceable> <replaceable>INSTANCE_NAME_OR_ID</replaceable> <replaceable>FLOATING_IP_ADDRESS</replaceable></userinput></screen>
<para>After you assign the floating IP address and
configure security group rules for the instance, the
instance is publicly available at the floating IP
address.</para>
</step>
<step>
<para>To release a floating IP address from the current
project:</para>
<screen><prompt>$</prompt> <userinput>nova floating-ip-delete <replaceable>FLOATING_IP_ADDRESS</replaceable></userinput></screen>
<para>The floating IP address is returned to the floating
IP address pool that is available to all projects. If
a floating IP address is assigned to a running
instance, it is automatically disassociated from that
instance.</para>
</step>
</procedure>
</section> </section>

View File

@ -4,111 +4,135 @@
xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"> xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<title>Manage IP addresses</title> <title>Manage IP addresses</title>
<para>Each instance can have a private, or fixed, IP address and a <para>Each instance has a private, fixed IP address and can also have a public, or floating,
public, or floating, one.</para> address. Private IP addresses are used for communication between instances, and public
<para>Private IP addresses are used for communication between instances, and addresses are used for communication with networks outside the cloud, including the
public ones are used for communication with networks outside the cloud, Internet.</para>
including the Internet.</para>
<para>When you launch an instance, it is automatically assigned a <para>When you launch an instance, it is automatically assigned a
private IP address that stays the same until you explicitly private IP address that stays the same until you explicitly
terminate the instance. Rebooting an instance has no effect on terminate the instance. Rebooting an instance has no effect on
the private IP address.</para> the private IP address.</para>
<para>A pool of floating IP addresses, configured by the cloud operator, is <para>A pool of floating IP addresses, configured by the cloud administrator, is available in
available in OpenStack Compute. You can allocate a certain number of OpenStack Compute. The project quota defines the maximum number of floating IP addresses
these IP addresses to a project. The maximum number of floating IP that you can allocate to the project. After you allocate a floating IP address to a project,
addresses per project is defined by the quota.</para> you can:</para>
<para>After you allocate floating IP addresses to a project, you can add a <para>
floating IP address from this set to an instance of the project. You can <itemizedlist>
assign a floating IP address to one instance at a time. Floating IP <listitem>
addresses can be disassociated from an instance and associated with <para>Associate the floating IP address with an instance of the project. Only one
another instance of the same project at any time.</para> floating IP address can be allocated to an instance at any given time.</para>
</listitem>
<listitem>
<para>Disassociate a floating IP address from an instance in the project.</para>
</listitem>
<listitem>
<para>Delete a floating IP from the project; deleting a floating IP automatically
deletes that IP's associations.</para>
</listitem>
</itemizedlist>
</para>
<para>Use the <command>nova floating-ip-*</command> commands to manage floating IP
addresses.</para>
<section xml:id="floating_ips_proc"> <section xml:id="floating_ips_proc">
<title>List floating IP address information</title> <title>List floating IP address information</title>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>To list all floating IP addresses, run the following <para>To list all pools that provide floating IP addresses, run:</para>
command:</para> <screen><prompt>$</prompt> <userinput>nova floating-ip-pool-list</userinput>
<screen><prompt>$</prompt> <userinput>nova floating-ip-bulk-list</userinput> <computeroutput>+--------+
<computeroutput>+------------+---------------+---------------+--------+-----------+
| project_id | address | instance_uuid | pool | interface |
+------------+---------------+---------------+--------+-----------+
| None | 172.24.4.225 | None | public | eth0 |
| None | 172.24.4.226 | None | public | eth0 |
| None | 172.24.4.227 | None | public | eth0 |
| None | 172.24.4.228 | None | public | eth0 |
| None | 172.24.4.229 | None | public | eth0 |
| None | 172.24.4.230 | None | public | eth0 |
| None | 172.24.4.231 | None | public | eth0 |
| None | 172.24.4.232 | None | public | eth0 |
| None | 172.24.4.233 | None | public | eth0 |
| None | 172.24.4.234 | None | public | eth0 |
| None | 172.24.4.235 | None | public | eth0 |
| None | 172.24.4.236 | None | public | eth0 |
| None | 172.24.4.237 | None | public | eth0 |
| None | 172.24.4.238 | None | public | eth0 |
| None | 192.168.253.1 | None | test | eth0 |
| None | 192.168.253.2 | None | test | eth0 |
| None | 192.168.253.3 | None | test | eth0 |
| None | 192.168.253.4 | None | test | eth0 |
| None | 192.168.253.5 | None | test | eth0 |
| None | 192.168.253.6 | None | test | eth0 |
+------------+---------------+---------------+--------+-----------+</computeroutput></screen>
</listitem>
<listitem>
<para>To list all pools that provide floating IP addresses, run
the following command:</para>
<screen><prompt>$</prompt> <userinput>nova floating-ip-pool-list</userinput></screen>
<screen><computeroutput>+--------+
| name | | name |
+--------+ +--------+
| public | | public |
| test | | test |
+--------+</computeroutput></screen> +--------+</computeroutput></screen>
<note><para>If this list is empty, the cloud administrator must configure a pool of floating IP
addresses.</para></note>
</listitem>
<listitem><para>To list all floating IP addresses that are allocated to the current project, run:</para>
<screen><prompt>$</prompt> <userinput>nova floating-ip-list</userinput>
<computeroutput>+--------------+--------------------------------------+----------+--------+
| 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 |
+--------------+--------------------------------------+----------+--------+</computeroutput></screen>
<para>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.</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</section> </section>
<section xml:id="floating_ip_allocate"> <section xml:id="floating_ip_allocate">
<title>Assign floating IP addresses</title> <title>Associate floating IP addresses</title>
<para>You can assign floating IP addresses to a project and to an <para>You can assign a floating IP address to a project and to an instance.</para>
instance.</para>
<procedure> <procedure>
<step> <step>
<para>Run the following command to allocate a floating IP <para>Run the following command to allocate a floating IP address to the current
address to the current project. If more than one IP address project. By default, the floating IP address is allocated from the
pool is available, you can specify the pool from which to <systemitem>public</systemitem> pool. The command outputs the allocated IP
allocate the IP address. This example specifies the address.</para>
<literal>public</literal> pool:</para> <screen><prompt>$</prompt> <userinput>nova floating-ip-create</userinput>
<screen><prompt>$</prompt> <userinput>nova floating-ip-create public</userinput></screen> <computeroutput>+--------------+-------------+----------+--------+
<screen><computeroutput>+--------------+-------------+----------+--------+
| Ip | Instance Id | Fixed Ip | Pool | | Ip | Instance Id | Fixed Ip | Pool |
+--------------+-------------+----------+--------+ +--------------+-------------+----------+--------+
| 172.24.4.225 | None | None | public | | 172.24.4.225 | None | None | public |
+--------------+-------------+----------+--------+</computeroutput></screen> +--------------+-------------+----------+--------+</computeroutput></screen>
<note><para>If more than one IP address pool is available, you can specify the pool from which to allocate
the IP address, using the pool's name. For example, to allocate a floating
IP address from the <literal>test</literal> pool, run:</para>
<screen><prompt>$</prompt> <userinput>nova floating-ip-create test</userinput></screen>
</note>
</step> </step>
<step> <step>
<para>After at least one floating IP address is allocated to the <para>List all project instances with which a floating IP address could be
project, assign an IP address to an instance in the project, associated:</para>
as follows:</para> <screen><prompt>$</prompt> <userinput>nova list</userinput>
<screen><prompt>$</prompt> <userinput>nova add-floating-ip <replaceable>INSTANCE_NAME_OR_ID</replaceable> <replaceable>FLOATING_IP</replaceable></userinput></screen> <computeroutput>+--------------------------------------+------+---------+------------+-------------+------------------+
<para>After you assign the IP address and configure | ID | Name | Status | Task State | Power State | Networks |
security group rules for the instance, the +--------------------------------------+------+---------+------------+-------------+------------------+
instance is publicly available at the floating IP | d5c854f9-d3e5-4fce-94d9-3d9f9f8f2987 | VM1 | ACTIVE | - | Running | private=10.0.0.3 |
address.</para> | 42290b01-0968-4313-831f-3b489a63433f | VM2 | SHUTOFF | - | Shutdown | private=10.0.0.4 |
+--------------------------------------+------+---------+------------+-------------+------------------+</computeroutput></screen>
</step> </step>
<step> <step>
<para>To remove a floating IP address from an instance, specify <para>Associate an IP address with an instance in the project, as follows:</para>
the same arguments that you used to assign the IP address, <screen><prompt>$</prompt> <userinput>nova floating-ip-associate <replaceable>INSTANCE_NAME_OR_ID</replaceable> <replaceable>FLOATING_IP_ADDRESS</replaceable></userinput></screen>
but run the following command:</para> <para>For example:</para>
<screen><prompt>$</prompt> <userinput>nova remove-floating-ip <replaceable>INSTANCE_NAME_OR_ID</replaceable> <replaceable>FLOATING_IP</replaceable></userinput></screen> <para>
<screen><prompt>$</prompt> <userinput>nova floating-ip-associate VM1 172.24.4.225</userinput></screen>
</para>
<para>Notice that the instance is now associated with two IP addresses:</para>
<screen><prompt>$</prompt> <userinput>nova list</userinput>
<computeroutput>+--------------------------------------+------+---------+------------+-------------+--------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+---------+------------+-------------+--------------------------------+
| d5c854f9-d3e5-4fce-94d9-3d9f9f8f2987 | VM1 | ACTIVE | - | Running | private=10.0.0.3, 172.24.4.225 |
| 42290b01-0968-4313-831f-3b489a63433f | VM2 | SHUTOFF | - | Shutdown | private=10.0.0.4 |
+--------------------------------------+------+---------+------------+-------------+--------------------------------+</computeroutput></screen>
<para>After you associate the IP address and configure security group rules for the instance, the instance is
publicly available at the floating IP address.</para>
<note><para>If an instance is connected to multiple networks, you can associate a floating IP
address with a specific fixed IP address using the optional
<parameter>--fixed-address</parameter> parameter:</para>
<screen><prompt>$</prompt> <userinput>nova floating-ip-associate --fixed-address=<replaceable>FIXED_IP_ADDRESS</replaceable> <replaceable>INSTANCE_NAME_OR_ID</replaceable> <replaceable>FLOATING_IP_ADDRESS</replaceable></userinput></screen>
</note>
</step>
</procedure>
</section>
<section xml:id="floating_ip_disassociate">
<title>Disassociate floating IP addresses</title>
<procedure>
<step>
<para>Release a floating IP address from an instance, as follows:</para>
<screen><prompt>$</prompt> <userinput>nova floating-ip-disassociate <replaceable>INSTANCE_NAME_OR_ID</replaceable> <replaceable>FLOATING_IP_ADDRESS</replaceable></userinput></screen>
</step> </step>
<step> <step>
<para>To release a floating IP address from the current project, <para>Release the floating IP address from the current project, as follows:</para>
run the following command:</para> <screen><prompt>$</prompt> <userinput>nova floating-ip-delete <replaceable>FLOATING_IP_ADDRESS</replaceable></userinput></screen>
<screen><prompt>$</prompt> <userinput>nova floating-ip-delete <replaceable>FLOATING_IP</replaceable></userinput></screen> <para>The IP address is returned to the pool of IP addresses that is available for
<para>The IP address is returned to the pool of IP addresses all projects. If the IP address is still associated with a running instance, it
that are available for all projects. If an IP address is is automatically disassociated from that instance.</para>
assigned to a running instance, it is disassociated from the
instance.</para>
</step> </step>
</procedure> </procedure>
</section> </section>