Merge "Add one use case for configdrive"

This commit is contained in:
Jenkins 2016-06-01 03:17:18 +00:00 committed by Gerrit Code Review
commit bbde494d0f

View File

@ -2191,6 +2191,11 @@ Enabling the configuration drive (configdrive)
Starting with the Kilo release, the Bare Metal service supports exposing
a configuration drive image to the instances.
Configuration drive can store metadata and attaches to the instance when it
boots. One use case for using the configuration drive is to expose a
networking configuration when you do not use DHCP to assign IP addresses to
instances.
The configuration drive is usually used in conjunction with the Compute
service, but the Bare Metal service also offers a standalone way of using it.
The following sections will describe both methods.
@ -2199,10 +2204,14 @@ The following sections will describe both methods.
When used with Compute service
------------------------------
To enable the configuration drive when deploying an instance, pass
``--config-drive true`` parameter to the ``nova boot`` command, for example::
To enable the configuration drive and passes user customized script when deploying an
instance, pass ``--config-drive true`` parameter and ``--user-data`` to the
``nova boot`` command, for example::
nova boot --config-drive true --flavor baremetal --image test-image instance-1
nova boot --config-drive true --flavor baremetal --image test-image --user-data ./my-script instance-1
Then ``my-script`` is accessible from the configuration drive and could be
performed automatically by cloud-init if it is integrated with the instance image.
It's also possible to enable the configuration drive automatically on
all instances by configuring the ``OpenStack Compute service`` to always