From a5d165dc858d21483e3ed3031aaf0b8398e509d4 Mon Sep 17 00:00:00 2001 From: Robert Neumann Date: Wed, 25 Sep 2019 14:17:59 +0200 Subject: [PATCH] Customize host root volume size by Terrafrom provisioning (#4239) * print hostnames (#5110) Terrafrom - customize hosts root volume size disable block_device by default value Terraform formatting fix Fixed typos * fix resources after rebase * Fix glusterfs image issue --- contrib/terraform/openstack/kubespray.tf | 5 + .../openstack/modules/compute/main.tf | 377 +++++++++++++++++- .../openstack/modules/compute/variables.tf | 10 + contrib/terraform/openstack/variables.tf | 24 +- 4 files changed, 399 insertions(+), 17 deletions(-) diff --git a/contrib/terraform/openstack/kubespray.tf b/contrib/terraform/openstack/kubespray.tf index 18d9d302d..f7ffaba56 100644 --- a/contrib/terraform/openstack/kubespray.tf +++ b/contrib/terraform/openstack/kubespray.tf @@ -41,6 +41,11 @@ module "compute" { number_of_bastions = "${var.number_of_bastions}" number_of_k8s_nodes_no_floating_ip = "${var.number_of_k8s_nodes_no_floating_ip}" number_of_gfs_nodes_no_floating_ip = "${var.number_of_gfs_nodes_no_floating_ip}" + bastion_root_volume_size_in_gb = "${var.bastion_root_volume_size_in_gb}" + etcd_root_volume_size_in_gb = "${var.etcd_root_volume_size_in_gb}" + master_root_volume_size_in_gb = "${var.master_root_volume_size_in_gb}" + node_root_volume_size_in_gb = "${var.node_root_volume_size_in_gb}" + gfs_root_volume_size_in_gb = "${var.gfs_root_volume_size_in_gb}" gfs_volume_size_in_gb = "${var.gfs_volume_size_in_gb}" public_key_path = "${var.public_key_path}" image = "${var.image}" diff --git a/contrib/terraform/openstack/modules/compute/main.tf b/contrib/terraform/openstack/modules/compute/main.tf index 0b2daa514..abca8ab72 100644 --- a/contrib/terraform/openstack/modules/compute/main.tf +++ b/contrib/terraform/openstack/modules/compute/main.tf @@ -1,3 +1,11 @@ +data "openstack_images_image_v2" "vm_image" { + name = "${var.image}" +} + +data "openstack_images_image_v2" "gfs_image" { + name = "${var.image_gfs == "" ? var.image : var.image_gfs}" +} + resource "openstack_compute_keypair_v2" "k8s" { name = "kubernetes-${var.cluster_name}" public_key = "${chomp(file(var.public_key_path))}" @@ -89,7 +97,7 @@ resource "openstack_networking_secgroup_rule_v2" "worker" { resource "openstack_compute_instance_v2" "bastion" { name = "${var.cluster_name}-bastion-${count.index+1}" - count = "${var.number_of_bastions}" + count = "${var.bastion_root_volume_size_in_gb == 0 ? var.number_of_bastions : 0}" image_name = "${var.image}" flavor_id = "${var.flavor_bastion}" key_pair = "${openstack_compute_keypair_v2.k8s.name}" @@ -113,9 +121,44 @@ resource "openstack_compute_instance_v2" "bastion" { } } +resource "openstack_compute_instance_v2" "bastion_custom_volume_size" { + name = "${var.cluster_name}-bastion-${count.index+1}" + count = "${var.bastion_root_volume_size_in_gb > 0 ? var.number_of_bastions : 0}" + image_name = "${var.image}" + flavor_id = "${var.flavor_bastion}" + key_pair = "${openstack_compute_keypair_v2.k8s.name}" + + block_device { + uuid = "${data.openstack_images_image_v2.vm_image.id}" + source_type = "image" + volume_size = "${var.bastion_root_volume_size_in_gb}" + boot_index = 0 + destination_type = "volume" + delete_on_termination = true + } + + network { + name = "${var.network_name}" + } + + security_groups = ["${openstack_networking_secgroup_v2.k8s.name}", + "${element(openstack_networking_secgroup_v2.bastion.*.name, count.index)}", + ] + + metadata = { + ssh_user = "${var.ssh_user}" + kubespray_groups = "bastion" + depends_on = "${var.network_id}" + } + + provisioner "local-exec" { + command = "sed s/USER/${var.ssh_user}/ ../../contrib/terraform/openstack/ansible_bastion_template.txt | sed s/BASTION_ADDRESS/${var.bastion_fips[0]}/ > group_vars/no-floating.yml" + } +} + resource "openstack_compute_instance_v2" "k8s_master" { name = "${var.cluster_name}-k8s-master-${count.index+1}" - count = "${var.number_of_k8s_masters}" + count = "${var.master_root_volume_size_in_gb == 0 ? var.number_of_k8s_masters : 0}" availability_zone = "${element(var.az_list, count.index)}" image_name = "${var.image}" flavor_id = "${var.flavor_k8s_master}" @@ -140,14 +183,86 @@ resource "openstack_compute_instance_v2" "k8s_master" { } } +resource "openstack_compute_instance_v2" "k8s_master_custom_volume_size" { + name = "${var.cluster_name}-k8s-master-${count.index+1}" + count = "${var.master_root_volume_size_in_gb > 0 ? var.number_of_k8s_masters : 0}" + availability_zone = "${element(var.az_list, count.index)}" + image_name = "${var.image}" + flavor_id = "${var.flavor_k8s_master}" + key_pair = "${openstack_compute_keypair_v2.k8s.name}" + + block_device { + uuid = "${data.openstack_images_image_v2.vm_image.id}" + source_type = "image" + volume_size = "${var.master_root_volume_size_in_gb}" + boot_index = 0 + destination_type = "volume" + delete_on_termination = true + } + + network { + name = "${var.network_name}" + } + + security_groups = ["${openstack_networking_secgroup_v2.k8s_master.name}", + "${openstack_networking_secgroup_v2.k8s.name}", + ] + + metadata = { + ssh_user = "${var.ssh_user}" + kubespray_groups = "etcd,kube-master,${var.supplementary_master_groups},k8s-cluster,vault" + depends_on = "${var.network_id}" + } + + provisioner "local-exec" { + command = "sed s/USER/${var.ssh_user}/ ../../contrib/terraform/openstack/ansible_bastion_template.txt | sed s/BASTION_ADDRESS/${element( concat(var.bastion_fips, var.k8s_master_fips), 0)}/ > group_vars/no-floating.yml" + } +} + resource "openstack_compute_instance_v2" "k8s_master_no_etcd" { name = "${var.cluster_name}-k8s-master-ne-${count.index+1}" - count = "${var.number_of_k8s_masters_no_etcd}" + count = "${var.master_root_volume_size_in_gb == 0 ? var.number_of_k8s_masters_no_etcd : 0}" + availability_zone = "${element(var.az_list, count.index)}" + image_name = "${var.image}" + flavor_id = "${var.flavor_k8s_master}" + key_pair = "${openstack_compute_keypair_v2.k8s.name}" + + network { + name = "${var.network_name}" + } + + security_groups = ["${openstack_networking_secgroup_v2.k8s_master.name}", + "${openstack_networking_secgroup_v2.k8s.name}", + ] + + metadata = { + ssh_user = "${var.ssh_user}" + kubespray_groups = "kube-master,${var.supplementary_master_groups},k8s-cluster,vault" + depends_on = "${var.network_id}" + } + + provisioner "local-exec" { + command = "sed s/USER/${var.ssh_user}/ ../../contrib/terraform/openstack/ansible_bastion_template.txt | sed s/BASTION_ADDRESS/${element( concat(var.bastion_fips, var.k8s_master_fips), 0)}/ > group_vars/no-floating.yml" + } +} + +resource "openstack_compute_instance_v2" "k8s_master_no_etcd_custom_volume_size" { + name = "${var.cluster_name}-k8s-master-ne-${count.index+1}" + count = "${var.master_root_volume_size_in_gb > 0 ? var.number_of_k8s_masters_no_etcd : 0}" availability_zone = "${element(var.az_list, count.index)}" image_name = "${var.image}" flavor_id = "${var.flavor_k8s_master}" key_pair = "${openstack_compute_keypair_v2.k8s.name}" + block_device { + uuid = "${data.openstack_images_image_v2.vm_image.id}" + source_type = "image" + volume_size = "${var.master_root_volume_size_in_gb}" + boot_index = 0 + destination_type = "volume" + delete_on_termination = true + } + network { name = "${var.network_name}" } @@ -169,7 +284,7 @@ resource "openstack_compute_instance_v2" "k8s_master_no_etcd" { resource "openstack_compute_instance_v2" "etcd" { name = "${var.cluster_name}-etcd-${count.index+1}" - count = "${var.number_of_etcd}" + count = "${var.etcd_root_volume_size_in_gb == 0 ? var.number_of_etcd : 0}" availability_zone = "${element(var.az_list, count.index)}" image_name = "${var.image}" flavor_id = "${var.flavor_etcd}" @@ -188,14 +303,76 @@ resource "openstack_compute_instance_v2" "etcd" { } } +resource "openstack_compute_instance_v2" "etcd_custom_volume_size" { + name = "${var.cluster_name}-etcd-${count.index+1}" + count = "${var.etcd_root_volume_size_in_gb > 0 ? var.number_of_etcd : 0}" + availability_zone = "${element(var.az_list, count.index)}" + image_name = "${var.image}" + flavor_id = "${var.flavor_etcd}" + key_pair = "${openstack_compute_keypair_v2.k8s.name}" + + block_device { + uuid = "${data.openstack_images_image_v2.vm_image.id}" + source_type = "image" + volume_size = "${var.etcd_root_volume_size_in_gb}" + boot_index = 0 + destination_type = "volume" + delete_on_termination = true + } + + network { + name = "${var.network_name}" + } + + security_groups = ["${openstack_networking_secgroup_v2.k8s.name}"] + + metadata = { + ssh_user = "${var.ssh_user}" + kubespray_groups = "etcd,vault,no-floating" + depends_on = "${var.network_id}" + } +} + resource "openstack_compute_instance_v2" "k8s_master_no_floating_ip" { name = "${var.cluster_name}-k8s-master-nf-${count.index+1}" - count = "${var.number_of_k8s_masters_no_floating_ip}" + count = "${var.master_root_volume_size_in_gb == 0 ? var.number_of_k8s_masters_no_floating_ip : 0}" + availability_zone = "${element(var.az_list, count.index)}" + image_name = "${var.image}" + flavor_id = "${var.flavor_k8s_master}" + key_pair = "${openstack_compute_keypair_v2.k8s.name}" + + network { + name = "${var.network_name}" + } + + security_groups = ["${openstack_networking_secgroup_v2.k8s_master.name}", + "${openstack_networking_secgroup_v2.k8s.name}", + ] + + metadata = { + ssh_user = "${var.ssh_user}" + kubespray_groups = "etcd,kube-master,${var.supplementary_master_groups},k8s-cluster,vault,no-floating" + depends_on = "${var.network_id}" + } +} + +resource "openstack_compute_instance_v2" "k8s_master_no_floating_ip_custom_volume_size" { + name = "${var.cluster_name}-k8s-master-nf-${count.index+1}" + count = "${var.master_root_volume_size_in_gb > 0 ? var.number_of_k8s_masters_no_floating_ip : 0}" availability_zone = "${element(var.az_list, count.index)}" image_name = "${var.image}" flavor_id = "${var.flavor_k8s_master}" key_pair = "${openstack_compute_keypair_v2.k8s.name}" + block_device { + uuid = "${data.openstack_images_image_v2.vm_image.id}" + source_type = "image" + volume_size = "${var.master_root_volume_size_in_gb}" + boot_index = 0 + destination_type = "volume" + delete_on_termination = true + } + network { name = "${var.network_name}" } @@ -213,7 +390,7 @@ resource "openstack_compute_instance_v2" "k8s_master_no_floating_ip" { resource "openstack_compute_instance_v2" "k8s_master_no_floating_ip_no_etcd" { name = "${var.cluster_name}-k8s-master-ne-nf-${count.index+1}" - count = "${var.number_of_k8s_masters_no_floating_ip_no_etcd}" + count = "${var.master_root_volume_size_in_gb == 0 ? var.number_of_k8s_masters_no_floating_ip_no_etcd : 0}" availability_zone = "${element(var.az_list, count.index)}" image_name = "${var.image}" flavor_id = "${var.flavor_k8s_master}" @@ -234,9 +411,41 @@ resource "openstack_compute_instance_v2" "k8s_master_no_floating_ip_no_etcd" { } } +resource "openstack_compute_instance_v2" "k8s_master_no_floating_ip_no_etcd_custom_volume_size" { + name = "${var.cluster_name}-k8s-master-ne-nf-${count.index+1}" + count = "${var.master_root_volume_size_in_gb > 0 ? var.number_of_k8s_masters_no_floating_ip_no_etcd : 0}" + availability_zone = "${element(var.az_list, count.index)}" + image_name = "${var.image}" + flavor_id = "${var.flavor_k8s_master}" + key_pair = "${openstack_compute_keypair_v2.k8s.name}" + + block_device { + uuid = "${data.openstack_images_image_v2.vm_image.id}" + source_type = "image" + volume_size = "${var.master_root_volume_size_in_gb}" + boot_index = 0 + destination_type = "volume" + delete_on_termination = true + } + + network { + name = "${var.network_name}" + } + + security_groups = ["${openstack_networking_secgroup_v2.k8s_master.name}", + "${openstack_networking_secgroup_v2.k8s.name}", + ] + + metadata = { + ssh_user = "${var.ssh_user}" + kubespray_groups = "kube-master,${var.supplementary_master_groups},k8s-cluster,vault,no-floating" + depends_on = "${var.network_id}" + } +} + resource "openstack_compute_instance_v2" "k8s_node" { name = "${var.cluster_name}-k8s-node-${count.index+1}" - count = "${var.number_of_k8s_nodes}" + count = "${var.node_root_volume_size_in_gb == 0 ? var.number_of_k8s_nodes : 0}" availability_zone = "${element(var.az_list, count.index)}" image_name = "${var.image}" flavor_id = "${var.flavor_k8s_node}" @@ -261,14 +470,82 @@ resource "openstack_compute_instance_v2" "k8s_node" { } } +resource "openstack_compute_instance_v2" "k8s_node_custom_volume_size" { + name = "${var.cluster_name}-k8s-node-${count.index+1}" + count = "${var.node_root_volume_size_in_gb > 0 ? var.number_of_k8s_nodes : 0}" + availability_zone = "${element(var.az_list, count.index)}" + image_name = "${var.image}" + flavor_id = "${var.flavor_k8s_node}" + key_pair = "${openstack_compute_keypair_v2.k8s.name}" + + block_device { + uuid = "${data.openstack_images_image_v2.vm_image.id}" + source_type = "image" + volume_size = "${var.node_root_volume_size_in_gb}" + boot_index = 0 + destination_type = "volume" + delete_on_termination = true + } + + network { + name = "${var.network_name}" + } + + security_groups = ["${openstack_networking_secgroup_v2.k8s.name}", + "${openstack_networking_secgroup_v2.worker.name}", + ] + + metadata = { + ssh_user = "${var.ssh_user}" + kubespray_groups = "kube-node,k8s-cluster,${var.supplementary_node_groups}" + depends_on = "${var.network_id}" + } + + provisioner "local-exec" { + command = "sed s/USER/${var.ssh_user}/ ../../contrib/terraform/openstack/ansible_bastion_template.txt | sed s/BASTION_ADDRESS/${element( concat(var.bastion_fips, var.k8s_node_fips), 0)}/ > group_vars/no-floating.yml" + } +} + resource "openstack_compute_instance_v2" "k8s_node_no_floating_ip" { name = "${var.cluster_name}-k8s-node-nf-${count.index+1}" - count = "${var.number_of_k8s_nodes_no_floating_ip}" + count = "${var.node_root_volume_size_in_gb == 0 ? var.number_of_k8s_nodes_no_floating_ip : 0}" + availability_zone = "${element(var.az_list, count.index)}" + image_name = "${var.image}" + flavor_id = "${var.flavor_k8s_node}" + key_pair = "${openstack_compute_keypair_v2.k8s.name}" + + network { + name = "${var.network_name}" + } + + security_groups = ["${openstack_networking_secgroup_v2.k8s.name}", + "${openstack_networking_secgroup_v2.worker.name}", + ] + + metadata = { + ssh_user = "${var.ssh_user}" + kubespray_groups = "kube-node,k8s-cluster,no-floating,${var.supplementary_node_groups}" + depends_on = "${var.network_id}" + } +} + +resource "openstack_compute_instance_v2" "k8s_node_no_floating_ip_custom_volume_size" { + name = "${var.cluster_name}-k8s-node-nf-${count.index+1}" + count = "${var.node_root_volume_size_in_gb > 0 ? var.number_of_k8s_nodes_no_floating_ip : 0}" availability_zone = "${element(var.az_list, count.index)}" image_name = "${var.image}" flavor_id = "${var.flavor_k8s_node}" key_pair = "${openstack_compute_keypair_v2.k8s.name}" + block_device { + uuid = "${data.openstack_images_image_v2.vm_image.id}" + source_type = "image" + volume_size = "${var.node_root_volume_size_in_gb}" + boot_index = 0 + destination_type = "volume" + delete_on_termination = true + } + network { name = "${var.network_name}" } @@ -285,42 +562,76 @@ resource "openstack_compute_instance_v2" "k8s_node_no_floating_ip" { } resource "openstack_compute_floatingip_associate_v2" "bastion" { - count = "${var.number_of_bastions}" + count = "${var.bastion_root_volume_size_in_gb == 0 ? var.number_of_bastions : 0}" floating_ip = "${var.bastion_fips[count.index]}" instance_id = "${element(openstack_compute_instance_v2.bastion.*.id, count.index)}" wait_until_associated = "${var.wait_for_floatingip}" } +resource "openstack_compute_floatingip_associate_v2" "bastion_custom_volume_size" { + count = "${var.bastion_root_volume_size_in_gb > 0 ? var.number_of_bastions : 0}" + floating_ip = "${var.bastion_fips[count.index]}" + instance_id = "${element(openstack_compute_instance_v2.bastion_custom_volume_size.*.id, count.index)}" + wait_until_associated = "${var.wait_for_floatingip}" +} + resource "openstack_compute_floatingip_associate_v2" "k8s_master" { - count = "${var.number_of_k8s_masters}" + count = "${var.master_root_volume_size_in_gb == 0 ? var.number_of_k8s_masters : 0}" instance_id = "${element(openstack_compute_instance_v2.k8s_master.*.id, count.index)}" floating_ip = "${var.k8s_master_fips[count.index]}" wait_until_associated = "${var.wait_for_floatingip}" } +resource "openstack_compute_floatingip_associate_v2" "k8s_master_custom_volume_size" { + count = "${var.master_root_volume_size_in_gb > 0 ? var.number_of_k8s_masters : 0}" + instance_id = "${element(openstack_compute_instance_v2.k8s_master_custom_volume_size.*.id, count.index)}" + floating_ip = "${var.k8s_master_fips[count.index]}" + wait_until_associated = "${var.wait_for_floatingip}" +} + resource "openstack_compute_floatingip_associate_v2" "k8s_master_no_etcd" { - count = "${var.number_of_k8s_masters_no_etcd}" + count = "${var.master_root_volume_size_in_gb == 0 ? var.number_of_k8s_masters_no_etcd : 0}" instance_id = "${element(openstack_compute_instance_v2.k8s_master_no_etcd.*.id, count.index)}" floating_ip = "${var.k8s_master_no_etcd_fips[count.index]}" } +resource "openstack_compute_floatingip_associate_v2" "k8s_master_no_etcd_custom_volume_size" { + count = "${var.master_root_volume_size_in_gb > 0 ? var.number_of_k8s_masters_no_etcd : 0}" + instance_id = "${element(openstack_compute_instance_v2.k8s_master_no_etcd_custom_volume_size.*.id, count.index)}" + floating_ip = "${var.k8s_master_no_etcd_fips[count.index]}" +} + resource "openstack_compute_floatingip_associate_v2" "k8s_node" { - count = "${var.number_of_k8s_nodes}" + count = "${var.node_root_volume_size_in_gb == 0 ? var.number_of_k8s_nodes : 0}" floating_ip = "${var.k8s_node_fips[count.index]}" instance_id = "${element(openstack_compute_instance_v2.k8s_node.*.id, count.index)}" wait_until_associated = "${var.wait_for_floatingip}" } +resource "openstack_compute_floatingip_associate_v2" "k8s_node_custom_volume_size" { + count = "${var.node_root_volume_size_in_gb > 0 ? var.number_of_k8s_nodes : 0}" + floating_ip = "${var.k8s_node_fips[count.index]}" + instance_id = "${element(openstack_compute_instance_v2.k8s_node_custom_volume_size.*.id, count.index)}" + wait_until_associated = "${var.wait_for_floatingip}" +} + resource "openstack_blockstorage_volume_v2" "glusterfs_volume" { name = "${var.cluster_name}-glusterfs_volume-${count.index+1}" - count = "${var.number_of_gfs_nodes_no_floating_ip}" + count = "${var.gfs_root_volume_size_in_gb == 0 ? var.number_of_gfs_nodes_no_floating_ip : 0}" + description = "Non-ephemeral volume for GlusterFS" + size = "${var.gfs_volume_size_in_gb}" +} + +resource "openstack_blockstorage_volume_v2" "glusterfs_volume_custom_volume_size" { + name = "${var.cluster_name}-glusterfs_volume-${count.index+1}" + count = "${var.gfs_root_volume_size_in_gb > 0 ? var.number_of_gfs_nodes_no_floating_ip : 0}" description = "Non-ephemeral volume for GlusterFS" size = "${var.gfs_volume_size_in_gb}" } resource "openstack_compute_instance_v2" "glusterfs_node_no_floating_ip" { name = "${var.cluster_name}-gfs-node-nf-${count.index+1}" - count = "${var.number_of_gfs_nodes_no_floating_ip}" + count = "${var.gfs_root_volume_size_in_gb == 0 ? var.number_of_gfs_nodes_no_floating_ip : 0}" availability_zone = "${element(var.az_list, count.index)}" image_name = "${var.image_gfs}" flavor_id = "${var.flavor_gfs_node}" @@ -339,8 +650,44 @@ resource "openstack_compute_instance_v2" "glusterfs_node_no_floating_ip" { } } +resource "openstack_compute_instance_v2" "glusterfs_node_no_floating_ip_custom_volume_size" { + name = "${var.cluster_name}-gfs-node-nf-${count.index+1}" + count = "${var.gfs_root_volume_size_in_gb > 0 ? var.number_of_gfs_nodes_no_floating_ip : 0}" + availability_zone = "${element(var.az_list, count.index)}" + image_name = "${var.image}" + flavor_id = "${var.flavor_gfs_node}" + key_pair = "${openstack_compute_keypair_v2.k8s.name}" + + block_device { + uuid = "${data.openstack_images_image_v2.gfs_image.id}" + source_type = "image" + volume_size = "${var.gfs_root_volume_size_in_gb}" + boot_index = 0 + destination_type = "volume" + delete_on_termination = true + } + + network { + name = "${var.network_name}" + } + + security_groups = ["${openstack_networking_secgroup_v2.k8s.name}"] + + metadata = { + ssh_user = "${var.ssh_user_gfs}" + kubespray_groups = "gfs-cluster,network-storage,no-floating" + depends_on = "${var.network_id}" + } +} + resource "openstack_compute_volume_attach_v2" "glusterfs_volume" { - count = "${var.number_of_gfs_nodes_no_floating_ip}" + count = "${var.gfs_root_volume_size_in_gb == 0 ? var.number_of_gfs_nodes_no_floating_ip : 0}" instance_id = "${element(openstack_compute_instance_v2.glusterfs_node_no_floating_ip.*.id, count.index)}" volume_id = "${element(openstack_blockstorage_volume_v2.glusterfs_volume.*.id, count.index)}" } + +resource "openstack_compute_volume_attach_v2" "glusterfs_volume_custom_root_volume_size" { + count = "${var.gfs_root_volume_size_in_gb > 0 ? var.number_of_gfs_nodes_no_floating_ip : 0}" + instance_id = "${element(openstack_compute_instance_v2.glusterfs_node_no_floating_ip_custom_volume_size.*.id, count.index)}" + volume_id = "${element(openstack_blockstorage_volume_v2.glusterfs_volume_custom_volume_size.*.id, count.index)}" +} diff --git a/contrib/terraform/openstack/modules/compute/variables.tf b/contrib/terraform/openstack/modules/compute/variables.tf index 7362f37d1..06d48aa5a 100644 --- a/contrib/terraform/openstack/modules/compute/variables.tf +++ b/contrib/terraform/openstack/modules/compute/variables.tf @@ -22,6 +22,16 @@ variable "number_of_bastions" {} variable "number_of_gfs_nodes_no_floating_ip" {} +variable "bastion_root_volume_size_in_gb" {} + +variable "etcd_root_volume_size_in_gb" {} + +variable "master_root_volume_size_in_gb" {} + +variable "node_root_volume_size_in_gb" {} + +variable "gfs_root_volume_size_in_gb" {} + variable "gfs_volume_size_in_gb" {} variable "public_key_path" {} diff --git a/contrib/terraform/openstack/variables.tf b/contrib/terraform/openstack/variables.tf index a8c2cf548..b22ac5b14 100644 --- a/contrib/terraform/openstack/variables.tf +++ b/contrib/terraform/openstack/variables.tf @@ -44,6 +44,26 @@ variable "number_of_gfs_nodes_no_floating_ip" { default = 0 } +variable "bastion_root_volume_size_in_gb" { + default = 0 +} + +variable "etcd_root_volume_size_in_gb" { + default = 0 +} + +variable "master_root_volume_size_in_gb" { + default = 0 +} + +variable "node_root_volume_size_in_gb" { + default = 0 +} + +variable "gfs_root_volume_size_in_gb" { + default = 0 +} + variable "gfs_volume_size_in_gb" { default = 75 } @@ -55,12 +75,12 @@ variable "public_key_path" { variable "image" { description = "the image to use" - default = "ubuntu-14.04" + default = "" } variable "image_gfs" { description = "Glance image to use for GlusterFS" - default = "ubuntu-16.04" + default = "" } variable "ssh_user" {