Skip to content

Commit

Permalink
added srv-prod-8
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianLempa committed May 19, 2024
1 parent 7228b73 commit 186c69c
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 8 deletions.
14 changes: 14 additions & 0 deletions dns/dns-prod-1/terraform/server.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,20 @@ resource "dns_a_record_set" "srv_prod_7_wildcard" {
ttl = 3600
}

resource "dns_a_record_set" "srv_prod_8" {
zone = "home.clcreative.de."
name = "srv-prod-8"
addresses = ["10.20.0.20"]
ttl = 3600
}

resource "dns_a_record_set" "srv_prod_8_wildcard" {
zone = "home.clcreative.de."
name = "*.srv-prod-8"
addresses = ["10.20.0.20"]
ttl = 3600
}

resource "dns_a_record_set" "srv_demo_1" {
zone = "home.clcreative.de."
name = "srv-demo-1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ source "proxmox-iso" "pkr-ubuntu-jammy-1" {
token = "${var.proxmox_api_token_secret}"
insecure_skip_tls_verify = false

node = "prx-prod-2"
vm_id = "90101"
node = "prx-prod-1"
vm_id = "90001"
vm_name = "pkr-ubuntu-jammy-1"
template_description = "test"
template_description = "Ubuntu 24.04.4 LTS"

iso_file = "local:iso/ubuntu-22.04.3-live-server-amd64.iso"
iso_file = "local:iso/ubuntu-22.04.4-live-server-amd64.iso"
iso_storage_pool = "local"
unmount_iso = true
qemu_agent = true
Expand All @@ -21,7 +21,7 @@ source "proxmox-iso" "pkr-ubuntu-jammy-1" {
memory = "2048"

cloud_init = true
cloud_init_storage_pool = "pv2"
cloud_init_storage_pool = "local-lvm"

vga {
type = "virtio"
Expand All @@ -30,7 +30,7 @@ source "proxmox-iso" "pkr-ubuntu-jammy-1" {
disks {
disk_size = "20G"
format = "raw"
storage_pool = "pv2"
storage_pool = "local-lvm"
type = "virtio"
}

Expand All @@ -53,7 +53,7 @@ source "proxmox-iso" "pkr-ubuntu-jammy-1" {
boot_wait = "6s"
communicator = "ssh"

http_directory = "pkr-ubuntu-jammy-1/http"
http_directory = "90001-pkr-ubuntu-jammy-1/http"

ssh_username = "${var.ssh_username}"
ssh_password = "${var.ssh_password}"
Expand Down Expand Up @@ -96,7 +96,7 @@ build {

# Provisioning the VM Template for Cloud-Init Integration in Proxmox #2
provisioner "file" {
source = "pkr-ubuntu-jammy-1/files/99-pve.cfg"
source = "90001-pkr-ubuntu-jammy-1/files/99-pve.cfg"
destination = "/tmp/99-pve.cfg"
}
provisioner "shell" {
Expand Down
49 changes: 49 additions & 0 deletions proxmox/terraform/20019-srv-prod-8.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
resource "proxmox_vm_qemu" "srv-prod-8" {
name = "srv-prod-8"
desc = "Server Production 8, Main Omni Controller, Ubuntu LTS"
agent = 1
target_node = "prx-prod-1"
qemu_os = "l26" # default other
bios = "seabios" # default=ovmf
tags = "kube"

define_connection_info = false

# -- only important for full clone
vmid = 20019
clone = "pkr-ubuntu-jammy-1"
# full_clone = true
full_clone = false

# -- boot process
onboot = true
startup = "order=3,up=10"
automatic_reboot = false # refuse auto-reboot when changing a setting

cores = 1
sockets = 1
cpu = "host"
memory = 2048

network {
bridge = "vmbr1"
model = "virtio"
tag = -1
}

scsihw = "virtio-scsi-pci" # default virtio-scsi-pci

# -- lifecycle
lifecycle {
ignore_changes = [
disk,
vm_state
]
}

# Cloud Init Settings
ipconfig0 = "ip=10.20.0.20/16,gw=10.20.0.1"
nameserver = "10.20.0.1"
ciuser = "xcad"
sshkeys = var.PUBLIC_SSH_KEY
}

0 comments on commit 186c69c

Please sign in to comment.