[install] Liberty updates for heat
Update heat configuration for Liberty. Includes moving stack creation to the launch instance section. Also addresses some consistency issues, mostly from the RST conversion. Changes and testing specific to distribution packages primarily involve Ubuntu. Other distributions may require additional patches. Change-Id: Ib1ba4987eabe15a2100a58d1448507c203fc25f3 Implements: blueprint installguide-liberty
This commit is contained in:
parent
20589d3033
commit
6b11ba1de9
@ -1,14 +1,15 @@
|
||||
===================================
|
||||
Install and configure Orchestration
|
||||
===================================
|
||||
.. _heat-install:
|
||||
|
||||
Install and configure
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This section describes how to install and configure the
|
||||
Orchestration module, code-named heat, on the controller node.
|
||||
|
||||
.. only:: obs or rdo or ubuntu
|
||||
|
||||
To configure prerequisites
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
Before you install and configure Orchestration, you must create a
|
||||
database, service credentials, and API endpoints.
|
||||
@ -54,30 +55,27 @@ Orchestration module, code-named heat, on the controller node.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ openstack user create --password-prompt heat
|
||||
$ openstack user create --domain default --password-prompt heat
|
||||
User Password:
|
||||
Repeat User Password:
|
||||
+----------+----------------------------------+
|
||||
| Field | Value |
|
||||
+----------+----------------------------------+
|
||||
| email | None |
|
||||
| enabled | True |
|
||||
| id | 7fd67878dcd04d0393469ef825a7e005 |
|
||||
| name | heat |
|
||||
| username | heat |
|
||||
+----------+----------------------------------+
|
||||
+-----------+----------------------------------+
|
||||
| Field | Value |
|
||||
+-----------+----------------------------------+
|
||||
| domain_id | default |
|
||||
| enabled | True |
|
||||
| id | ca2e175b851943349be29a328cc5e360 |
|
||||
| name | heat |
|
||||
+-----------+----------------------------------+
|
||||
|
||||
* Add the ``admin`` role to the ``heat`` user:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ openstack role add --project service --user heat admin
|
||||
+-------+----------------------------------+
|
||||
| Field | Value |
|
||||
+-------+----------------------------------+
|
||||
| id | cd2cb9a39e874ea69e5d4b896eb16128 |
|
||||
| name | admin |
|
||||
+-------+----------------------------------+
|
||||
|
||||
.. note::
|
||||
|
||||
This command provides no output.
|
||||
|
||||
* Create the ``heat_stack_owner`` role:
|
||||
|
||||
@ -87,21 +85,19 @@ Orchestration module, code-named heat, on the controller node.
|
||||
+-------+----------------------------------+
|
||||
| Field | Value |
|
||||
+-------+----------------------------------+
|
||||
| id | c0a1cbee7261446abc873392f616de87 |
|
||||
| id | 15e34f0c4fed4e68b3246275883c8630 |
|
||||
| name | heat_stack_owner |
|
||||
+-------+----------------------------------+
|
||||
|
||||
* Add the ``heat_stack_owner`` role to the ``demo`` tenant and user:
|
||||
* Add the ``heat_stack_owner`` role to the ``demo`` project and user:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ openstack role add --project demo --user demo heat_stack_owner
|
||||
+-------+----------------------------------+
|
||||
| Field | Value |
|
||||
+-------+----------------------------------+
|
||||
| id | c0a1cbee7261446abc873392f616de87 |
|
||||
| name | heat_stack_owner |
|
||||
+-------+----------------------------------+
|
||||
|
||||
.. note::
|
||||
|
||||
This command provides no output.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -116,7 +112,7 @@ Orchestration module, code-named heat, on the controller node.
|
||||
+-------+----------------------------------+
|
||||
| Field | Value |
|
||||
+-------+----------------------------------+
|
||||
| id | e01546b1a81c4e32a6d14a9259e60154 |
|
||||
| id | 88849d41a55d4d1d91e4f11bffd8fc5c |
|
||||
| name | heat_stack_user |
|
||||
+-------+----------------------------------+
|
||||
|
||||
@ -139,10 +135,11 @@ Orchestration module, code-named heat, on the controller node.
|
||||
+-------------+----------------------------------+
|
||||
| description | Orchestration |
|
||||
| enabled | True |
|
||||
| id | 031112165cad4c2bb23e84603957de29 |
|
||||
| id | 727841c6f5df4773baa4e8a5ae7d72eb |
|
||||
| name | heat |
|
||||
| type | orchestration |
|
||||
+-------------+----------------------------------+
|
||||
|
||||
$ openstack service create --name heat-cfn \
|
||||
--description "Orchestration" cloudformation
|
||||
+-------------+----------------------------------+
|
||||
@ -150,7 +147,7 @@ Orchestration module, code-named heat, on the controller node.
|
||||
+-------------+----------------------------------+
|
||||
| description | Orchestration |
|
||||
| enabled | True |
|
||||
| id | 297740d74c0a446bbff867acdccb33fa |
|
||||
| id | c42cede91a4e47c3b10c8aedc8d890c6 |
|
||||
| name | heat-cfn |
|
||||
| type | cloudformation |
|
||||
+-------------+----------------------------------+
|
||||
@ -161,104 +158,110 @@ Orchestration module, code-named heat, on the controller node.
|
||||
|
||||
$ openstack endpoint create --region RegionOne \
|
||||
orchestration public http://controller:8004/v1/%\(tenant_id\)s
|
||||
+--------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+----------------------------------+
|
||||
| enabled | True |
|
||||
| id | 340be3625e9b4239a6415d034e98aace |
|
||||
| interface | public |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
|
||||
| service_name | heat |
|
||||
| service_type | orchestration |
|
||||
| url | http://controller:8004 |
|
||||
+--------------+----------------------------------+
|
||||
+--------------+-----------------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+-----------------------------------------+
|
||||
| enabled | True |
|
||||
| id | 3f4dab34624e4be7b000265f25049609 |
|
||||
| interface | public |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | 727841c6f5df4773baa4e8a5ae7d72eb |
|
||||
| service_name | heat |
|
||||
| service_type | orchestration |
|
||||
| url | http://controller:8004/v1/%(tenant_id)s |
|
||||
+--------------+-----------------------------------------+
|
||||
|
||||
$ openstack endpoint create --region RegionOne \
|
||||
orchestration internal http://controller:8004/v1/%\(tenant_id\)s
|
||||
+--------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+----------------------------------+
|
||||
| enabled | True |
|
||||
| id | 340be3625e9b4239a6415d034e98aace |
|
||||
| interface | internal |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
|
||||
| service_name | heat |
|
||||
| service_type | orchestration |
|
||||
| url | http://controller:8004 |
|
||||
+--------------+----------------------------------+
|
||||
+--------------+-----------------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+-----------------------------------------+
|
||||
| enabled | True |
|
||||
| id | 9489f78e958e45cc85570fec7e836d98 |
|
||||
| interface | internal |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | 727841c6f5df4773baa4e8a5ae7d72eb |
|
||||
| service_name | heat |
|
||||
| service_type | orchestration |
|
||||
| url | http://controller:8004/v1/%(tenant_id)s |
|
||||
+--------------+-----------------------------------------+
|
||||
|
||||
$ openstack endpoint create --region RegionOne \
|
||||
orchestration admin http://controller:8004/v1/%\(tenant_id\)s
|
||||
+--------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+----------------------------------+
|
||||
| enabled | True |
|
||||
| id | 340be3625e9b4239a6415d034e98aace |
|
||||
| interface | admin |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
|
||||
| service_name | heat |
|
||||
| service_type | orchestration |
|
||||
| url | http://controller:8004 |
|
||||
+--------------+----------------------------------+
|
||||
+--------------+-----------------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+-----------------------------------------+
|
||||
| enabled | True |
|
||||
| id | 76091559514b40c6b7b38dde790efe99 |
|
||||
| interface | admin |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | 727841c6f5df4773baa4e8a5ae7d72eb |
|
||||
| service_name | heat |
|
||||
| service_type | orchestration |
|
||||
| url | http://controller:8004/v1/%(tenant_id)s |
|
||||
+--------------+-----------------------------------------+
|
||||
|
||||
$ openstack endpoint create --region RegionOne \
|
||||
cloudformation public http://controller:8000/v1
|
||||
+--------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+----------------------------------+
|
||||
| enabled | True |
|
||||
| id | 340be3625e9b4239a6415d034e98aace |
|
||||
| interface | public |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
|
||||
| service_name | heat-cfn |
|
||||
| service_type | cloudformation |
|
||||
| url | http://controller:8000 |
|
||||
+--------------+----------------------------------+
|
||||
+--------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+----------------------------------+
|
||||
| enabled | True |
|
||||
| id | b3ea082e019c4024842bf0a80555052c |
|
||||
| interface | public |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | c42cede91a4e47c3b10c8aedc8d890c6 |
|
||||
| service_name | heat-cfn |
|
||||
| service_type | cloudformation |
|
||||
| url | http://controller:8000/v1 |
|
||||
+--------------+----------------------------------+
|
||||
|
||||
$ openstack endpoint create --region RegionOne \
|
||||
cloudformation internal http://controller:8000/v1
|
||||
+--------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+----------------------------------+
|
||||
| enabled | True |
|
||||
| id | 340be3625e9b4239a6415d034e98aace |
|
||||
| interface | internal |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
|
||||
| service_name | heat-cfn |
|
||||
| service_type | cloudformation |
|
||||
| url | http://controller:8000 |
|
||||
+--------------+----------------------------------+
|
||||
+--------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+----------------------------------+
|
||||
| enabled | True |
|
||||
| id | 169df4368cdc435b8b115a9cb084044e |
|
||||
| interface | internal |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | c42cede91a4e47c3b10c8aedc8d890c6 |
|
||||
| service_name | heat-cfn |
|
||||
| service_type | cloudformation |
|
||||
| url | http://controller:8000/v1 |
|
||||
+--------------+----------------------------------+
|
||||
|
||||
$ openstack endpoint create --region RegionOne \
|
||||
cloudformation admin http://controller:8000/v1
|
||||
+--------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+----------------------------------+
|
||||
| enabled | True |
|
||||
| id | 340be3625e9b4239a6415d034e98aace |
|
||||
| interface | admin |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
|
||||
| service_name | heat-cfn |
|
||||
| service_type | cloudformation |
|
||||
| url | http://controller:8000 |
|
||||
+--------------+----------------------------------+
|
||||
+--------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+----------------------------------+
|
||||
| enabled | True |
|
||||
| id | 3d3edcd61eb343c1bbd629aa041ff88b |
|
||||
| interface | internal |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | c42cede91a4e47c3b10c8aedc8d890c6 |
|
||||
| service_name | heat-cfn |
|
||||
| service_type | cloudformation |
|
||||
| url | http://controller:8000/v1 |
|
||||
+--------------+----------------------------------+
|
||||
|
||||
To install and configure the Orchestration components
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Install and configure components
|
||||
--------------------------------
|
||||
|
||||
.. only:: obs or rdo or ubuntu
|
||||
|
||||
.. include:: shared/note_configuration_vary_by_distribution.rst
|
||||
|
||||
.. only:: obs
|
||||
|
||||
#. Run the following commands to install the packages:
|
||||
#. Install the packages:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
@ -267,7 +270,7 @@ To install and configure the Orchestration components
|
||||
|
||||
.. only:: rdo
|
||||
|
||||
#. Run the following commands to install the packages:
|
||||
#. Install the packages:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
@ -276,30 +279,16 @@ To install and configure the Orchestration components
|
||||
|
||||
.. only:: ubuntu
|
||||
|
||||
#. Run the following commands to install the packages:
|
||||
#. Install the packages:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# apt-get install heat-api heat-api-cfn heat-enginea \
|
||||
# apt-get install heat-api heat-api-cfn heat-engine \
|
||||
python-heatclient
|
||||
|
||||
.. only:: obs or rdo or ubuntu
|
||||
|
||||
2.
|
||||
|
||||
.. only:: rdo
|
||||
|
||||
.. Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1213476.
|
||||
|
||||
Copy the ``/usr/share/heat/heat-dist.conf`` file
|
||||
to ``/etc/heat/heat.conf``.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# cp /usr/share/heat/heat-dist.conf /etc/heat/heat.conf
|
||||
# chown -R heat:heat /etc/heat/heat.conf
|
||||
|
||||
Edit the ``/etc/heat/heat.conf`` file and complete the following
|
||||
2. Edit the ``/etc/heat/heat.conf`` file and complete the following
|
||||
actions:
|
||||
|
||||
* In the ``[database]`` section, configure database access:
|
||||
@ -338,6 +327,13 @@ To install and configure the Orchestration components
|
||||
|
||||
[keystone_authtoken]
|
||||
...
|
||||
auth_url = http://controller:35357
|
||||
auth_plugin = password
|
||||
project_domain_id = default
|
||||
user_domain_id = default
|
||||
project_name = service
|
||||
username = heat
|
||||
password = HEAT_PASS
|
||||
auth_uri = http://controller:5000/v2.0
|
||||
identity_uri = http://controller:35357
|
||||
admin_tenant_name = service
|
||||
@ -357,6 +353,11 @@ To install and configure the Orchestration components
|
||||
``auth_protocol`` options because the
|
||||
``identity_uri`` option replaces them.
|
||||
|
||||
.. note::
|
||||
|
||||
The contents of the [keystone_authtoken] section vary
|
||||
slightly from other services.
|
||||
|
||||
* In the ``[DEFAULT]`` section, configure the metadata and
|
||||
wait condition URLs:
|
||||
|
||||
@ -388,9 +389,10 @@ To install and configure the Orchestration components
|
||||
|
||||
[DEFAULT]
|
||||
...
|
||||
verbose = True</programlisting>
|
||||
verbose = True
|
||||
|
||||
3.
|
||||
3. Create a domain for users and projects managed by Orchestration
|
||||
stacks.
|
||||
|
||||
* Source the ``admin`` credentials to gain access to
|
||||
admin-only CLI commands:
|
||||
@ -399,16 +401,17 @@ To install and configure the Orchestration components
|
||||
|
||||
$ source admin-openrc.sh
|
||||
|
||||
* Create the heat domain in Identity service:
|
||||
* Create the heat domain in the Identity service:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ heat-keystone-setup-domain \
|
||||
--stack-user-domain-name heat_user_domain \
|
||||
--stack-domain-admin heat_domain_admin \
|
||||
--stack-domain-admin-password HEAT_DOMAIN_PASS
|
||||
$ heat-keystone-setup-domain
|
||||
|
||||
Replace ``HEAT_DOMAIN_PASS`` with a suitable password.
|
||||
.. note::
|
||||
|
||||
Do not add the output of this command to the
|
||||
``/etc/heat/heat.conf`` file because it already
|
||||
contains these configuration options.
|
||||
|
||||
4. Populate the Orchestration database:
|
||||
|
||||
@ -441,8 +444,8 @@ To install and configure the Orchestration components
|
||||
...
|
||||
auth_uri = http://controller:5000/v2.0
|
||||
|
||||
To finalize installation
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Finalize installation
|
||||
---------------------
|
||||
|
||||
.. only:: obs or rdo
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
==========
|
||||
.. _heat-next-steps:
|
||||
|
||||
Next steps
|
||||
==========
|
||||
~~~~~~~~~~
|
||||
|
||||
Your OpenStack environment now includes Orchestration. You can
|
||||
:ref:`launch-instance` or add more services to your environment
|
@ -1,9 +1,9 @@
|
||||
================
|
||||
Verify operation
|
||||
================
|
||||
.. _heat-verify:
|
||||
|
||||
This section describes how to verify operation of the Orchestration
|
||||
module (heat).
|
||||
Verify operation
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
Verify operation of the Orchestration module.
|
||||
|
||||
#. Source the ``admin`` tenant credentials:
|
||||
|
||||
@ -11,64 +11,22 @@ module (heat).
|
||||
|
||||
$ source admin-openrc.sh
|
||||
|
||||
#. The Orchestration module uses templates to describe stacks.
|
||||
To learn about the template language, see `the Template Guide
|
||||
<http://docs.openstack.org/developer/heat/template_guide/index.html>`__
|
||||
in the `Heat developer documentation
|
||||
<http://docs.openstack.org/developer/heat/index.html>`__.
|
||||
|
||||
Create a test template in the ``test-stack.yml``
|
||||
file with the following content:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
heat_template_version: 2014-10-16
|
||||
description: A simple server.
|
||||
|
||||
parameters:
|
||||
ImageID:
|
||||
type: string
|
||||
description: Image use to boot a server
|
||||
NetID:
|
||||
type: string
|
||||
description: Network ID for the server
|
||||
|
||||
resources:
|
||||
server:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
image: { get_param: ImageID }
|
||||
flavor: m1.tiny
|
||||
networks:
|
||||
- network: { get_param: NetID }
|
||||
|
||||
outputs:
|
||||
private_ip:
|
||||
description: IP address of the server in the private network
|
||||
value: { get_attr: [ server, first_address ] }</programlisting>
|
||||
|
||||
#. Use the :command:`heat stack-create` command to create a stack from the
|
||||
template:
|
||||
#. List service components to verify successful launch and
|
||||
registration of each process:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ NET_ID=$(nova net-list | awk '/ demo-net / { print $2 }')
|
||||
$ heat stack-create -f test-stack.yml \
|
||||
-P "ImageID=cirros;NetID=$NET_ID" testStack
|
||||
+--------------------------------------+------------+--------------------+----------------------+
|
||||
| id | stack_name | stack_status | creation_time |
|
||||
+--------------------------------------+------------+--------------------+----------------------+
|
||||
| 477d96b4-d547-4069-938d-32ee990834af | testStack | CREATE_IN_PROGRESS | 2014-04-06T15:11:01Z |
|
||||
+--------------------------------------+------------+--------------------+----------------------+
|
||||
$ heat service-list
|
||||
+------------+-------------+--------------------------------------+------------+--------+----------------------------+--------+
|
||||
| hostname | binary | engine_id | host | topic | updated_at | status |
|
||||
+------------+-------------+--------------------------------------+------------+--------+----------------------------+--------+
|
||||
| controller | heat-engine | 3e85d1ab-a543-41aa-aa97-378c381fb958 | controller | engine | 2015-10-13T14:16:06.000000 | up |
|
||||
| controller | heat-engine | 45dbdcf6-5660-4d5f-973a-c4fc819da678 | controller | engine | 2015-10-13T14:16:06.000000 | up |
|
||||
| controller | heat-engine | 51162b63-ecb8-4c6c-98c6-993af899c4f7 | controller | engine | 2015-10-13T14:16:06.000000 | up |
|
||||
| controller | heat-engine | 8d7edc6d-77a6-460d-bd2a-984d76954646 | controller | engine | 2015-10-13T14:16:06.000000 | up |
|
||||
+------------+-------------+--------------------------------------+------------+--------+----------------------------+--------+
|
||||
|
||||
#. Use the :command:`heat stack-list` command to verify
|
||||
successful creation of the stack:
|
||||
.. note::
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ heat stack-list
|
||||
+--------------------------------------+------------+-----------------+----------------------+
|
||||
| id | stack_name | stack_status | creation_time |
|
||||
+--------------------------------------+------------+-----------------+----------------------+
|
||||
| 477d96b4-d547-4069-938d-32ee990834af | testStack | CREATE_COMPLETE | 2014-04-06T15:11:01Z |
|
||||
+--------------------------------------+------------+-----------------+----------------------+
|
||||
This output should indicate four ``heat-engine`` components
|
||||
on the controller node.
|
||||
|
@ -7,7 +7,7 @@ Add the Orchestration module
|
||||
common/get_started_orchestration.rst
|
||||
heat-install.rst
|
||||
heat-verify.rst
|
||||
heat-next-step.rst
|
||||
heat-next-steps.rst
|
||||
|
||||
The Orchestration module (heat) uses a heat orchestration
|
||||
template (HOT) to create and manage cloud resources.
|
||||
|
135
doc/install-guide/source/launch-instance-heat.rst
Normal file
135
doc/install-guide/source/launch-instance-heat.rst
Normal file
@ -0,0 +1,135 @@
|
||||
.. _launch-instance-heat:
|
||||
|
||||
Orchestration
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Create a template
|
||||
-----------------
|
||||
|
||||
The Orchestration module uses templates to describe stacks.
|
||||
To learn about the template language, see `the Template Guide
|
||||
<http://docs.openstack.org/developer/heat/template_guide/index.html>`__
|
||||
in the `Heat developer documentation
|
||||
<http://docs.openstack.org/developer/heat/index.html>`__.
|
||||
|
||||
#. Create the ``demo-template.yml`` file with the following content:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
heat_template_version: 2015-10-15
|
||||
description: Launch a basic instance using the ``m1.tiny`` flavor and one network.
|
||||
|
||||
parameters:
|
||||
ImageID:
|
||||
type: string
|
||||
description: Image to use for the instance.
|
||||
NetID:
|
||||
type: string
|
||||
description: Network ID to use for the instance.
|
||||
|
||||
resources:
|
||||
server:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
image: { get_param: ImageID }
|
||||
flavor: m1.tiny
|
||||
networks:
|
||||
- network: { get_param: NetID }
|
||||
|
||||
outputs:
|
||||
instance_name:
|
||||
description: Name of the instance.
|
||||
value: { get_attr: [ server, name ] }
|
||||
instance_ip:
|
||||
description: IP address of the instance.
|
||||
value: { get_attr: [ server, first_address ] }
|
||||
|
||||
Create a stack
|
||||
--------------
|
||||
|
||||
Create a stack using the ``demo-template.yml`` template.
|
||||
|
||||
#. Source the ``demo`` credentials to perform
|
||||
the following steps as a non-administrative project:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ source demo-openrc.sh
|
||||
|
||||
#. Determine available networks.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ neutron net-list
|
||||
+--------------------------------------+---------+-----------------------------------------------------+
|
||||
| id | name | subnets |
|
||||
+--------------------------------------+---------+-----------------------------------------------------+
|
||||
| 9c13da20-4c4f-486f-a4e9-692e9ea397f1 | public | 85140549-1f54-4bc6-a2c5-f08428de3f7a 203.0.113.0/24 |
|
||||
| 303a9aaf-40fd-4fc8-9213-39bff933467b | private | ddeba0b1-21eb-471a-8f31-10f0e290cc36 172.16.1.0/24 |
|
||||
+--------------------------------------+---------+-----------------------------------------------------+
|
||||
|
||||
.. note::
|
||||
|
||||
This output may differ from your environment.
|
||||
|
||||
#. Set the ``NET_ID`` environment variable to reflect the ID of a network.
|
||||
For example, using the ``public`` network:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ export NET_ID=$(neutron net-list | awk '/ public / { print $2 }')
|
||||
|
||||
#. Create a stack of one CirrOS instance on the public network:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ heat stack-create -f demo-template.yml \
|
||||
-P "ImageID=cirros;NetID=$NET_ID" stack
|
||||
+--------------------------------------+------------+--------------------+---------------------+--------------+
|
||||
| id | stack_name | stack_status | creation_time | updated_time |
|
||||
+--------------------------------------+------------+--------------------+---------------------+--------------+
|
||||
| dbf46d1b-0b97-4d45-a0b3-9662a1eb6cf3 | stack | CREATE_IN_PROGRESS | 2015-10-13T15:27:20 | None |
|
||||
+--------------------------------------+------------+--------------------+---------------------+--------------+
|
||||
|
||||
#. After a short time, verify successful creation of the stack:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ heat stack-list
|
||||
+--------------------------------------+------------+-----------------+---------------------+--------------+
|
||||
| id | stack_name | stack_status | creation_time | updated_time |
|
||||
+--------------------------------------+------------+-----------------+---------------------+--------------+
|
||||
| dbf46d1b-0b97-4d45-a0b3-9662a1eb6cf3 | stack | CREATE_COMPLETE | 2015-10-13T15:27:20 | None |
|
||||
+--------------------------------------+------------+-----------------+---------------------+--------------+
|
||||
|
||||
#. Show the name and IP address of the instance and compare with the output
|
||||
of the ``nova`` command:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ heat output-show --all stack
|
||||
[
|
||||
{
|
||||
"output_value": "stack-server-3nzfyfofu6d4",
|
||||
"description": "Name of the instance.",
|
||||
"output_key": "instance_name"
|
||||
},
|
||||
{
|
||||
"output_value": "10.4.31.106",
|
||||
"description": "IP address of the instance.",
|
||||
"output_key": "instance_ip"
|
||||
}
|
||||
]
|
||||
|
||||
$ nova list
|
||||
+--------------------------------------+---------------------------+--------+------------+-------------+---------------------------------+
|
||||
| ID | Name | Status | Task State | Power State | Networks |
|
||||
+--------------------------------------+---------------------------+--------+------------+-------------+---------------------------------+
|
||||
| 0fc2af0c-ae79-4d22-8f36-9e860c257da5 | stack-server-3nzfyfofu6d4 | ACTIVE | - | Running | public=10.4.31.106 |
|
||||
+--------------------------------------+---------------------------+--------+------------+-------------+---------------------------------+
|
||||
|
||||
#. Delete the stack.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ heat stack-delete stack
|
@ -128,3 +128,14 @@ volume and attach it to an instance.
|
||||
:maxdepth: 1
|
||||
|
||||
launch-instance-cinder.rst
|
||||
|
||||
Orchestration
|
||||
-------------
|
||||
|
||||
If your environment includes the Orchestration service, you can create
|
||||
a stack that launches an instance.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
launch-instance-heat.rst
|
||||
|
Loading…
Reference in New Issue
Block a user