mirror of
https://git.sr.ht/~magic_rb/cluster
synced 2024-11-25 09:36:14 +01:00
6835af938c
Signed-off-by: main <magic_rb@redalder.org>
97 lines
2 KiB
HCL
97 lines
2 KiB
HCL
variable "flake_ref" {
|
|
type = string
|
|
}
|
|
|
|
variable "flake_sha" {
|
|
type = string
|
|
}
|
|
|
|
# data "nomad_plugin" "nomad-driver-containerd" {
|
|
# plugin_id = "nomad-driver-containerd"
|
|
# wait_for_healthy = true
|
|
# }
|
|
|
|
resource "nomad_volume" "jellyfin-cache" {
|
|
# depends_on = [data.nomad_plugin.nomad-driver-containerd]
|
|
type = "csi"
|
|
plugin_id = "nfs"
|
|
volume_id = "jellyfin-cache"
|
|
name = "jellyfin-cache"
|
|
external_id = "jellyfin-cache"
|
|
|
|
capability {
|
|
access_mode = "single-node-writer"
|
|
attachment_mode = "file-system"
|
|
}
|
|
|
|
context = {
|
|
server = "blowhole.in.redalder.org"
|
|
share = "/var/nfs/jellyfin/cache"
|
|
}
|
|
|
|
mount_options {
|
|
fs_type = "nfs"
|
|
mount_flags = [ "nolock", "hard" ]
|
|
}
|
|
}
|
|
|
|
resource "nomad_volume" "jellyfin-config" {
|
|
# depends_on = [data.nomad_plugin.nomad-driver-containerd]
|
|
type = "csi"
|
|
plugin_id = "nfs"
|
|
volume_id = "jellyfin-config"
|
|
name = "jellyfin-config"
|
|
external_id = "jellyfin-config"
|
|
|
|
capability {
|
|
access_mode = "single-node-writer"
|
|
attachment_mode = "file-system"
|
|
}
|
|
|
|
context = {
|
|
server = "blowhole.in.redalder.org"
|
|
share = "/var/nfs/jellyfin/config"
|
|
}
|
|
|
|
mount_options {
|
|
fs_type = "nfs"
|
|
mount_flags = [ "nolock", "hard" ]
|
|
}
|
|
}
|
|
|
|
resource "nomad_volume" "jellyfin-media" {
|
|
# depends_on = [data.nomad_plugin.nomad-driver-containerd]
|
|
type = "csi"
|
|
plugin_id = "nfs"
|
|
volume_id = "jellyfin-media"
|
|
name = "jellyfin-media"
|
|
external_id = "jellyfin-media"
|
|
|
|
capability {
|
|
access_mode = "single-node-writer"
|
|
attachment_mode = "file-system"
|
|
}
|
|
|
|
context = {
|
|
server = "blowhole.in.redalder.org"
|
|
share = "/var/nfs/jellyfin/media"
|
|
}
|
|
|
|
mount_options {
|
|
fs_type = "nfs"
|
|
mount_flags = [ "nolock", "hard" ]
|
|
}
|
|
}
|
|
|
|
resource "nomad_job" "jellyfin" {
|
|
jobspec = file("${path.module}/nomad.hcl")
|
|
|
|
hcl2 {
|
|
enabled = true
|
|
vars = {
|
|
# flake_ref = var.flake_ref
|
|
# flake_sha = var.flake_sha
|
|
}
|
|
}
|
|
}
|