Merge "[ops-guide] Replace "nova boot" with "openstack server create""

This commit is contained in:
Jenkins 2016-12-08 02:30:51 +00:00 committed by Gerrit Code Review
commit cf4345bab1
3 changed files with 86 additions and 74 deletions

View File

@ -277,7 +277,7 @@ When you join the screen session that ``stack.sh`` starts with
.. code-block:: console .. code-block:: console
$ nova boot --flavor 1 --image $IMAGE_ID scheduler-test $ openstack server create --flavor 1 --image $IMAGE_ID scheduler-test
#. Switch back to the ``n-sch`` screen. Among the log statements, you'll #. Switch back to the ``n-sch`` screen. Among the log statements, you'll
see the line: see the line:

View File

@ -370,46 +370,47 @@ using neutron ports which contain the IPv4 & IPv6 address.
.. code-block:: console .. code-block:: console
$ nova boot --flavor m1.medium --image ubuntu.qcow2 --key-name team_key \ $ openstack server create --flavor m1.medium --image ubuntu.qcow2 \
--nic port-id=PORT_ID "example-fqdn-01.sys.example.com" --key-name team_key --nic port-id=PORT_ID \
"example-fqdn-01.sys.example.com"
#. Verify the instance has the correct IP address: #. Verify the instance has the correct IP address:
.. code-block:: console .. code-block:: console
+-------------------------------------+-----------------------------------------------------------+ +--------------------------------------+----------------------------------------------------------+
| Property | Value | | Field | Value |
+-------------------------------------+-----------------------------------------------------------+ +--------------------------------------+----------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL | | OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova | | OS-EXT-AZ:availability_zone | nova |
| OS-EXT-SRV-ATTR:host | os_compute-1 | | OS-EXT-SRV-ATTR:host | os_compute-1 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | os_compute.ece.example.com | | OS-EXT-SRV-ATTR:hypervisor_hostname | os_compute.ece.example.com |
| OS-EXT-SRV-ATTR:instance_name | instance-00012b82 | | OS-EXT-SRV-ATTR:instance_name | instance-00012b82 |
| OS-EXT-STS:power_state | 1 | | OS-EXT-STS:power_state | Running |
| OS-EXT-STS:task_state | - | | OS-EXT-STS:task_state | None |
| OS-EXT-STS:vm_state | active | | OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2016-07-26T21:27:04.000000 | | OS-SRV-USG:launched_at | 2016-11-30T08:55:27.000000 |
| OS-SRV-USG:terminated_at | - | | OS-SRV-USG:terminated_at | None |
| Public_AGILE network | 2001:558:fc0b:100:f816:3eff:fefb:65fc, 96.118.182.107 | | accessIPv4 | |
| accessIPv4 | | | accessIPv6 | |
| accessIPv6 | | | addresses | public=172.24.4.236 |
| config_drive | | | config_drive | |
| created | 2016-07-26T21:26:42Z | | created | 2016-11-30T08:55:14Z |
| flavor | m1.medium (103) | | flavor | m1.medium (103) |
| hostId | b0a4684922bce321770daf033032d9115fe3e13190191bf01dbc357a | | hostId | aca973d5b7981faaf8c713a0130713bbc1e64151be65c8dfb53039f7 |
| id | 9ff9a672-d496-470a-84a7-284799a777fd | | id | f91bd761-6407-46a6-b5fd-11a8a46e4983 |
| image | Example Cloud Ubuntu 14.04 x86_64 v2.5 (fb49d7e1-273b-... | | image | Example Cloud Ubuntu 14.04 x86_64 v2.5 (fb49d7e1-273b-...|
| key_name | team_key | | key_name | team_key |
| metadata | {} | | name | example-fqdn-01.sys.example.com |
| name | example-fqdn-01.sys.example.com | | os-extended-volumes:volumes_attached | [] |
| os-extended-volumes:volumes_attached| [] | | progress | 0 |
| progress | 0 | | project_id | 2daf82a578e9437cab396c888ff0ca57 |
| security_groups | default | | properties | |
| status | ACTIVE | | security_groups | [{u'name': u'default'}] |
| tenant_id | 52f0574689f14c8a99e7ca22c4eb5720 | | status | ACTIVE |
| updated | 2016-07-26T21:27:04Z | | updated | 2016-11-30T08:55:27Z |
| user_id | e37b87cb8d784cc3a85e475f67b32ab5 | | user_id | 8cbea24666ae49bbb8c1641f9b12d2d2 |
+-------------------------------------+-----------------------------------------------------------+ +--------------------------------------+----------------------------------------------------------+
#. Check the port connection using the netcat utility: #. Check the port connection using the netcat utility:

View File

@ -1615,7 +1615,7 @@ On the command line, do this:
.. code-block:: console .. code-block:: console
$ nova boot --flavor <flavor> --image <image> <name> $ openstack server create --flavor FLAVOR --image IMAGE NAME
There are a number of optional items that can be specified. You should There are a number of optional items that can be specified. You should
read the rest of this section before trying to start an instance, but read the rest of this section before trying to start an instance, but
@ -1739,51 +1739,60 @@ your command line. For example:
.. code-block:: console .. code-block:: console
$ nova boot --image ubuntu-cloudimage --flavor 2 --key-name mykey myimage $ openstack server create --image ubuntu-cloudimage --flavor 2 \
--key-name mykey myimage
When booting a server, you can also add arbitrary metadata so that you When booting a server, you can also add arbitrary metadata so that you
can more easily identify it among other running instances. Use the can more easily identify it among other running instances. Use the
:option:`--meta` option with a key-value pair, where you can make up the :option:`--property` option with a key-value pair, where you can make up
string for both the key and the value. For example, you could add a the string for both the key and the value. For example, you could add a
description and also the creator of the server: description and also the creator of the server:
.. code-block:: console .. code-block:: console
$ nova boot --image=test-image --flavor=1 \ $ openstack server create --image=test-image --flavor=1 \
--meta description='Small test image' smallimage --property description='Small test image' smallimage
When viewing the server information, you can see the metadata included When viewing the server information, you can see the metadata included
on the metadata line: on the metadata line:
.. code-block:: console .. code-block:: console
$ nova show smallimage $ openstack server show smallimage
+------------------------+-----------------------------------------+
| Property | Value | +--------------------------------------+----------------------------------------------------------+
+------------------------+-----------------------------------------+ | Field | Value |
| OS-DCF:diskConfig | MANUAL | +--------------------------------------+----------------------------------------------------------+
| OS-EXT-STS:power_state | 1 | | OS-DCF:diskConfig | MANUAL |
| OS-EXT-STS:task_state | None | | OS-EXT-AZ:availability_zone | nova |
| OS-EXT-STS:vm_state | active | | OS-EXT-SRV-ATTR:host | rdo-newton.novalocal |
| accessIPv4 | | | OS-EXT-SRV-ATTR:hypervisor_hostname | rdo-newton.novalocal |
| accessIPv6 | | | OS-EXT-SRV-ATTR:instance_name | instance-00000002 |
| config_drive | | | OS-EXT-STS:power_state | Running |
| created | 2012-05-16T20:48:23Z | | OS-EXT-STS:task_state | None |
| flavor | m1.small | | OS-EXT-STS:vm_state | active |
| hostId | de0...487 | | OS-SRV-USG:launched_at | 2016-12-07T11:20:08.000000 |
| id | 8ec...f915 | | OS-SRV-USG:terminated_at | None |
| image | natty-image | | accessIPv4 | |
| key_name | | | accessIPv6 | |
| metadata | {u'description': u'Small test image'} | | addresses | public=172.24.4.227 |
| name | smallimage | | config_drive | |
| private network | 172.16.101.11 | | created | 2016-12-07T11:17:44Z |
| progress | 0 | | flavor | m1.tiny (1) |
| public network | 10.4.113.11 | | hostId | aca973d5b7981faaf8c713a0130713bbc1e64151be65c8dfb53039f7 |
| status | ACTIVE | | id | 4f7c6b2c-f27e-4ccd-a606-6bfc9d7c0d91 |
| tenant_id | e83...482 | | image | cirros (01bcb649-45d7-4e3d-8a58-1fcc87816907) |
| updated | 2012-05-16T20:48:35Z | | key_name | None |
| user_id | de3...0a9 | | name | smallimage |
+------------------------+-----------------------------------------+ | os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| project_id | 2daf82a578e9437cab396c888ff0ca57 |
| properties | description='Small test image' |
| security_groups | [{u'name': u'default'}] |
| status | ACTIVE |
| updated | 2016-12-07T11:20:08Z |
| user_id | 8cbea24666ae49bbb8c1641f9b12d2d2 |
+--------------------------------------+----------------------------------------------------------+
Instance user data Instance user data
------------------ ------------------
@ -1804,7 +1813,8 @@ For example
.. code-block:: console .. code-block:: console
$ nova boot --image ubuntu-cloudimage --flavor 1 --user-data mydata.file mydatainstance $ openstack server create --image ubuntu-cloudimage --flavor 1 \
--user-data mydata.file mydatainstance
To understand the difference between user data and metadata, realize To understand the difference between user data and metadata, realize
that user data is created before an instance is started. User data is that user data is created before an instance is started. User data is
@ -1825,8 +1835,9 @@ case, you can use the following command:
.. code-block:: console .. code-block:: console
$ nova boot --image ubuntu-cloudimage --flavor 1 \ $ openstack server create --image ubuntu-cloudimage --flavor 1 \
--file /root/.ssh/authorized_keys=special_authorized_keysfile authkeyinstance --file /root/.ssh/authorized_keys=special_authorized_keysfile \
authkeyinstance
Associating Security Groups Associating Security Groups
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -1942,7 +1953,7 @@ the instance is terminated:
.. code-block:: console .. code-block:: console
$ nova boot --image 4042220e-4f5e-4398-9054-39fbd75a5dd7 \ $ openstack server create --image 4042220e-4f5e-4398-9054-39fbd75a5dd7 \
--flavor 2 --key-name mykey --block-device-mapping vdc=13:::0 \ --flavor 2 --key-name mykey --block-device-mapping vdc=13:::0 \
boot-with-vol-test boot-with-vol-test
@ -1954,7 +1965,7 @@ is now attached as ``/dev/vda``:
.. code-block:: console .. code-block:: console
$ nova boot --flavor 2 --key-name mykey \ $ openstck server create --flavor 2 --key-name mykey \
--block-device-mapping vda=13:::0 boot-from-vol-test --block-device-mapping vda=13:::0 boot-from-vol-test
Read more detailed instructions for launching an instance from a Read more detailed instructions for launching an instance from a