Add deluge bittorrent client

This commit is contained in:
2025-11-10 23:27:50 +11:00
parent cf4daacab5
commit a3eaab5a07
3 changed files with 190 additions and 2 deletions

64
2-nomad-config/deluge.tf Normal file
View File

@@ -0,0 +1,64 @@
resource "nomad_job" "deluge" {
jobspec = file("deluge.nomad.hcl")
}
resource "nomad_variable" "deluge" {
path = "nomad/jobs/deluge"
items = {
pia_user = data.sops_file.secrets.data["pia.user"]
pia_pass = data.sops_file.secrets.data["pia.pass"]
}
}
resource "nomad_csi_volume_registration" "unraid_appdata_deluge" {
#Note: Before chaning the definition of this volume you need to stop the jobs that are using it
depends_on = [data.nomad_plugin.smb]
plugin_id = "smb"
volume_id = "unraid_appdata_deluge"
name = "unraid_appdata_deluge"
external_id = "unraid_appdata_deluge"
capability {
access_mode = "single-node-writer"
attachment_mode = "file-system"
}
context = {
source = "//betelgeuse-seven-unraid.lan/appdata"
subDir = "deluge" # Note: Needs to be manually created on the share
}
secrets = {
"username" = "nomad"
"password" = data.sops_file.secrets.data["unraid.nomad"]
}
}
resource "nomad_csi_volume_registration" "unraid_media_deluge" {
#Note: Before chaning the definition of this volume you need to stop the jobs that are using it
depends_on = [data.nomad_plugin.smb]
plugin_id = "smb"
volume_id = "unraid_media_deluge"
name = "unraid_media_deluge"
external_id = "unraid_media_deluge"
capability {
access_mode = "single-node-writer"
attachment_mode = "file-system"
}
context = {
source = "//betelgeuse-seven-unraid.lan/media"
subDir = "downloads"
}
secrets = {
"username" = "nomad"
"password" = data.sops_file.secrets.data["unraid.nomad"]
}
}