openstack-manuals/doc/install-guide/source/launch-instance-private.rst
Matthew Kassawara b46b1a5689 [install] Liberty updates for glance
Update glance configuration for Liberty and address some
consistency issues.

Changes and testing specific to distribution packages
primarily involve Ubuntu. Other distributions may require
additional patches.

Change-Id: I6c9696b28fe42f00b8a3f9d7344a9807b74accfb
Implements: blueprint installguide-liberty
2015-10-02 08:53:41 -05:00

14 KiB

Launch an instance on the private network

Determine instance options

To launch an instance, you must at least specify the flavor, image name, network, security group, key, and instance name.

  1. A flavor specifies a virtual resource allocation profile which includes processor, memory, and storage.

    List available flavors:

    $ 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      |
    +-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+

    This instance uses the m1.tiny flavor.

    Note

    You can also reference a flavor by ID.

  2. List available images:

    $ nova image-list
    +--------------------------------------+--------+--------+--------+
    | ID                                   | Name   | Status | Server |
    +--------------------------------------+--------+--------+--------+
    | 38047887-61a7-41ea-9b49-27987d5e8bb9 | cirros | ACTIVE |        |
    +--------------------------------------+--------+--------+--------+

    This instance uses the cirros image.

  3. List available networks:

    $ neutron net-list
    +--------------------------------------+---------+----------------------------------------------------+
    | id                                   | name    | subnets                                            |
    +--------------------------------------+---------+----------------------------------------------------+
    | 0e62efcd-8cee-46c7-b163-d8df05c3c5ad | public  | 5cc70da8-4ee7-4565-be53-b9c011fca011 10.3.31.0/24  |
    | 7c6f9b37-76b4-463e-98d8-27e5686ed083 | private | 3482f524-8bff-4871-80d4-5774c2730728 172.16.1.0/24 |
    +--------------------------------------+---------+----------------------------------------------------+

    This instance uses the private project network. However, you must reference this network using the ID instead of the name.

  4. List available security groups:

    $ nova secgroup-list
    +--------------------------------------+---------+-------------+
    | Id                                   | Name    | Description |
    +--------------------------------------+---------+-------------+
    | ad8d4ea5-3cad-4f7d-b164-ada67ec59473 | default | default     |
    +--------------------------------------+---------+-------------+

    This instance uses the default security group.

  5. Launch the instance:

    Replace PRIVATE_NET_ID with the ID of the private project network.

    $ nova boot --flavor m1.tiny --image cirros --nic net-id=PRIVATE_NET_ID \
      --security-group default --key-name mykey private-instance
    +--------------------------------------+-----------------------------------------------+
    | Property                             | Value                                         |
    +--------------------------------------+-----------------------------------------------+
    | OS-DCF:diskConfig                    | MANUAL                                        |
    | OS-EXT-AZ:availability_zone          | nova                                          |
    | OS-EXT-STS:power_state               | 0                                             |
    | OS-EXT-STS:task_state                | scheduling                                    |
    | OS-EXT-STS:vm_state                  | building                                      |
    | OS-SRV-USG:launched_at               | -                                             |
    | OS-SRV-USG:terminated_at             | -                                             |
    | accessIPv4                           |                                               |
    | accessIPv6                           |                                               |
    | adminPass                            | oMeLMk9zVGpk                                  |
    | config_drive                         |                                               |
    | created                              | 2015-09-17T22:36:05Z                          |
    | flavor                               | m1.tiny (1)                                   |
    | hostId                               |                                               |
    | id                                   | 113c5892-e58e-4093-88c7-e33f502eaaa4          |
    | image                                | cirros (38047887-61a7-41ea-9b49-27987d5e8bb9) |
    | key_name                             | mykey                                         |
    | metadata                             | {}                                            |
    | name                                 | private-instance                              |
    | os-extended-volumes:volumes_attached | []                                            |
    | progress                             | 0                                             |
    | security_groups                      | default                                       |
    | status                               | BUILD                                         |
    | tenant_id                            | f5b2ccaa75ac413591f12fcaa096aa5c              |
    | updated                              | 2015-09-17T22:36:05Z                          |
    | user_id                              | 684286a9079845359882afc3aa5011fb              |
    +--------------------------------------+-----------------------------------------------+
  6. Check the status of your instance:

    $ nova list
    +--------------------------------------+------------------+--------+------------+-------------+----------------------+
    | ID                                   | Name             | Status | Task State | Power State | Networks             |
    +--------------------------------------+------------------+--------+------------+-------------+----------------------+
    | 113c5892-e58e-4093-88c7-e33f502eaaa4 | private-instance | ACTIVE | -          | Running     | private=172.16.1.3   |
    | 181c52ba-aebc-4c32-a97d-2e8e82e4eaaf | public-instance  | ACTIVE | -          | Running     | public=203.0.113.103 |
    +--------------------------------------+------------------+--------+------------+-------------+----------------------+

    The status changes from BUILD to ACTIVE when the build process successfully completes.

