Update terraform/terraform.tfvars, terraform/main.tf, terraform/variables.tf, ansible/hosts.ini
This commit is contained in:
@@ -2,17 +2,8 @@
|
|||||||
192.168.20.121
|
192.168.20.121
|
||||||
192.168.20.122
|
192.168.20.122
|
||||||
192.168.20.123
|
192.168.20.123
|
||||||
192.168.20.124
|
|
||||||
192.168.20.125
|
|
||||||
192.168.20.126
|
|
||||||
|
|
||||||
[node]
|
[node]
|
||||||
192.168.20.141
|
|
||||||
192.168.20.142
|
|
||||||
192.168.20.143
|
|
||||||
192.168.20.144
|
|
||||||
192.168.20.145
|
|
||||||
192.168.20.146
|
|
||||||
|
|
||||||
[k3s_cluster:children]
|
[k3s_cluster:children]
|
||||||
master
|
master
|
||||||
|
|||||||
@@ -42,43 +42,43 @@ resource "proxmox_vm_qemu" "k3master" {
|
|||||||
sshkeys = var.sshkeys
|
sshkeys = var.sshkeys
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "proxmox_vm_qemu" "k3server" {
|
#resource "proxmox_vm_qemu" "k3server" {
|
||||||
count = var.k3server.count
|
# count = var.k3server.count
|
||||||
ciuser = "administrator"
|
# ciuser = "administrator"
|
||||||
vmid = "20${var.k3server.ip[count.index]}"
|
# vmid = "20${var.k3server.ip[count.index]}"
|
||||||
name = var.k3server.name[count.index]
|
# name = var.k3server.name[count.index]
|
||||||
target_node = var.k3server.node[count.index]
|
# target_node = var.k3server.node[count.index]
|
||||||
clone = var.k3server.template[count.index]
|
# clone = var.k3server.template[count.index]
|
||||||
full_clone = true
|
# full_clone = true
|
||||||
os_type = "cloud-init"
|
# os_type = "cloud-init"
|
||||||
agent = 1
|
# agent = 1
|
||||||
cores = var.k3server.cores
|
# cores = var.k3server.cores
|
||||||
sockets = 1
|
# sockets = 1
|
||||||
cpu = "host"
|
# cpu = "host"
|
||||||
memory = var.k3server.memory
|
# memory = var.k3server.memory
|
||||||
scsihw = "virtio-scsi-pci"
|
# scsihw = "virtio-scsi-pci"
|
||||||
bootdisk = "scsi0"
|
# bootdisk = "scsi0"
|
||||||
boot = "c"
|
# boot = "c"
|
||||||
onboot = true
|
# onboot = true
|
||||||
disk {
|
# disk {
|
||||||
size = var.k3server.drive[count.index]
|
# size = var.k3server.drive[count.index]
|
||||||
type = "scsi"
|
# type = "scsi"
|
||||||
storage = var.k3server.storage
|
# storage = var.k3server.storage
|
||||||
ssd = 1
|
# ssd = 1
|
||||||
backup = 0
|
# backup = 0
|
||||||
}
|
# }
|
||||||
network {
|
# network {
|
||||||
model = "virtio"
|
# model = "virtio"
|
||||||
bridge = "vmbr1"
|
# bridge = "vmbr1"
|
||||||
}
|
# }
|
||||||
lifecycle {
|
# lifecycle {
|
||||||
ignore_changes = [
|
# ignore_changes = [
|
||||||
network,
|
# network,
|
||||||
]
|
# ]
|
||||||
}
|
# }
|
||||||
#Cloud Init Settings
|
# #Cloud Init Settings
|
||||||
ipconfig0 = "ip=192.168.20.${var.k3server.ip[count.index]}/24,gw=192.168.20.1"
|
# ipconfig0 = "ip=192.168.20.${var.k3server.ip[count.index]}/24,gw=192.168.20.1"
|
||||||
searchdomain = "durp.loc"
|
# searchdomain = "durp.loc"
|
||||||
nameserver = var.dnsserver
|
# nameserver = var.dnsserver
|
||||||
sshkeys = var.sshkeys
|
# sshkeys = var.sshkeys
|
||||||
}
|
#}
|
||||||
|
|||||||
@@ -3,25 +3,25 @@ dnsserver = "192.168.20.1"
|
|||||||
sshkeys = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDTYqag8OKcV6kIitn3Axlyi3Xr9EeybG10wlglw34fYF0pY+OERy7zZKEju4ijZzQ7eWNlcXLYSorm5Tngkvnz4vbM4b9R7gZjTV9drSGDo0BLkMXNuSTrKwGeokcNkxh+HZcWSK4/SE5zPzvkPj1UvmAgQ4P4N79mqPe5/9gAvdrlUWEtuqVdEHc/FMk4kEZsRu4lg58KoghNCRYMYHOyd1rbHsuWpX5NumPxnosWG22jzqj46rUWEXvA7MrCGGbUDlk5+/h7Bvw4O8nGZLEo/qyaYvChTBj/UqYYBssC4VlW/SNJB1yfrklqdtcknmFVJBi174cQtzZDXOerwneh8/+t7wWpcxkWscxYrwdJspzAU/NGk02xDPaG4F1mdgZ6HIZCQAaw/EbaNbiuU+bhdngEIHUvVmdiy4T09FWIWuJxO6FnAiVIU5K8LpqGLTFp7kjOwAczdQ+KVojm/1A5W/ZoTE/y3Ni1fVaOJFCxSgU7qiKAm7hb2ZXvznNgryc="
|
sshkeys = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDTYqag8OKcV6kIitn3Axlyi3Xr9EeybG10wlglw34fYF0pY+OERy7zZKEju4ijZzQ7eWNlcXLYSorm5Tngkvnz4vbM4b9R7gZjTV9drSGDo0BLkMXNuSTrKwGeokcNkxh+HZcWSK4/SE5zPzvkPj1UvmAgQ4P4N79mqPe5/9gAvdrlUWEtuqVdEHc/FMk4kEZsRu4lg58KoghNCRYMYHOyd1rbHsuWpX5NumPxnosWG22jzqj46rUWEXvA7MrCGGbUDlk5+/h7Bvw4O8nGZLEo/qyaYvChTBj/UqYYBssC4VlW/SNJB1yfrklqdtcknmFVJBi174cQtzZDXOerwneh8/+t7wWpcxkWscxYrwdJspzAU/NGk02xDPaG4F1mdgZ6HIZCQAaw/EbaNbiuU+bhdngEIHUvVmdiy4T09FWIWuJxO6FnAiVIU5K8LpqGLTFp7kjOwAczdQ+KVojm/1A5W/ZoTE/y3Ni1fVaOJFCxSgU7qiKAm7hb2ZXvznNgryc="
|
||||||
|
|
||||||
k3master = {
|
k3master = {
|
||||||
count = 6
|
count = 3
|
||||||
name = ["master01", "master02", "master03","master04", "master05", "master06"]
|
name = ["k3s01", "k3s02", "k3s03"]
|
||||||
cores = 2
|
|
||||||
memory = "2048"
|
|
||||||
drive = "20G"
|
|
||||||
storage = "NVMeSSD"
|
|
||||||
template = ["CentOS9-Template","CentOS9-Template","CentOS9-Template","CentOS9-Template2","CentOS9-Template2","CentOS9-Template2"]
|
|
||||||
node = ["overlord","overlord","overlord","mothership","mothership","mothership"]
|
|
||||||
ip = ["121", "122", "123","124", "125", "126"]
|
|
||||||
}
|
|
||||||
|
|
||||||
k3server = {
|
|
||||||
count = 6
|
|
||||||
name = ["node01", "node02","node03", "node04","node05", "node06"]
|
|
||||||
cores = 4
|
cores = 4
|
||||||
memory = "8192"
|
memory = "8192"
|
||||||
drive = ["160G","20G","20G","160G","20G","20G"]
|
drive = "100G"
|
||||||
storage = "NVMeSSD"
|
storage = "NVMeSSD"
|
||||||
template = ["CentOS9-Template","CentOS9-Template","CentOS9-Template","CentOS9-Template2","CentOS9-Template2","CentOS9-Template2"]
|
template = ["CentOS9-Template","CentOS9-Template","CentOS9-Template"]
|
||||||
node = ["overlord","overlord","overlord","mothership","mothership","mothership"]
|
node = ["overlord","overlord","overlord"]
|
||||||
ip = ["141", "142", "143","144", "145", "146"]
|
ip = ["121", "122", "123"]
|
||||||
}
|
}
|
||||||
|
#
|
||||||
|
#k3server = {
|
||||||
|
# count = 0
|
||||||
|
# name = ["node01", "node02","node03", "node04","node05", "node06"]
|
||||||
|
# cores = 4
|
||||||
|
# memory = "8192"
|
||||||
|
# drive = ["160G","20G","20G","160G","20G","20G"]
|
||||||
|
# storage = "NVMeSSD"
|
||||||
|
# template = ["CentOS9-Template","CentOS9-Template","CentOS9-Template","CentOS9-Template2","CentOS9-Template2","CentOS9-Template2"]
|
||||||
|
# node = ["overlord","overlord","overlord","mothership","mothership","mothership"]
|
||||||
|
# ip = ["141", "142", "143","144", "145", "146"]
|
||||||
|
#}
|
||||||
|
|||||||
@@ -39,17 +39,17 @@ variable "k3master" {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "k3server" {
|
#variable "k3server" {
|
||||||
description = "Defaults of worker nodes in K3S"
|
# description = "Defaults of worker nodes in K3S"
|
||||||
type = object({
|
# type = object({
|
||||||
count = number
|
# count = number
|
||||||
name = list(string)
|
# name = list(string)
|
||||||
cores = number
|
# cores = number
|
||||||
memory = number
|
# memory = number
|
||||||
drive = list(string)
|
# drive = list(string)
|
||||||
storage = string
|
# storage = string
|
||||||
template = list(string)
|
# template = list(string)
|
||||||
node = list(string)
|
# node = list(string)
|
||||||
ip = list(number)
|
# ip = list(number)
|
||||||
})
|
# })
|
||||||
}
|
#}
|
||||||
|
|||||||
Reference in New Issue
Block a user