Skip to content

Commit 946fdde

Browse files
committedAug 27, 2024
import NAS test, add dozzle
1 parent 74138d5 commit 946fdde

File tree

3 files changed

+156
-53
lines changed

3 files changed

+156
-53
lines changed
 

‎docker/arm/docker-compose.yml

+7
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,13 @@ services:
186186
- "1234:3000"
187187
networks:
188188
- gitea_main
189+
190+
dozzle:
191+
image: amir20/dozzle@sha256:83aab3fa5d8b863e5b0083e5a5f1d147af87d60c697f918d3c07e9179895558b
192+
volumes:
193+
- /var/run/docker.sock:/var/run/docker.sock
194+
ports:
195+
- 8089:8080
189196

190197
networks:
191198
gitea_main:

‎terraform/NAS.tf

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
resource "proxmox_virtual_environment_vm" "TrueNAS" {
2+
3+
node_name = "prox"
4+
vm_id = 100
5+
name = "TrueNAS"
6+
machine = "q35"
7+
8+
# VM General Settings
9+
tags = [
10+
"debian",
11+
"infrastructure",
12+
]
13+
14+
# CPU Settings
15+
cpu {
16+
cores = 6
17+
type = "qemu64"
18+
sockets = 1
19+
units = 1024
20+
architecture = "x86_64"
21+
}
22+
23+
# Memory Settings
24+
memory {
25+
dedicated = 8192
26+
}
27+
28+
# Network Settings
29+
network_device {
30+
bridge = "vmbr0"
31+
model = "virtio"
32+
firewall = true
33+
}
34+
35+
# Operating System Settings
36+
operating_system {
37+
type = "l26"
38+
}
39+
40+
# VGA Settings
41+
vga {
42+
type = "std"
43+
memory = 16
44+
}
45+
46+
# Startup Settings
47+
startup {
48+
order = 1
49+
down_delay = -1
50+
up_delay = -1
51+
}
52+
53+
# Additional Settings
54+
scsi_hardware = "virtio-scsi-pci"
55+
keyboard_layout = "en-us"
56+
on_boot = true
57+
migrate = false
58+
stop_on_destroy = false
59+
reboot = false
60+
61+
# Timeout Settings
62+
timeout_clone = 1800
63+
timeout_create = 1800
64+
timeout_migrate = 1800
65+
timeout_reboot = 1800
66+
timeout_shutdown_vm = 1800
67+
timeout_start_vm = 1800
68+
timeout_stop_vm = 300
69+
70+
lifecycle {
71+
ignore_changes = [
72+
scsi_hardware,
73+
keyboard_layout,
74+
on_boot,
75+
migrate,
76+
stop_on_destroy,
77+
reboot,
78+
vga,
79+
cpu,
80+
timeout_clone,
81+
timeout_create,
82+
timeout_migrate,
83+
timeout_move_disk,
84+
timeout_reboot,
85+
timeout_shutdown_vm,
86+
timeout_start_vm,
87+
timeout_stop_vm,
88+
]
89+
}
90+
91+
}

‎terraform/runner.tf

+58-53
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,70 @@
11
resource "proxmox_virtual_environment_vm" "Runner" {
22

3-
# VM General Settings
4-
node_name = "prox"
5-
vm_id = 952
6-
name = "Runner"
7-
description = "Forgejo Runner for iac"
8-
tags = ["tofu", "ubuntu-22", "iac-repo", "infrastructure"]
3+
# VM General Settings
4+
node_name = "prox"
5+
vm_id = 952
6+
name = "Runner"
7+
description = "Forgejo Runner for iac"
8+
tags = ["tofu", "ubuntu-22", "iac-repo", "infrastructure"]
99

10-
agent {
11-
enabled = true # read 'Qemu guest agent' section, change to true only when ready
12-
}
13-
14-
clone {
15-
vm_id = 8100
16-
}
17-
18-
# VM CPU Settings
19-
cpu {
20-
cores = 2
21-
type = "host"
22-
architecture = "x86_64"
23-
}
24-
25-
# VM Memory Settings
26-
memory {
27-
dedicated = 2048
28-
}
10+
agent {
11+
enabled = true
12+
}
2913

30-
# VM Network Settings
31-
network_device {
32-
bridge = "vmbr0"
33-
}
14+
clone {
15+
vm_id = 8100
16+
}
17+
18+
# VM CPU Settings
19+
cpu {
20+
cores = 2
21+
type = "host"
22+
architecture = "x86_64"
23+
flags = []
24+
}
25+
26+
# VM Memory Settings
27+
memory {
28+
dedicated = 2048
29+
}
3430

35-
# VM Disk Settings
36-
disk {
37-
datastore_id = "Fast2Tb"
38-
size = 40
39-
interface = "scsi0"
40-
}
31+
# VM Network Settings
32+
network_device {
33+
bridge = "vmbr0"
34+
model = "virtio"
35+
}
4136

42-
vga {
43-
type = "serial0"
44-
}
37+
# VM Disk Settings
38+
disk {
39+
datastore_id = "Fast2Tb"
40+
size = 40
41+
interface = "scsi0"
42+
file_format = "raw"
43+
path_in_datastore = "vm-952-disk-0"
44+
}
4545

46-
initialization {
47-
ip_config {
48-
ipv4 {
49-
address = "dhcp"
50-
}
51-
}
46+
vga {
47+
type = "serial0"
48+
}
5249

53-
user_account {}
50+
initialization {
51+
ip_config {
52+
ipv4 {
53+
address = "dhcp"
54+
}
5455
}
5556

56-
lifecycle {
57-
ignore_changes = [
58-
initialization[0].user_account[0].keys,
59-
initialization[0].user_account[0].password,
60-
initialization[0].user_account[0].username,
61-
initialization[0].user_data_file_id
62-
]
63-
}
57+
user_data_file_id = "Slow4tb:snippets/cloud-config.yaml"
58+
}
59+
60+
lifecycle {
61+
ignore_changes = [
62+
initialization[0].user_account,
63+
initialization[0].user_data_file_id,
64+
cpu[0].flags,
65+
disk[0].file_format,
66+
disk[0].path_in_datastore,
67+
]
68+
}
6469

6570
}

0 commit comments

Comments
 (0)
Please sign in to comment.