mirror of
https://git.sr.ht/~magic_rb/cluster
synced 2024-11-29 11:36:16 +01:00
5ed9ee1903
Signed-off-by: Magic_RB <magic_rb@redalder.org>
58 lines
1.2 KiB
HCL
58 lines
1.2 KiB
HCL
resource "nomad_volume" "baikal-specific" {
|
|
type = "csi"
|
|
plugin_id = "nfs"
|
|
volume_id = "baikal-specific"
|
|
name = "baikal-specific"
|
|
external_id = "baikal-specific"
|
|
|
|
capability {
|
|
access_mode = "single-node-writer"
|
|
attachment_mode = "file-system"
|
|
}
|
|
|
|
context = {
|
|
server = "blowhole.hosts.in.redalder.org"
|
|
share = "/var/nfs/baikal/specific"
|
|
}
|
|
|
|
mount_options {
|
|
fs_type = "nfs"
|
|
mount_flags = [ "nolock", "hard" ]
|
|
}
|
|
}
|
|
|
|
resource "nomad_volume" "baikal-config" {
|
|
type = "csi"
|
|
plugin_id = "nfs"
|
|
volume_id = "baikal-config"
|
|
name = "baikal-config"
|
|
external_id = "baikal-config"
|
|
|
|
capability {
|
|
access_mode = "single-node-writer"
|
|
attachment_mode = "file-system"
|
|
}
|
|
|
|
context = {
|
|
server = "blowhole.hosts.in.redalder.org"
|
|
share = "/var/nfs/baikal/config"
|
|
}
|
|
|
|
mount_options {
|
|
fs_type = "nfs"
|
|
mount_flags = [ "nolock", "hard" ]
|
|
}
|
|
}
|
|
|
|
resource "nomad_job" "baikal" {
|
|
jobspec = file("${path.module}/job/baikal.hcl")
|
|
|
|
hcl2 {
|
|
enabled = true
|
|
vars = {
|
|
flake_ref = "${var.flake_host}?rev=${var.flake_rev}&ref=${var.flake_ref}"
|
|
flake_sha = var.flake_sha
|
|
}
|
|
}
|
|
}
|