Skip to content

Instantly share code, notes, and snippets.

@leoh0
Last active January 2, 2020 03:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leoh0/7d374e25ebf7066162b41f7e63bc4e3a to your computer and use it in GitHub Desktop.
Save leoh0/7d374e25ebf7066162b41f7e63bc4e3a to your computer and use it in GitHub Desktop.
Create cirros image by heat template
# http://docs.openstack.org/developer/heat/template_guide/hot_spec.html#heat-template-version
heat_template_version: 2014-10-16
# This template is the equivalent of the command set:
# $ wget http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img
# $ glance image-create --name='cirros image' --container-format=bare --disk-format=qcow2 < cirros-0.3.5-x86_64-disk.img
# or:
# $ glance --os-image-api-version 1 image-create --name='cirros image' --container-format=bare --disk-format=qcow2 --location http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img
description: >
Upload glance image
resources:
glance_image:
# http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Glance::Image
type: OS::Glance::Image
properties:
# Allowed values: ami, ari, aki, bare, ova, ovf
container_format: bare
# Allowed values: ami, ari, aki, vhd, vmdk, raw, qcow2, vdi, iso
disk_format: qcow2
name: Cirros 0.3.5 64-bit
location: https://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment