Skip to content

Instantly share code, notes, and snippets.

@yellowcrescent
Created July 22, 2023 03:44
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 yellowcrescent/f758918b99811ea5fc5a342e14fa74bd to your computer and use it in GitHub Desktop.
Save yellowcrescent/f758918b99811ea5fc5a342e14fa74bd to your computer and use it in GitHub Desktop.
Openstack Heat example
# Heat example with Glance images
#
# Example using Openstack CLI:
#
# openstack stack create -t heat-example.yaml \
# --parameter service_project=$SERVICE_PROJECT_UUID \
# --parameter image_base_url=$MY_BASE_URL \
# example-base-images
#
# * `$SERVICE_PROJECT_UUID` - Openstack UUID of the `service` project to own the public images
# Example: `f151cb055457442ab415a8adc17f45fe`
# * `$MY_BASE_URL` - The base URL to a custom image repo, with trailing slash
# Example: `https://images.example.com/`
#
#
---
heat_template_version: rocky
description: Upload default images to Glance
parameters:
service_project:
type: string
label: Service project ID
image_base_url:
type: string
label: Base URL for custom images
resources:
my_example_image:
type: OS::Glance::WebImage
properties:
name: "Base URL Example Image"
location:
list_join: [ { get_param: image_base_url }, 'Special-Wordpress-Ubuntu-xenial.qcow2' ]
container_format: bare
disk_format: qcow2
os_distro: ubuntu
os_version: "xenial"
visibility: public
centos_7:
type: OS::Glance::WebImage
properties:
name: "CentOS 7 (el7-x86_64)"
location: "https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2"
container_format: bare
disk_format: qcow2
os_distro: centos
os_version: "7"
visibility: public
centos_8:
type: OS::Glance::WebImage
properties:
name: "CentOS 8 (el8-x86_64)"
location: "https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.3.2011-20201204.2.x86_64.qcow2"
container_format: bare
disk_format: qcow2
os_distro: centos
os_version: "8"
visibility: public
centos_8_stream:
type: OS::Glance::WebImage
properties:
name: "CentOS 8 Stream (el8-x86_64)"
location: "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20201217.0.x86_64.qcow2"
container_format: bare
disk_format: qcow2
os_distro: centos
os_version: "8"
visibility: public
debian_stretch:
type: OS::Glance::WebImage
properties:
name: "Debian 9 (stretch-amd65)"
location: "https://cloud.debian.org/images/cloud/stretch/daily/20200210-166/debian-9-nocloud-amd64-daily-20200210-166.qcow2"
container_format: bare
disk_format: qcow2
os_distro: debian
os_version: stretch
visibility: public
debian_buster:
type: OS::Glance::WebImage
properties:
name: "Debian 10 (buster-amd64)"
location: "https://cloud.debian.org/images/cloud/buster/20201023-432/debian-10-genericcloud-amd64-20201023-432.qcow2"
container_format: bare
disk_format: qcow2
os_distro: debian
os_version: buster
visibility: public
ubuntu_bionic:
type: OS::Glance::WebImage
properties:
name: "Ubuntu 18.04 (bionic-amd64)"
location: "https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img"
container_format: bare
disk_format: qcow2
os_distro: ubuntu
os_version: bionic
visibility: public
ubuntu_focal:
type: OS::Glance::WebImage
properties:
name: "Ubuntu 20.04 (focal-amd64)"
location: "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"
container_format: bare
disk_format: qcow2
os_distro: ubuntu
os_version: focal
visibility: public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment