OpenStack Orchestration Heat Stack to create a network OpenStack Newton
The YAML file for the same as example is as
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]# cat 04net.yml
---
# for Newton release of OpenStack
#
heat_template_version: 2016-10-14
description: having a private network in place
resources:
private_net:
type: OS::Neutron::Net
properties:
name: internal1
shared: true
outputs:
net_info:
value: { get_attr: [private_net]}
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]#
Creation of a stack using the definition above creates a network with the name as "internal".
Running the stack
openstack stack create -t 04net.yml internal1_network
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| id | 95f4779a-ac2e-4d41-aec3-5236d24d0bb3 |
| stack_name | internal1_network |
| description | having a private network in place |
| creation_time | 2017-10-19T20:52:01Z |
| updated_time | None |
| stack_status | CREATE_IN_PROGRESS |
| stack_status_reason | Stack CREATE started |
+---------------------+--------------------------------------+
--------
See the stack information
openstack stack show internal1_network
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------+
| id | 95f4779a-ac2e-4d41-aec3-5236d24d0bb3 |
| stack_name | internal1_network |
| description | having a private network in place |
| creation_time | 2017-10-19T20:52:01Z |
| updated_time | None |
| stack_status | CREATE_COMPLETE |
| stack_status_reason | Stack CREATE completed successfully |
| parameters | OS::project_id: 49b25ce4022c492fa0c1eab4fc6c7419 |
| | OS::stack_id: 95f4779a-ac2e-4d41-aec3-5236d24d0bb3 |
| | OS::stack_name: internal1_network |
| | |
| outputs | - description: No description given |
| | output_error: '''qos_policy_id''' |
| | output_key: net_info |
| | output_value: null |
| | |
| links | - href: http://172.29.240.100:8004/v1/49b25ce4022c492fa0c1eab4fc6c7419/stacks/internal1_network/95f4779a-ac2e-4d41-aec3-5236d24d0bb3 |
| | rel: self |
| | |
| parent | None |
| disable_rollback | True |
| deletion_time | None |
| stack_user_project_id | d409212bfdd14e50beabc71a01dc7627 |
| capabilities | [] |
| notification_topics | [] |
| stack_owner | None |
| timeout_mins | None |
| tags | null |
| | ... |
| | |
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------+
Confirm that the netwrok has been created
openstack network list
So a network has been created, but there are no subnet yet on the network internal1
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]# openstack network list
+--------------------------------------+-----------+--------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+-----------+--------------------------------------+
| 0b26c960-6158-4b20-9156-9d163ceaf2f3 | internal0 | 7206c8e9-64ca-4ba1-abef-12639820fd37 |
| 216e5f0c-e0ed-4c04-b912-37c6967a0038 | internal1 | |
| 3bc5a907-42ad-4fa7-aa53-1e514b42d6df | public0 | d8e83610-7b77-4683-abc5-0cf3b6186395 |
+--------------------------------------+-----------+--------------------------------------+
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]#