OpenStack Orchestration Heat to implement a glance cirros image heat template
The YAML file for the template is as filename '13cirros64bitimage.yml'
---
# for Newton release of OpenStack
#
heat_template_version: 2016-10-14
description: glance image
resources:
glancecirros64bitimage:
type: OS::Glance::Image
properties:
name: cirros_64_qcow2
is_public: true
container_format: bare
disk_format: qcow2
location: http://webserver.netx.sujit.com/images/cirros-0.3.5-x86_64-disk.img
outputs:
glancecentos64bitimage_info:
value: { get_attr: [ glancecirros64bitimage ] }
------
Running 'openstack stack create' for the stack implementation
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]# openstack stack create -t 13cirros64bitimage.yml cirros64bitglanceimage
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| id | e104d8f7-4a6a-4bb8-9494-d37b5d43b563 |
| stack_name | cirros64bitglanceimage |
| description | glance image |
| creation_time | 2017-10-19T22:17:32Z |
| updated_time | None |
| stack_status | CREATE_IN_PROGRESS |
| stack_status_reason | Stack CREATE started |
+---------------------+--------------------------------------+
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]#
---
Now confirm that the glance image is in place
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]# glance image-list | grep cirros_64_qcow2
| 634b286c-39b3-4540-a9c0-9dde812d548d | cirros_64_qcow2 |
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]#
--
See the image
the image is in place also active
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]# glance image-show 634b286c-39b3-4540-a9c0-9dde812d548d
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | None |
| container_format | bare |
| created_at | 2017-10-19T22:17:33Z |
| disk_format | qcow2 |
| id | 634b286c-39b3-4540-a9c0-9dde812d548d |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros_64_qcow2 |
| owner | 49b25ce4022c492fa0c1eab4fc6c7419 |
| protected | False |
| size | 13267968 |
| status | active |
| tags | [] |
| updated_at | 2017-10-19T22:17:33Z |
| virtual_size | None |
| visibility | public |
+------------------+--------------------------------------+
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]#
-------
No comments:
Post a Comment