-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(openstack): add OVHcloud example
- Loading branch information
Showing
2 changed files
with
50 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# We create the OpenStack image by importing directly from the release servers. | ||
resource "openstack_images_image_v2" "flatcar" { | ||
name = "${var.cluster_name}-${var.release_channel}" | ||
image_source_url = "https://${var.release_channel}.release.flatcar-linux.net/amd64-usr/${var.flatcar_version}/flatcar_production_openstack_image.img.gz" | ||
container_format = "bare" | ||
disk_format = "qcow2" | ||
web_download = true | ||
} | ||
|
||
# OVHcloud version, not supporting web_download + specify properties (notably | ||
# for block-storage to avoid using virtio-blk instead of SCSI) | ||
resource "openstack_images_image_v2" "flatcar_ovhcloud" { | ||
name = "${var.cluster_name}-${var.release_channel}.${var.flatcar_version}" | ||
image_source_url = "https://${var.release_channel}.release.flatcar-linux.net/amd64-usr/${var.flatcar_version}/flatcar_production_openstack_image.img.gz" | ||
# XXX do not use it, OVH openstack seems to not handle this well :( | ||
# web_download = false | ||
verify_checksum = true | ||
decompress = true | ||
container_format = "bare" | ||
disk_format = "qcow2" | ||
protected = false | ||
# Use hidden for image retirement/promotion | ||
hidden = false | ||
visibility = "private" | ||
|
||
# See: https://docs.openstack.org/glance/stein/admin/useful-image-properties.html | ||
# See: https://wiki.openstack.org/wiki/VirtDriverImageProperties | ||
properties = { | ||
architecture = "x86_64" | ||
image_original_user = "core" | ||
distro_family = "gentoo" | ||
os_distro = "gentoo" | ||
os_version = var.flatcar_version | ||
os_release_channel = var.release_channel | ||
os_arch = "amd64" | ||
os_type = "linux" | ||
hw_disk_bus = "scsi" | ||
hw_scsi_model = "virtio-scsi" | ||
hypervisor_type = "qemu" | ||
hw_qemu_guest_agent = true | ||
hw_vif_model = "virtio" | ||
hw_vif_multiqueue_enabled = true | ||
hw_time_hpet = true | ||
} | ||
|
||
timeouts { | ||
create = "5m" | ||
} | ||
} |