mirror of
https://git.sr.ht/~magic_rb/cluster
synced 2024-11-28 11:06:15 +01:00
2e61e7ef3c
Signed-off-by: main <magic_rb@redalder.org>
81 lines
1.6 KiB
HCL
81 lines
1.6 KiB
HCL
resource "nomad_volume" "syncthing-data" {
|
|
type = "csi"
|
|
plugin_id = "nfs"
|
|
volume_id = "syncthing-data"
|
|
name = "syncthing-data"
|
|
external_id = "syncthing-data"
|
|
|
|
capability {
|
|
access_mode = "single-node-writer"
|
|
attachment_mode = "file-system"
|
|
}
|
|
|
|
context = {
|
|
server = "blowhole.hosts.in.redalder.org"
|
|
share = "/var/nfs/syncthing/data"
|
|
}
|
|
|
|
mount_options {
|
|
fs_type = "nfs"
|
|
mount_flags = [ "nolock", "hard" ]
|
|
}
|
|
}
|
|
|
|
resource "nomad_volume" "syncthing-storage" {
|
|
type = "csi"
|
|
plugin_id = "nfs"
|
|
volume_id = "syncthing-storage"
|
|
name = "syncthing-storage"
|
|
external_id = "syncthing-storage"
|
|
|
|
capability {
|
|
access_mode = "single-node-writer"
|
|
attachment_mode = "file-system"
|
|
}
|
|
|
|
context = {
|
|
server = "blowhole.hosts.in.redalder.org"
|
|
share = "/var/nfs/syncthing/storage"
|
|
}
|
|
|
|
mount_options {
|
|
fs_type = "nfs"
|
|
mount_flags = [ "nolock", "hard" ]
|
|
}
|
|
}
|
|
|
|
resource "nomad_volume" "syncthing-config" {
|
|
type = "csi"
|
|
plugin_id = "nfs"
|
|
volume_id = "syncthing-config"
|
|
name = "syncthing-config"
|
|
external_id = "syncthing-config"
|
|
|
|
capability {
|
|
access_mode = "single-node-writer"
|
|
attachment_mode = "file-system"
|
|
}
|
|
|
|
context = {
|
|
server = "blowhole.hosts.in.redalder.org"
|
|
share = "/var/nfs/syncthing/config"
|
|
}
|
|
|
|
mount_options {
|
|
fs_type = "nfs"
|
|
mount_flags = [ "nolock", "hard" ]
|
|
}
|
|
}
|
|
|
|
resource "nomad_job" "syncthing" {
|
|
jobspec = file("${path.module}/job/syncthing.hcl")
|
|
|
|
hcl2 {
|
|
enabled = true
|
|
vars = {
|
|
flake_ref = "${var.flake_host}?rev=${var.flake_rev}"
|
|
flake_sha = var.flake_sha
|
|
}
|
|
}
|
|
}
|