Merge "[ops-guide] Replace "nova boot" with "openstack server create""
This commit is contained in:
commit
cf4345bab1
@ -277,7 +277,7 @@ When you join the screen session that ``stack.sh`` starts with
|
||||
|
||||
.. 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
|
||||
see the line:
|
||||
|
@ -370,46 +370,47 @@ using neutron ports which contain the IPv4 & IPv6 address.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ nova boot --flavor m1.medium --image ubuntu.qcow2 --key-name team_key \
|
||||
--nic port-id=PORT_ID "example-fqdn-01.sys.example.com"
|
||||
$ openstack server create --flavor m1.medium --image ubuntu.qcow2 \
|
||||
--key-name team_key --nic port-id=PORT_ID \
|
||||
"example-fqdn-01.sys.example.com"
|
||||
|
||||
#. Verify the instance has the correct IP address:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
+-------------------------------------+-----------------------------------------------------------+
|
||||
| Property | Value |
|
||||
+-------------------------------------+-----------------------------------------------------------+
|
||||
| OS-DCF:diskConfig | MANUAL |
|
||||
| OS-EXT-AZ:availability_zone | nova |
|
||||
| OS-EXT-SRV-ATTR:host | os_compute-1 |
|
||||
| OS-EXT-SRV-ATTR:hypervisor_hostname | os_compute.ece.example.com |
|
||||
| OS-EXT-SRV-ATTR:instance_name | instance-00012b82 |
|
||||
| OS-EXT-STS:power_state | 1 |
|
||||
| OS-EXT-STS:task_state | - |
|
||||
| OS-EXT-STS:vm_state | active |
|
||||
| OS-SRV-USG:launched_at | 2016-07-26T21:27:04.000000 |
|
||||
| OS-SRV-USG:terminated_at | - |
|
||||
| Public_AGILE network | 2001:558:fc0b:100:f816:3eff:fefb:65fc, 96.118.182.107 |
|
||||
| accessIPv4 | |
|
||||
| accessIPv6 | |
|
||||
| config_drive | |
|
||||
| created | 2016-07-26T21:26:42Z |
|
||||
| flavor | m1.medium (103) |
|
||||
| hostId | b0a4684922bce321770daf033032d9115fe3e13190191bf01dbc357a |
|
||||
| id | 9ff9a672-d496-470a-84a7-284799a777fd |
|
||||
| image | Example Cloud Ubuntu 14.04 x86_64 v2.5 (fb49d7e1-273b-... |
|
||||
| key_name | team_key |
|
||||
| metadata | {} |
|
||||
| name | example-fqdn-01.sys.example.com |
|
||||
| os-extended-volumes:volumes_attached| [] |
|
||||
| progress | 0 |
|
||||
| security_groups | default |
|
||||
| status | ACTIVE |
|
||||
| tenant_id | 52f0574689f14c8a99e7ca22c4eb5720 |
|
||||
| updated | 2016-07-26T21:27:04Z |
|
||||
| user_id | e37b87cb8d784cc3a85e475f67b32ab5 |
|
||||
+-------------------------------------+-----------------------------------------------------------+
|
||||
+--------------------------------------+----------------------------------------------------------+
|
||||
| Field | Value |
|
||||
+--------------------------------------+----------------------------------------------------------+
|
||||
| OS-DCF:diskConfig | MANUAL |
|
||||
| OS-EXT-AZ:availability_zone | nova |
|
||||
| OS-EXT-SRV-ATTR:host | os_compute-1 |
|
||||
| OS-EXT-SRV-ATTR:hypervisor_hostname | os_compute.ece.example.com |
|
||||
| OS-EXT-SRV-ATTR:instance_name | instance-00012b82 |
|
||||
| OS-EXT-STS:power_state | Running |
|
||||
| OS-EXT-STS:task_state | None |
|
||||
| OS-EXT-STS:vm_state | active |
|
||||
| OS-SRV-USG:launched_at | 2016-11-30T08:55:27.000000 |
|
||||
| OS-SRV-USG:terminated_at | None |
|
||||
| accessIPv4 | |
|
||||
| accessIPv6 | |
|
||||
| addresses | public=172.24.4.236 |
|
||||
| config_drive | |
|
||||
| created | 2016-11-30T08:55:14Z |
|
||||
| flavor | m1.medium (103) |
|
||||
| hostId | aca973d5b7981faaf8c713a0130713bbc1e64151be65c8dfb53039f7 |
|
||||
| id | f91bd761-6407-46a6-b5fd-11a8a46e4983 |
|
||||
| image | Example Cloud Ubuntu 14.04 x86_64 v2.5 (fb49d7e1-273b-...|
|
||||
| key_name | team_key |
|
||||
| name | example-fqdn-01.sys.example.com |
|
||||
| os-extended-volumes:volumes_attached | [] |
|
||||
| progress | 0 |
|
||||
| project_id | 2daf82a578e9437cab396c888ff0ca57 |
|
||||
| properties | |
|
||||
| security_groups | [{u'name': u'default'}] |
|
||||
| status | ACTIVE |
|
||||
| updated | 2016-11-30T08:55:27Z |
|
||||
| user_id | 8cbea24666ae49bbb8c1641f9b12d2d2 |
|
||||
+--------------------------------------+----------------------------------------------------------+
|
||||
|
||||
#. Check the port connection using the netcat utility:
|
||||
|
||||
|
@ -1615,7 +1615,7 @@ On the command line, do this:
|
||||
|
||||
.. 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
|
||||
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
|
||||
|
||||
$ 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
|
||||
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
|
||||
string for both the key and the value. For example, you could add a
|
||||
:option:`--property` option with a key-value pair, where you can make up
|
||||
the string for both the key and the value. For example, you could add a
|
||||
description and also the creator of the server:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ nova boot --image=test-image --flavor=1 \
|
||||
--meta description='Small test image' smallimage
|
||||
$ openstack server create --image=test-image --flavor=1 \
|
||||
--property description='Small test image' smallimage
|
||||
|
||||
When viewing the server information, you can see the metadata included
|
||||
on the metadata line:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ nova show smallimage
|
||||
+------------------------+-----------------------------------------+
|
||||
| Property | Value |
|
||||
+------------------------+-----------------------------------------+
|
||||
| OS-DCF:diskConfig | MANUAL |
|
||||
| OS-EXT-STS:power_state | 1 |
|
||||
| OS-EXT-STS:task_state | None |
|
||||
| OS-EXT-STS:vm_state | active |
|
||||
| accessIPv4 | |
|
||||
| accessIPv6 | |
|
||||
| config_drive | |
|
||||
| created | 2012-05-16T20:48:23Z |
|
||||
| flavor | m1.small |
|
||||
| hostId | de0...487 |
|
||||
| id | 8ec...f915 |
|
||||
| image | natty-image |
|
||||
| key_name | |
|
||||
| metadata | {u'description': u'Small test image'} |
|
||||
| name | smallimage |
|
||||
| private network | 172.16.101.11 |
|
||||
| progress | 0 |
|
||||
| public network | 10.4.113.11 |
|
||||
| status | ACTIVE |
|
||||
| tenant_id | e83...482 |
|
||||
| updated | 2012-05-16T20:48:35Z |
|
||||
| user_id | de3...0a9 |
|
||||
+------------------------+-----------------------------------------+
|
||||
$ openstack server show smallimage
|
||||
|
||||
+--------------------------------------+----------------------------------------------------------+
|
||||
| Field | Value |
|
||||
+--------------------------------------+----------------------------------------------------------+
|
||||
| OS-DCF:diskConfig | MANUAL |
|
||||
| OS-EXT-AZ:availability_zone | nova |
|
||||
| OS-EXT-SRV-ATTR:host | rdo-newton.novalocal |
|
||||
| OS-EXT-SRV-ATTR:hypervisor_hostname | rdo-newton.novalocal |
|
||||
| OS-EXT-SRV-ATTR:instance_name | instance-00000002 |
|
||||
| OS-EXT-STS:power_state | Running |
|
||||
| OS-EXT-STS:task_state | None |
|
||||
| OS-EXT-STS:vm_state | active |
|
||||
| OS-SRV-USG:launched_at | 2016-12-07T11:20:08.000000 |
|
||||
| OS-SRV-USG:terminated_at | None |
|
||||
| accessIPv4 | |
|
||||
| accessIPv6 | |
|
||||
| addresses | public=172.24.4.227 |
|
||||
| config_drive | |
|
||||
| created | 2016-12-07T11:17:44Z |
|
||||
| flavor | m1.tiny (1) |
|
||||
| hostId | aca973d5b7981faaf8c713a0130713bbc1e64151be65c8dfb53039f7 |
|
||||
| id | 4f7c6b2c-f27e-4ccd-a606-6bfc9d7c0d91 |
|
||||
| image | cirros (01bcb649-45d7-4e3d-8a58-1fcc87816907) |
|
||||
| key_name | None |
|
||||
| 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
|
||||
------------------
|
||||
@ -1804,7 +1813,8 @@ For example
|
||||
|
||||
.. 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
|
||||
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
|
||||
|
||||
$ nova boot --image ubuntu-cloudimage --flavor 1 \
|
||||
--file /root/.ssh/authorized_keys=special_authorized_keysfile authkeyinstance
|
||||
$ openstack server create --image ubuntu-cloudimage --flavor 1 \
|
||||
--file /root/.ssh/authorized_keys=special_authorized_keysfile \
|
||||
authkeyinstance
|
||||
|
||||
Associating Security Groups
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -1942,7 +1953,7 @@ the instance is terminated:
|
||||
|
||||
.. 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 \
|
||||
boot-with-vol-test
|
||||
|
||||
@ -1954,7 +1965,7 @@ is now attached as ``/dev/vda``:
|
||||
|
||||
.. 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
|
||||
|
||||
Read more detailed instructions for launching an instance from a
|
||||
|
Loading…
Reference in New Issue
Block a user