import NAS test, add dozzle

This commit is contained in:
Matt Reeves 2024-08-27 17:08:02 -04:00
parent 74138d5870
commit 946fddeeeb
3 changed files with 160 additions and 57 deletions

View file

@ -186,6 +186,13 @@ services:
- "1234:3000" - "1234:3000"
networks: networks:
- gitea_main - gitea_main
dozzle:
image: amir20/dozzle@sha256:83aab3fa5d8b863e5b0083e5a5f1d147af87d60c697f918d3c07e9179895558b
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 8089:8080
networks: networks:
gitea_main: gitea_main:

91
terraform/NAS.tf Normal file
View file

@ -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,
]
}
}

View file

@ -1,65 +1,70 @@
resource "proxmox_virtual_environment_vm" "Runner" { resource "proxmox_virtual_environment_vm" "Runner" {
# VM General Settings # VM General Settings
node_name = "prox" node_name = "prox"
vm_id = 952 vm_id = 952
name = "Runner" name = "Runner"
description = "Forgejo Runner for iac" description = "Forgejo Runner for iac"
tags = ["tofu", "ubuntu-22", "iac-repo", "infrastructure"] tags = ["tofu", "ubuntu-22", "iac-repo", "infrastructure"]
agent { agent {
enabled = true # read 'Qemu guest agent' section, change to true only when ready enabled = true
}
clone {
vm_id = 8100
}
# VM CPU Settings
cpu {
cores = 2
type = "host"
architecture = "x86_64"
flags = []
}
# VM Memory Settings
memory {
dedicated = 2048
}
# VM Network Settings
network_device {
bridge = "vmbr0"
model = "virtio"
}
# VM Disk Settings
disk {
datastore_id = "Fast2Tb"
size = 40
interface = "scsi0"
file_format = "raw"
path_in_datastore = "vm-952-disk-0"
}
vga {
type = "serial0"
}
initialization {
ip_config {
ipv4 {
address = "dhcp"
}
} }
clone { user_data_file_id = "Slow4tb:snippets/cloud-config.yaml"
vm_id = 8100 }
}
# VM CPU Settings
cpu {
cores = 2
type = "host"
architecture = "x86_64"
}
# VM Memory Settings
memory {
dedicated = 2048
}
# VM Network Settings lifecycle {
network_device { ignore_changes = [
bridge = "vmbr0" initialization[0].user_account,
} initialization[0].user_data_file_id,
cpu[0].flags,
# VM Disk Settings disk[0].file_format,
disk { disk[0].path_in_datastore,
datastore_id = "Fast2Tb" ]
size = 40 }
interface = "scsi0"
}
vga {
type = "serial0"
}
initialization {
ip_config {
ipv4 {
address = "dhcp"
}
}
user_account {}
}
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
]
}
} }