Access the instance using a virtual console

  1. Obtain a Virtual Network Computing (VNC) session URL for your instance and access it from a web browser:

    $ nova get-vnc-console private-instance novnc
    +-------+------------------------------------------------------------------------------------+
    | Type  | Url                                                                                |
    +-------+------------------------------------------------------------------------------------+
    | novnc | http://controller:6080/vnc_auto.html?token=2f6dd985-f906-4bfc-b566-e87ce656375b    |
    +-------+------------------------------------------------------------------------------------+

    Note

    If your web browser runs on a host that cannot resolve the controller host name, you can replace controller with the IP address of the management interface on your controller node.

    The CirrOS image includes conventional user name/password authentication and provides these credentials at the login prompt. After logging into CirrOS, we recommend that you verify network connectivity using ping.

    1. Verify access to the private project network gateway:

      $ ping -c 4 172.16.1.1
      PING 172.16.1.1 (172.16.1.1) 56(84) bytes of data.
      64 bytes from 172.16.1.1: icmp_req=1 ttl=64 time=0.357 ms
      64 bytes from 172.16.1.1: icmp_req=2 ttl=64 time=0.473 ms
      64 bytes from 172.16.1.1: icmp_req=3 ttl=64 time=0.504 ms
      64 bytes from 172.16.1.1: icmp_req=4 ttl=64 time=0.470 ms
      
      --- 172.16.1.1 ping statistics ---
      4 packets transmitted, 4 received, 0% packet loss, time 2998ms
      rtt min/avg/max/mdev = 0.357/0.451/0.504/0.055 ms
    2. Verify access to the internet:

      $ ping -c 4 openstack.org
      PING openstack.org (174.143.194.225) 56(84) bytes of data.
      64 bytes from 174.143.194.225: icmp_req=1 ttl=53 time=17.4 ms
      64 bytes from 174.143.194.225: icmp_req=2 ttl=53 time=17.5 ms
      64 bytes from 174.143.194.225: icmp_req=3 ttl=53 time=17.7 ms
      64 bytes from 174.143.194.225: icmp_req=4 ttl=53 time=17.5 ms
      
      --- openstack.org ping statistics ---
      4 packets transmitted, 4 received, 0% packet loss, time 3003ms
      rtt min/avg/max/mdev = 17.431/17.575/17.734/0.143 ms

Access the instance remotely

  1. Create a floating IP address on the public provider network:

    $ neutron floatingip-create public
    Created a new floatingip:
    +---------------------+--------------------------------------+
    | Field               | Value                                |
    +---------------------+--------------------------------------+
    | fixed_ip_address    |                                      |
    | floating_ip_address | 203.0.113.104                        |
    | floating_network_id | 9bce64a3-a963-4c05-bfcd-161f708042d1 |
    | id                  | 05e36754-e7f3-46bb-9eaa-3521623b3722 |
    | port_id             |                                      |
    | router_id           |                                      |
    | status              | DOWN                                 |
    | tenant_id           | 7cf50047f8df4824bc76c2fdf66d11ec     |
    +---------------------+--------------------------------------+
  2. Associate the floating IP address with the instance:

    $ nova floating-ip-associate private-instance 203.0.113.104

    Note

    This command provides no output.

  3. Check the status of your floating IP address:

    $ nova list
    +--------------------------------------+------------------+--------+------------+-------------+-----------------------------------+
    | ID                                   | Name             | Status | Task State | Power State | Networks                          |
    +--------------------------------------+------------------+--------+------------+-------------+-----------------------------------+
    | 113c5892-e58e-4093-88c7-e33f502eaaa4 | private-instance | ACTIVE | -          | Running     | private=172.16.1.3, 203.0.113.104 |
    | 181c52ba-aebc-4c32-a97d-2e8e82e4eaaf | public-instance  | ACTIVE | -          | Running     | public=203.0.113.103              |
    +--------------------------------------+------------------+--------+------------+-------------+-----------------------------------+
  4. Verify connectivity to the instance via floating IP address from the controller node or any host on the public physical network:

    $ ping -c 4 203.0.113.104
    PING 203.0.113.104 (203.0.113.104) 56(84) bytes of data.
    64 bytes from 203.0.113.104: icmp_req=1 ttl=63 time=3.18 ms
    64 bytes from 203.0.113.104: icmp_req=2 ttl=63 time=0.981 ms
    64 bytes from 203.0.113.104: icmp_req=3 ttl=63 time=1.06 ms
    64 bytes from 203.0.113.104: icmp_req=4 ttl=63 time=0.929 ms
    
    --- 203.0.113.104 ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 3002ms
    rtt min/avg/max/mdev = 0.929/1.539/3.183/0.951 ms
  5. Access your instance using SSH from the controller node or any host on the public physical network:

    $ ssh cirros@203.0.113.104
    The authenticity of host '203.0.113.104 (203.0.113.104)' can't be established.
    RSA key fingerprint is ed:05:e9:e7:52:a0:ff:83:68:94:c7:d1:f2:f8:e2:e9.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '203.0.113.104' (RSA) to the list of known hosts.
    $

    Note

    If your host does not contain the public/private key pair created in an earlier step, SSH prompts for the default password associated with the cirros user, cubswin:).

If your instance does not launch or seem to work as you expect, see the OpenStack Operations Guide for more information or use one of the many other options <common/app_support> to seek assistance. We want your first installation to work!

Return to Launch an instance <launch-instance-complete>.