OpenStack Orchestration Heat for Creation of a Public Key using Heat Stack
--
The Stack YAML file for creation of a Public key is as
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]# cat 11privatekey.yml
---
# for Newton release of OpenStack
#
heat_template_version: 2016-10-14
description: private key
resources:
privatekey1:
type: OS::Nova::KeyPair
properties:
name: keypair1
save_private_key: true
outputs:
privatekey1_info:
value: { get_attr: [privatekey1]}
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]#
------
Create the stack
The Stack creates a public key with the name of 'Keypair1'
---
openstack stack create -t 11privatekey.yml privatekeypair1
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]# openstack stack create -t 11privatekey.yml privatekeypair1
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| id | 692e74db-2a99-43fe-ad3b-5ff169d982bc |
| stack_name | privatekeypair1 |
| description | private key |
| creation_time | 2017-10-19T21:49:37Z |
| updated_time | None |
| stack_status | CREATE_IN_PROGRESS |
| stack_status_reason | Stack CREATE started |
+---------------------+--------------------------------------+
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]#
--
The stack is being implemented
Confirm the same as keypair1 is created
--
openstack keypair show keypair1
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]# openstack keypair show keypair1
+-------------+-------------------------------------------------+
| Field | Value |
+-------------+-------------------------------------------------+
| created_at | 2017-10-19T21:49:38.000000 |
| deleted | False |
| deleted_at | None |
| fingerprint | 7a:f3:a5:1e:36:86:e7:25:f6:99:3c:b0:75:e7:3f:e1 |
| id | 2 |
| name | keypair1 |
| updated_at | None |
| user_id | 1db28c8710b04be7968935f5edcf0971 |
+-------------+-------------------------------------------------+
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]#
---
No comments:
Post a Comment