diff --git a/proxmox/terraform/modules/node/variables.tf b/proxmox/terraform/modules/node/variables.tf index 9d16ac8..ed49e0d 100644 --- a/proxmox/terraform/modules/node/variables.tf +++ b/proxmox/terraform/modules/node/variables.tf @@ -1,127 +1,127 @@ variable "hostname" { description = "Node's hostname" type = string } variable "domainname" { description = "Domain name. If empty the config domain is used as fallback." type = string default = "" } variable "description" { description = "Node's description" type = string } variable "hypervisor" { description = "Hypervisor to install the vm to (choice: orsay, hypervisor3, beaubourg, branly)" type = string } variable "template" { description = "Template created by packer to use (template-debian-10, debian-buster-...)" type = string default = "debian-buster-2020-11-06" } variable "sockets" { description = "Number of sockets" type = number default = 1 } variable "cores" { description = "Number of cores" type = number default = 1 } variable "memory" { description = "Memory in Mb" type = number default = 1024 } variable "networks" { description = "Default networks configuration (id, ip, gateway, macaddr, bridge)" type = list(object({ id = number ip = string gateway = string macaddr = string bridge = string })) default = [] } variable "vmid" { description = "virtual machine id" type = number - default = 0 + default = null } variable "balloon" { description = "ballooning option" type = number default = 0 } variable "numa" { type = bool default = false } variable "storages" { description = "Default disks configuration (storage, size)" type = list(object({ storage = string size = string })) default = [{ storage = "proxmox" size = "32G" }] } variable "config" { description = "Local config to avoid duplication from the main module" type = map(string) } variable "args" { description = "args to pass to the qemu command. should not be used in most cases" type = string default = "" } variable "pre_provision_steps" { description = "List of sequential provisioning steps to apply" type = list(string) default = [] } variable "cicustom" { description = "custom ci parameter" type = string default = "" } variable "full_clone" { description = "Full clone the template" type = bool default = false } variable "cpu" { description = "CPU type possible values (not exhaustive): kvm64, host, ... The default is kvm64 and must be specified to avoid issues on refresh" type = string default = "kvm64" } variable "onboot" { description = "Start the vm on hypervisor boot" type = bool default = true } diff --git a/proxmox/terraform/production/production.tf b/proxmox/terraform/production/production.tf index 6755d98..e018fed 100644 --- a/proxmox/terraform/production/production.tf +++ b/proxmox/terraform/production/production.tf @@ -1,144 +1,138 @@ locals { config = { dns = var.dns domain = "internal.softwareheritage.org" puppet_environment = "production" facter_deployment = "production" facter_subnet = "sesi_rocquencourt" puppet_master = var.puppet_master gateway_ip = "192.168.100.1" user_admin = var.user_admin user_admin_ssh_public_key = var.user_admin_ssh_public_key user_admin_ssh_private_key_path = var.user_admin_ssh_private_key_path } } module "kelvingrove" { source = "../modules/node" config = local.config hostname = "kelvingrove" description = "Keycloak server" hypervisor = "hypervisor3" - vmid = 123 cores = "4" memory = "8192" cpu = "host" numa = true balloon = 0 networks = [{ id = 0 ip = "192.168.100.106" gateway = local.config["gateway_ip"] macaddr = "72:55:5E:58:01:0B" bridge = "vmbr0" }] } module "webapp1" { source = "../modules/node" config = local.config hostname = "webapp1" description = "Webapp for swh-search tests" hypervisor = "branly" - vmid = 125 cores = "2" memory = "8192" balloon = 2048 networks = [{ id = 0 ip = "192.168.100.71" gateway = local.config["gateway_ip"] macaddr = "06:FF:02:95:31:CF" bridge = "vmbr0" }] } module "search1" { source = "../modules/node" config = local.config hostname = "search1" description = "swh-search node" hypervisor = "branly" - vmid = 136 cores = "4" memory = "6144" balloon = 1024 networks = [{ id = 0 ip = "192.168.100.85" gateway = local.config["gateway_ip"] macaddr = "3E:46:D3:88:44:F4" bridge = "vmbr0" }] } module "counters1" { source = "../modules/node" config = local.config hostname = "counters1" description = "swh-counters node" hypervisor = "branly" - vmid = 139 cores = "4" memory = "2048" balloon = 1024 networks = [{ id = 0 ip = "192.168.100.95" gateway = local.config["gateway_ip"] macaddr = "26:8E:7F:D1:F7:99" bridge = "vmbr0" }] } module "worker17" { source = "../modules/node" config = local.config hostname = "worker17" domainname = "softwareheritage.org" description = "swh-worker node (temporary)" hypervisor = "uffizi" - vmid = 143 cores = "10" sockets = "2" memory = "65536" balloon = 1024 networks = [{ id = 0 ip = "192.168.100.43" gateway = local.config["gateway_ip"] macaddr = "36:E0:2D:70:7C:52" bridge = "vmbr0" }] } module "worker18" { source = "../modules/node" config = local.config hostname = "worker18" domainname = "softwareheritage.org" description = "swh-worker node (temporary)" hypervisor = "uffizi" - vmid = 141 cores = "5" sockets = "2" memory = "49152" balloon = 1024 networks = [{ id = 0 ip = "192.168.100.44" gateway = local.config["gateway_ip"] macaddr = "C6:29:D9:ED:9C:6B" bridge = "vmbr0" }] } output "worker18_summary" { value = module.worker18.summary }