From f90e606734f44efdce50e3177ccda57deb3016ab Mon Sep 17 00:00:00 2001 From: caoyuan Date: Wed, 30 Nov 2016 16:03:44 +0800 Subject: [PATCH] Update the "nova boot" to "openstack server create" Change-Id: I52f052d9d7d411b8ddc1f392154f4dd558411a99 Implements: blueprint use-openstack-command --- doc/user-guide/source/cli-config-drive.rst | 20 +++++++++---------- .../source/cli-manage-bare-metal-nodes.rst | 9 +++++---- .../cli-nova-launch-instance-from-volume.rst | 17 ++++++++-------- ...i-nova-launch-instance-using-ISO-image.rst | 8 ++++---- ...cli-use-snapshots-to-migrate-instances.rst | 2 +- 5 files changed, 29 insertions(+), 27 deletions(-) diff --git a/doc/user-guide/source/cli-config-drive.rst b/doc/user-guide/source/cli-config-drive.rst index 77262d286f..ad254aeb2a 100644 --- a/doc/user-guide/source/cli-config-drive.rst +++ b/doc/user-guide/source/cli-config-drive.rst @@ -83,7 +83,7 @@ Enable and access the configuration drive ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #. 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 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 - $ nova boot --config-drive true --image my-image-name --key-name mykey \ - --flavor 1 --user-data ./my-user-data.txt myinstance \ + $ openstack server create --config-drive true --image my-image-name \ + --flavor 1 --key-name mykey --user-data ./my-user-data.txt \ --file /etc/network/interfaces=/home/myuser/instance-interfaces \ --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 configuration drive by setting the following option in the @@ -103,7 +103,7 @@ Enable and access the configuration drive .. code-block:: console - force_config_drive=true + force_config_drive = true .. note:: @@ -168,7 +168,7 @@ In this example, the contents of the configuration drive are as follows:: openstack/latest/user_data 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 ------------------------- @@ -207,9 +207,9 @@ The file contents are formatted for readability. Note the effect of the ``--file /etc/network/interfaces=/home/myuser/instance-interfaces`` -argument that was passed to the :command:`nova boot` command. The contents of -this file are contained in the ``openstack/content/0000`` file on the -configuration drive, and the path is specified as +argument that was passed to the :command:`openstack server create` command. +The contents of this file are contained in the ``openstack/content/0000`` +file on the configuration drive, and the path is specified as ``/etc/network/interfaces`` in the ``meta_data.json`` file. EC2 metadata format @@ -262,7 +262,7 @@ 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 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 -------------------------- diff --git a/doc/user-guide/source/cli-manage-bare-metal-nodes.rst b/doc/user-guide/source/cli-manage-bare-metal-nodes.rst index 0c5a670034..eee09b3418 100644 --- a/doc/user-guide/source/cli-manage-bare-metal-nodes.rst +++ b/doc/user-guide/source/cli-manage-bare-metal-nodes.rst @@ -107,7 +107,8 @@ network control via Neutron and OpenFlow. .. 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 | +-----------------------------+--------------------------------------+ @@ -119,15 +120,15 @@ network control via Neutron and OpenFlow. .. 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 name with a comma. For example: .. 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. List bare-metal nodes and interfaces diff --git a/doc/user-guide/source/cli-nova-launch-instance-from-volume.rst b/doc/user-guide/source/cli-nova-launch-instance-from-volume.rst index ccbec05cfc..d455f4fa2f 100644 --- a/doc/user-guide/source/cli-nova-launch-instance-from-volume.rst +++ b/doc/user-guide/source/cli-nova-launch-instance-from-volume.rst @@ -4,8 +4,8 @@ Launch an instance from a volume You can boot instances from a volume instead of an image. -To complete these tasks, use these parameters on the :command:`nova boot` -command: +To complete these tasks, use these parameters on the +:command:`openstack server create` command: .. list-table:: :header-rows: 1 @@ -95,11 +95,11 @@ system. .. 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 \ myInstanceWithVolume +--------------------------------------+--------------------------------------------+ - | Property | Value | + | Field | Value | +--------------------------------------+--------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | nova | @@ -212,7 +212,7 @@ the volume to boot an instance. .. 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 \ NAME @@ -259,11 +259,11 @@ the volume to boot an instance. .. 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 \ myInstanceFromVolume +--------------------------------------+--------------------------------+ - | Property | Value | + | Field | Value | +--------------------------------------+--------------------------------+ | OS-EXT-STS:task_state | scheduling | | 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 - $ 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:: diff --git a/doc/user-guide/source/cli-nova-launch-instance-using-ISO-image.rst b/doc/user-guide/source/cli-nova-launch-instance-using-ISO-image.rst index 08d20c9c9b..df73503745 100644 --- a/doc/user-guide/source/cli-nova-launch-instance-using-ISO-image.rst +++ b/doc/user-guide/source/cli-nova-launch-instance-using-ISO-image.rst @@ -8,18 +8,18 @@ Boot an instance from an ISO image ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ OpenStack supports booting instances using ISO images. But before you -make such instances functional, use the :command:`nova boot` command -with the following parameters to boot an instance. +make such instances functional, use the :command:`openstack server create` +command with the following parameters to boot an instance. .. code-block:: console - $ nova boot \ + $ openstack server create \ --image ubuntu-14.04.2-server-amd64.iso \ --block-device source=blank,dest=volume,size=10,shutdown=preserve \ --nic net-id = NETWORK_UUID \ --flavor 2 INSTANCE_NAME +--------------------------------------+--------------------------------------------+ - | Property | Value | + | Field | Value | +--------------------------------------+--------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | nova | diff --git a/doc/user-guide/source/cli-use-snapshots-to-migrate-instances.rst b/doc/user-guide/source/cli-use-snapshots-to-migrate-instances.rst index 8ed16f016f..673212a844 100644 --- a/doc/user-guide/source/cli-use-snapshots-to-migrate-instances.rst +++ b/doc/user-guide/source/cli-use-snapshots-to-migrate-instances.rst @@ -134,4 +134,4 @@ new instance: .. code-block:: console - $ nova boot --flavor m1.tiny --image myInstanceSnapshot myNewInstance + $ openstack server create --flavor m1.tiny --image myInstanceSnapshot myNewInstance