Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Mafyuh/iac
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 90041ebb63a595c482584665a57b636faeeac03b
Choose a base ref
..
head repository: Mafyuh/iac
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c9f3d741227c7b6ee56d496e669cc046eae26c48
Choose a head ref
Showing with 160 additions and 54 deletions.
  1. +10 −0 docker/arm/docker-compose.yml
  2. +1 −1 docker/kasm/docker-compose.yml
  3. +91 −0 terraform/NAS.tf
  4. +58 −53 terraform/runner.tf
10 changes: 10 additions & 0 deletions docker/arm/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -186,6 +186,16 @@ services:
- "1234:3000"
networks:
- gitea_main

dozzle:
container_name: dozzle
image: amir20/dozzle@sha256:83aab3fa5d8b863e5b0083e5a5f1d147af87d60c697f918d3c07e9179895558b
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 8089:8080
networks:
- gitea_main

networks:
gitea_main:
2 changes: 1 addition & 1 deletion docker/kasm/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
services:
kasm:
image: ghcr.io/linuxserver/kasm@sha256:0236fb40d19863d11ab472dc8351db690f1190fac20ea643512318709f22f037
image: ghcr.io/linuxserver/kasm@sha256:ef58b43897f8df9c2dae907c1a4bf8e2cedbbd945266e30a3997bff21fa15eae
container_name: kasm
privileged: true
environment:
91 changes: 91 additions & 0 deletions terraform/NAS.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
resource "proxmox_virtual_environment_vm" "TrueNAS" {

node_name = "prox"
vm_id = 100
name = "TrueNAS"
machine = "q35"

# VM General Settings
tags = [
"debian",
"infrastructure",
]

# CPU Settings
cpu {
cores = 6
type = "qemu64"
sockets = 1
units = 1024
architecture = "x86_64"
}

# Memory Settings
memory {
dedicated = 8192
}

# Network Settings
network_device {
bridge = "vmbr0"
model = "virtio"
firewall = true
}

# Operating System Settings
operating_system {
type = "l26"
}

# VGA Settings
vga {
type = "std"
memory = 16
}

# Startup Settings
startup {
order = 1
down_delay = -1
up_delay = -1
}

# Additional Settings
scsi_hardware = "virtio-scsi-pci"
keyboard_layout = "en-us"
on_boot = true
migrate = false
stop_on_destroy = false
reboot = false

# Timeout Settings
timeout_clone = 1800
timeout_create = 1800
timeout_migrate = 1800
timeout_reboot = 1800
timeout_shutdown_vm = 1800
timeout_start_vm = 1800
timeout_stop_vm = 300

lifecycle {
ignore_changes = [
scsi_hardware,
keyboard_layout,
on_boot,
migrate,
stop_on_destroy,
reboot,
vga,
cpu,
timeout_clone,
timeout_create,
timeout_migrate,
timeout_move_disk,
timeout_reboot,
timeout_shutdown_vm,
timeout_start_vm,
timeout_stop_vm,
]
}

}
111 changes: 58 additions & 53 deletions terraform/runner.tf
Original file line number Diff line number Diff line change
@@ -1,65 +1,70 @@
resource "proxmox_virtual_environment_vm" "Runner" {

# VM General Settings
node_name = "prox"
vm_id = 952
name = "Runner"
description = "Forgejo Runner for iac"
tags = ["tofu", "ubuntu-22", "iac-repo", "infrastructure"]
# VM General Settings
node_name = "prox"
vm_id = 952
name = "Runner"
description = "Forgejo Runner for iac"
tags = ["tofu", "ubuntu-22", "iac-repo", "infrastructure"]

agent {
enabled = true # read 'Qemu guest agent' section, change to true only when ready
}

clone {
vm_id = 8100
}

# VM CPU Settings
cpu {
cores = 2
type = "host"
architecture = "x86_64"
}

# VM Memory Settings
memory {
dedicated = 2048
}
agent {
enabled = true
}

# VM Network Settings
network_device {
bridge = "vmbr0"
}
clone {
vm_id = 8100
}

# VM CPU Settings
cpu {
cores = 2
type = "host"
architecture = "x86_64"
flags = []
}

# VM Memory Settings
memory {
dedicated = 2048
}

# VM Disk Settings
disk {
datastore_id = "Fast2Tb"
size = 40
interface = "scsi0"
}
# VM Network Settings
network_device {
bridge = "vmbr0"
model = "virtio"
}

vga {
type = "serial0"
}
# VM Disk Settings
disk {
datastore_id = "Fast2Tb"
size = 40
interface = "scsi0"
file_format = "raw"
path_in_datastore = "vm-952-disk-0"
}

initialization {
ip_config {
ipv4 {
address = "dhcp"
}
}
vga {
type = "serial0"
}

user_account {}
initialization {
ip_config {
ipv4 {
address = "dhcp"
}
}

lifecycle {
ignore_changes = [
initialization[0].user_account[0].keys,
initialization[0].user_account[0].password,
initialization[0].user_account[0].username,
initialization[0].user_data_file_id
]
}
user_data_file_id = "Slow4tb:snippets/cloud-config.yaml"
}

lifecycle {
ignore_changes = [
initialization[0].user_account,
initialization[0].user_data_file_id,
cpu[0].flags,
disk[0].file_format,
disk[0].path_in_datastore,
]
}

}