Update the "nova boot" to "openstack server create"
Change-Id: I52f052d9d7d411b8ddc1f392154f4dd558411a99 Implements: blueprint use-openstack-command
This commit is contained in:
parent
6c1f56ca9a
commit
f90e606734
@ -83,7 +83,7 @@ Enable and access the configuration drive
|
|||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
#. To enable the configuration drive, pass the ``--config-drive true``
|
#. To enable the configuration drive, pass the ``--config-drive true``
|
||||||
parameter to the :command:`nova boot` command.
|
parameter to the :command:`openstack server create` command.
|
||||||
|
|
||||||
The following example enables the configuration drive and passes user
|
The following example enables the configuration drive and passes user
|
||||||
data, two files, and two key/value metadata pairs, all of which are
|
data, two files, and two key/value metadata pairs, all of which are
|
||||||
@ -91,11 +91,11 @@ Enable and access the configuration drive
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ nova boot --config-drive true --image my-image-name --key-name mykey \
|
$ openstack server create --config-drive true --image my-image-name \
|
||||||
--flavor 1 --user-data ./my-user-data.txt myinstance \
|
--flavor 1 --key-name mykey --user-data ./my-user-data.txt \
|
||||||
--file /etc/network/interfaces=/home/myuser/instance-interfaces \
|
--file /etc/network/interfaces=/home/myuser/instance-interfaces \
|
||||||
--file known_hosts=/home/myuser/.ssh/known_hosts \
|
--file known_hosts=/home/myuser/.ssh/known_hosts \
|
||||||
--meta role=webservers --meta essential=false
|
--property role=webservers --property essential=false MYINSTANCE
|
||||||
|
|
||||||
You can also configure the Compute service to always create a
|
You can also configure the Compute service to always create a
|
||||||
configuration drive by setting the following option in the
|
configuration drive by setting the following option in the
|
||||||
@ -168,7 +168,7 @@ In this example, the contents of the configuration drive are as follows::
|
|||||||
openstack/latest/user_data
|
openstack/latest/user_data
|
||||||
|
|
||||||
The files that appear on the configuration drive depend on the arguments
|
The files that appear on the configuration drive depend on the arguments
|
||||||
that you pass to the :command:`nova boot` command.
|
that you pass to the :command:`openstack server create` command.
|
||||||
|
|
||||||
OpenStack metadata format
|
OpenStack metadata format
|
||||||
-------------------------
|
-------------------------
|
||||||
@ -207,9 +207,9 @@ The file contents are formatted for readability.
|
|||||||
|
|
||||||
Note the effect of the
|
Note the effect of the
|
||||||
``--file /etc/network/interfaces=/home/myuser/instance-interfaces``
|
``--file /etc/network/interfaces=/home/myuser/instance-interfaces``
|
||||||
argument that was passed to the :command:`nova boot` command. The contents of
|
argument that was passed to the :command:`openstack server create` command.
|
||||||
this file are contained in the ``openstack/content/0000`` file on the
|
The contents of this file are contained in the ``openstack/content/0000``
|
||||||
configuration drive, and the path is specified as
|
file on the configuration drive, and the path is specified as
|
||||||
``/etc/network/interfaces`` in the ``meta_data.json`` file.
|
``/etc/network/interfaces`` in the ``meta_data.json`` file.
|
||||||
|
|
||||||
EC2 metadata format
|
EC2 metadata format
|
||||||
@ -262,7 +262,7 @@ User data
|
|||||||
The ``openstack/2012-08-10/user_data``, ``openstack/latest/user_data``,
|
The ``openstack/2012-08-10/user_data``, ``openstack/latest/user_data``,
|
||||||
``ec2/2009-04-04/user-data``, and ``ec2/latest/user-data`` file are
|
``ec2/2009-04-04/user-data``, and ``ec2/latest/user-data`` file are
|
||||||
present only if the ``--user-data`` flag and the contents of the user
|
present only if the ``--user-data`` flag and the contents of the user
|
||||||
data file are passed to the :command:`nova boot` command.
|
data file are passed to the :command:`openstack server create` command.
|
||||||
|
|
||||||
Configuration drive format
|
Configuration drive format
|
||||||
--------------------------
|
--------------------------
|
||||||
|
@ -107,7 +107,8 @@ network control via Neutron and OpenFlow.
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ nova boot --image my-baremetal-image --flavor my-baremetal-flavor test
|
$ openstack server create --image my-baremetal-image --flavor \
|
||||||
|
my-baremetal-flavor test
|
||||||
+-----------------------------+--------------------------------------+
|
+-----------------------------+--------------------------------------+
|
||||||
| Property | Value |
|
| Property | Value |
|
||||||
+-----------------------------+--------------------------------------+
|
+-----------------------------+--------------------------------------+
|
||||||
@ -119,15 +120,15 @@ network control via Neutron and OpenFlow.
|
|||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Set the ``--availability_zone`` parameter to specify which zone or
|
Set the ``--availability-zone`` parameter to specify which zone or
|
||||||
node to use to start the server. Separate the zone from the host
|
node to use to start the server. Separate the zone from the host
|
||||||
name with a comma. For example:
|
name with a comma. For example:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ nova boot --availability_zone zone:HOST,NODE
|
$ openstack server create --availability-zone zone:HOST,NODE
|
||||||
|
|
||||||
``host`` is optional for the ``--availability_zone`` parameter. You
|
``host`` is optional for the ``--availability-zone`` parameter. You
|
||||||
can simply specify ``zone:,node``, still including the comma.
|
can simply specify ``zone:,node``, still including the comma.
|
||||||
|
|
||||||
List bare-metal nodes and interfaces
|
List bare-metal nodes and interfaces
|
||||||
|
@ -4,8 +4,8 @@ Launch an instance from a volume
|
|||||||
|
|
||||||
You can boot instances from a volume instead of an image.
|
You can boot instances from a volume instead of an image.
|
||||||
|
|
||||||
To complete these tasks, use these parameters on the :command:`nova boot`
|
To complete these tasks, use these parameters on the
|
||||||
command:
|
:command:`openstack server create` command:
|
||||||
|
|
||||||
.. list-table::
|
.. list-table::
|
||||||
:header-rows: 1
|
:header-rows: 1
|
||||||
@ -95,11 +95,11 @@ system.
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ nova boot --flavor 2 --image 98901246-af91-43d8-b5e6-a4506aa8f369 \
|
$ openstack server create --flavor 2 --image 98901246-af91-43d8-b5e6-a4506aa8f369 \
|
||||||
--block-device source=volume,id=d620d971-b160-4c4e-8652-2513d74e2080,dest=volume,shutdown=preserve \
|
--block-device source=volume,id=d620d971-b160-4c4e-8652-2513d74e2080,dest=volume,shutdown=preserve \
|
||||||
myInstanceWithVolume
|
myInstanceWithVolume
|
||||||
+--------------------------------------+--------------------------------------------+
|
+--------------------------------------+--------------------------------------------+
|
||||||
| Property | Value |
|
| Field | Value |
|
||||||
+--------------------------------------+--------------------------------------------+
|
+--------------------------------------+--------------------------------------------+
|
||||||
| OS-DCF:diskConfig | MANUAL |
|
| OS-DCF:diskConfig | MANUAL |
|
||||||
| OS-EXT-AZ:availability_zone | nova |
|
| OS-EXT-AZ:availability_zone | nova |
|
||||||
@ -212,7 +212,7 @@ the volume to boot an instance.
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ nova boot --flavor FLAVOR --block-device \
|
$ openstack server create --flavor FLAVOR --block-device \
|
||||||
source=SOURCE,id=ID,dest=DEST,size=SIZE,shutdown=PRESERVE,bootindex=INDEX \
|
source=SOURCE,id=ID,dest=DEST,size=SIZE,shutdown=PRESERVE,bootindex=INDEX \
|
||||||
NAME
|
NAME
|
||||||
|
|
||||||
@ -259,11 +259,11 @@ the volume to boot an instance.
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ nova boot --flavor 2 \
|
$ openstack server create --flavor 2 \
|
||||||
--block-device source=volume,id=$VOLUME_ID,dest=volume,size=10,shutdown=preserve,bootindex=0 \
|
--block-device source=volume,id=$VOLUME_ID,dest=volume,size=10,shutdown=preserve,bootindex=0 \
|
||||||
myInstanceFromVolume
|
myInstanceFromVolume
|
||||||
+--------------------------------------+--------------------------------+
|
+--------------------------------------+--------------------------------+
|
||||||
| Property | Value |
|
| Field | Value |
|
||||||
+--------------------------------------+--------------------------------+
|
+--------------------------------------+--------------------------------+
|
||||||
| OS-EXT-STS:task_state | scheduling |
|
| OS-EXT-STS:task_state | scheduling |
|
||||||
| image | Attempt to boot from volume |
|
| image | Attempt to boot from volume |
|
||||||
@ -323,7 +323,8 @@ Boot an instance with a 512 MB swap disk and 2 GB ephemeral disk.
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ nova boot --flavor FLAVOR --image IMAGE_ID --swap 512 --ephemeral size=2 NAME
|
$ openstack server create --flavor FLAVOR --image IMAGE_ID --swap 512 \
|
||||||
|
--ephemeral size=2 NAME
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
@ -8,18 +8,18 @@ Boot an instance from an ISO image
|
|||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
OpenStack supports booting instances using ISO images. But before you
|
OpenStack supports booting instances using ISO images. But before you
|
||||||
make such instances functional, use the :command:`nova boot` command
|
make such instances functional, use the :command:`openstack server create`
|
||||||
with the following parameters to boot an instance.
|
command with the following parameters to boot an instance.
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ nova boot \
|
$ openstack server create \
|
||||||
--image ubuntu-14.04.2-server-amd64.iso \
|
--image ubuntu-14.04.2-server-amd64.iso \
|
||||||
--block-device source=blank,dest=volume,size=10,shutdown=preserve \
|
--block-device source=blank,dest=volume,size=10,shutdown=preserve \
|
||||||
--nic net-id = NETWORK_UUID \
|
--nic net-id = NETWORK_UUID \
|
||||||
--flavor 2 INSTANCE_NAME
|
--flavor 2 INSTANCE_NAME
|
||||||
+--------------------------------------+--------------------------------------------+
|
+--------------------------------------+--------------------------------------------+
|
||||||
| Property | Value |
|
| Field | Value |
|
||||||
+--------------------------------------+--------------------------------------------+
|
+--------------------------------------+--------------------------------------------+
|
||||||
| OS-DCF:diskConfig | MANUAL |
|
| OS-DCF:diskConfig | MANUAL |
|
||||||
| OS-EXT-AZ:availability_zone | nova |
|
| OS-EXT-AZ:availability_zone | nova |
|
||||||
|
@ -134,4 +134,4 @@ new instance:
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ nova boot --flavor m1.tiny --image myInstanceSnapshot myNewInstance
|
$ openstack server create --flavor m1.tiny --image myInstanceSnapshot myNewInstance
|
||||||
|
Loading…
Reference in New Issue
Block a user