Init project
Signed-off-by: Benoit <forgejo@benoit.jp.net>
This commit is contained in:
parent
68ec66881f
commit
ad028b7fbc
4 changed files with 93 additions and 0 deletions
19
forgejo.tf
Normal file
19
forgejo.tf
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
resource "incus_storage_volume" "forgejo_var_lib_forgejo" {
|
||||||
|
name = "forgejo_var_lib_forgejo"
|
||||||
|
pool = incus_storage_pool.default.name
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "incus_instance" "forgejo" {
|
||||||
|
name = "forgejo"
|
||||||
|
image = "forgejo-8.0.3-1benoitjpnet"
|
||||||
|
|
||||||
|
device {
|
||||||
|
name = "var_lib_forgejo"
|
||||||
|
type = "disk"
|
||||||
|
properties = {
|
||||||
|
path = "/var/lib/forgejo"
|
||||||
|
source = incus_storage_volume.forgejo_var_lib_forgejo.name
|
||||||
|
pool = incus_storage_pool.default.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
58
laminar.tf
Normal file
58
laminar.tf
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
resource "incus_storage_volume" "laminar_var_lib_laminar" {
|
||||||
|
name = "laminar_var_lib_laminar"
|
||||||
|
pool = incus_storage_pool.default.name
|
||||||
|
content_type = "block"
|
||||||
|
config = {
|
||||||
|
"size" = "50GiB"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "incus_storage_volume" "laminar_var_lib_incus" {
|
||||||
|
name = "laminar_var_lib_incus"
|
||||||
|
pool = incus_storage_pool.default.name
|
||||||
|
content_type = "block"
|
||||||
|
config = {
|
||||||
|
"size" = "50GiB"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "incus_instance" "laminar" {
|
||||||
|
name = "laminar"
|
||||||
|
image = "images:ubuntu/24.04"
|
||||||
|
type = "virtual-machine"
|
||||||
|
|
||||||
|
limits = {
|
||||||
|
cpu = 6
|
||||||
|
memory = "6GiB"
|
||||||
|
}
|
||||||
|
|
||||||
|
device {
|
||||||
|
name = "root"
|
||||||
|
type = "disk"
|
||||||
|
properties = {
|
||||||
|
size = "25GiB"
|
||||||
|
path = "/"
|
||||||
|
pool = incus_storage_pool.default.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
device {
|
||||||
|
name = "var_lib_laminar"
|
||||||
|
type = "disk"
|
||||||
|
properties = {
|
||||||
|
# Need to be done manually on the VM: path = "/var/lib/laminar"
|
||||||
|
source = incus_storage_volume.laminar_var_lib_laminar.name
|
||||||
|
pool = incus_storage_pool.default.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
device {
|
||||||
|
name = "var_lib_incus"
|
||||||
|
type = "disk"
|
||||||
|
properties = {
|
||||||
|
# Need to be done manually on the VM: path = "/var/lib/incus"
|
||||||
|
source = incus_storage_volume.laminar_var_lib_incus.name
|
||||||
|
pool = incus_storage_pool.default.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
11
main.tf
Normal file
11
main.tf
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
terraform {
|
||||||
|
required_providers {
|
||||||
|
incus = {
|
||||||
|
source = "lxc/incus"
|
||||||
|
#version = "0.1.4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
provider "incus" {
|
||||||
|
}
|
5
storage.tf
Normal file
5
storage.tf
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
resource "incus_storage_pool" "default" {
|
||||||
|
name = "default"
|
||||||
|
driver = "zfs"
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue