observer-tofu is deployed need to learn more before writing nix config to pair
This commit is contained in:
parent
f4fe4e7625
commit
63e24789a2
5 changed files with 76 additions and 11 deletions
52
incus/main.tf
Normal file
52
incus/main.tf
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
resource "incus_profile" "d" {
|
||||
name = "d"
|
||||
|
||||
config = {
|
||||
"limits.cpu" = 2
|
||||
"security.nesting" = true
|
||||
"boot.autostart" = true
|
||||
}
|
||||
|
||||
# device {
|
||||
# name = "shared"
|
||||
# type = "disk"
|
||||
|
||||
# properties = {
|
||||
# source = "/tmp"
|
||||
# path = "/tmp"
|
||||
# }
|
||||
# }
|
||||
|
||||
# device {
|
||||
# type = "disk"
|
||||
# name = "root"
|
||||
|
||||
# properties = {
|
||||
# pool = "default"
|
||||
# path = "/"
|
||||
# }
|
||||
# }
|
||||
}
|
||||
|
||||
resource "incus_instance" "observer-tofu" {
|
||||
name = "observer-tofu"
|
||||
image = "images:nixos/25.05/amd64"
|
||||
profiles = [
|
||||
"default",
|
||||
incus_profile.d.name
|
||||
]
|
||||
config = {
|
||||
"limits.cpu" = 2
|
||||
"limits.memory" = "4GiB"
|
||||
}
|
||||
device {
|
||||
name = "http"
|
||||
type = "proxy"
|
||||
properties = {
|
||||
# Listen on Incus host's TCP port 80
|
||||
listen = "tcp:0.0.0.0:8888"
|
||||
# And connect to the instance's TCP port 80
|
||||
connect = "tcp:127.0.0.1:80"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in a new issue