Skip to content
Snippets Groups Projects
Commit 4f9a24da authored by František Řezníček's avatar František Řezníček
Browse files

feat: add 1tier_public_vm_farm terraform approach

parent 0ac01b8b
No related branches found
No related tags found
No related merge requests found
Showing
with 104 additions and 4 deletions
......@@ -5,16 +5,17 @@ terraform {
module "toplevel" {
# two tier infrastructure (2tier_public_bastion_private_vm_farm module):
# * single public facing tiny bastion VM
# * N private HPC VM farm
# * <nodes_count> private HPC VM farm
source = "./modules/2tier_public_bastion_private_vm_farm"
# single tier infrastructure (1tier_public_vm_farm monule)
# * <nodes_count> public HPC VM farm
#source = "./modules/1tier_public_vm_farm"
infra_name = "vo-enes-org-tf-demo"
nodes_count = 3
nodes_extra_volume_size = 1000 # in GB
#bastion_flavor = "standard.medium"
#bastion_image = "ubuntu-jammy-x86_64"
#nodes_flavor = "hpc.16core-32ram"
#nodes_image = "ubuntu-jammy-x86_64"
}
../common/instances.tf
\ No newline at end of file
../common/keypair.tf
\ No newline at end of file
../common/networks.tf
\ No newline at end of file
../common/nodes-cloudinit.txt
\ No newline at end of file
# Floating IPs
resource "openstack_networking_floatingip_v2" "nodes_fips" {
count = var.nodes_count
pool = var.public_external_network
}
resource "openstack_compute_floatingip_associate_v2" "nodes_fips_associations" {
count = var.nodes_count
floating_ip = element(openstack_networking_floatingip_v2.nodes_fips.*.address, count.index)
instance_id = element(openstack_compute_instance_v2.nodes.*.id, count.index)
}
../common/providers.tf
\ No newline at end of file
../common/secgroup_rules.tf
\ No newline at end of file
variable "infra_name" {
description = "Infrastructure (profile) name. Used as a name prefix. Must match [a-zA-Z0-9-]+ regexp."
default = "vo-enes-org-tf-demo"
}
variable "ssh_public_key" {
default = "~/.ssh/id_rsa.pub"
}
#########################
# master nodes settings #
#########################
variable "nodes_count" {
default = 1
}
variable "nodes_name" {
description = "Name of the nodes. Must match [a-zA-Z0-9-]+ regexp."
default = "server"
}
variable "bastion_name" {
description = "Name of the bastion VM. Must match [a-zA-Z0-9-]+ regexp."
default = "bastion-server"
}
variable "bastion_flavor" {
default = "standard.small"
}
variable "nodes_flavor" {
default = "hpc.16core-32ram"
}
variable "int_network" {
description = "Internal network address, use CIDR notation"
default = "10.10.10.0/24"
}
variable "public_external_network" {
description = "Cloud public external network pool"
default = "public-cesnet-195-113-167-GROUP"
}
variable "bastion_image" {
description = "Bastion OS: Image name"
default = "ubuntu-jammy-x86_64"
}
variable "nodes_image" {
description = "nodes OS: Image name"
default = "ubuntu-jammy-x86_64"
}
variable "bastion_ssh_user_name" {
default = "ubuntu"
}
variable "nodes_ssh_user_name" {
default = "ubuntu"
}
variable "nodes_volume_size" {
description = "The size of the volume to create (in gigabytes) for root filesystem. "
default = "10"
}
variable "nodes_extra_volume_size" {
description = "The size of the volume to create (in gigabytes) for extra data."
default = "10"
}
variable "nodes_extra_volume_type" {
description = "The type of extra volume."
default = "ceph-extra-ec"
}
../common/volumes.tf
\ No newline at end of file
......@@ -27,7 +27,7 @@ variable "bastion_name" {
}
variable "bastion_flavor" {
default = "standard.medium"
default = "standard.small"
}
variable "nodes_flavor" {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment