2022-06-01 08:41:51 +02:00
|
|
|
resource "nomad_volume" "jellyfin-cache" {
|
|
|
|
type = "csi"
|
2022-10-27 11:38:38 +02:00
|
|
|
plugin_id = "org.democratic-csi.nfs"
|
2022-06-01 08:41:51 +02:00
|
|
|
volume_id = "jellyfin-cache"
|
|
|
|
name = "jellyfin-cache"
|
|
|
|
external_id = "jellyfin-cache"
|
|
|
|
|
|
|
|
capability {
|
|
|
|
access_mode = "single-node-writer"
|
|
|
|
attachment_mode = "file-system"
|
|
|
|
}
|
|
|
|
|
|
|
|
context = {
|
2022-07-30 23:27:40 +02:00
|
|
|
server = "blowhole.hosts.in.redalder.org"
|
2022-06-01 08:41:51 +02:00
|
|
|
share = "/var/nfs/jellyfin/cache"
|
2022-10-27 11:38:38 +02:00
|
|
|
node_attach_driver = "nfs"
|
|
|
|
provisioner_driver = "node-manual"
|
2022-06-01 08:41:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
mount_options {
|
|
|
|
fs_type = "nfs"
|
2022-10-27 11:38:38 +02:00
|
|
|
mount_flags = [ "nfsvers=3", "hard", "async" ]
|
2022-06-01 08:41:51 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "nomad_volume" "jellyfin-config" {
|
|
|
|
type = "csi"
|
2022-10-27 11:38:38 +02:00
|
|
|
plugin_id = "org.democratic-csi.nfs"
|
2022-06-01 08:41:51 +02:00
|
|
|
volume_id = "jellyfin-config"
|
|
|
|
name = "jellyfin-config"
|
|
|
|
external_id = "jellyfin-config"
|
|
|
|
|
|
|
|
capability {
|
|
|
|
access_mode = "single-node-writer"
|
|
|
|
attachment_mode = "file-system"
|
|
|
|
}
|
|
|
|
|
|
|
|
context = {
|
2022-07-30 23:27:40 +02:00
|
|
|
server = "blowhole.hosts.in.redalder.org"
|
2022-06-01 08:41:51 +02:00
|
|
|
share = "/var/nfs/jellyfin/config"
|
2022-10-27 11:38:38 +02:00
|
|
|
node_attach_driver = "nfs"
|
|
|
|
provisioner_driver = "node-manual"
|
2022-06-01 08:41:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
mount_options {
|
|
|
|
fs_type = "nfs"
|
2022-10-27 11:38:38 +02:00
|
|
|
mount_flags = [ "nfsvers=3", "hard", "async" ]
|
2022-06-01 08:41:51 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "nomad_volume" "jellyfin-media" {
|
|
|
|
type = "csi"
|
2022-10-27 11:38:38 +02:00
|
|
|
plugin_id = "org.democratic-csi.nfs"
|
2022-06-01 08:41:51 +02:00
|
|
|
volume_id = "jellyfin-media"
|
|
|
|
name = "jellyfin-media"
|
|
|
|
external_id = "jellyfin-media"
|
|
|
|
|
|
|
|
capability {
|
|
|
|
access_mode = "single-node-writer"
|
|
|
|
attachment_mode = "file-system"
|
|
|
|
}
|
|
|
|
|
|
|
|
context = {
|
2022-07-30 23:27:40 +02:00
|
|
|
server = "blowhole.hosts.in.redalder.org"
|
2022-06-01 08:41:51 +02:00
|
|
|
share = "/var/nfs/jellyfin/media"
|
2022-10-27 11:38:38 +02:00
|
|
|
node_attach_driver = "nfs"
|
|
|
|
provisioner_driver = "node-manual"
|
2022-06-01 08:41:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
mount_options {
|
|
|
|
fs_type = "nfs"
|
2022-10-27 11:38:38 +02:00
|
|
|
mount_flags = [ "nfsvers=3", "hard", "async" ]
|
2022-06-01 08:41:51 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "nomad_job" "jellyfin" {
|
2022-07-30 23:27:40 +02:00
|
|
|
jobspec = file("${path.module}/job/jellyfin.hcl")
|
2022-06-01 08:41:51 +02:00
|
|
|
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
vars = {
|
|
|
|
# flake_ref = var.flake_ref
|
|
|
|
# flake_sha = var.flake_sha
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|