2022-07-30 23:27:40 +02:00
|
|
|
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 = {
|
2022-08-26 20:51:11 +02:00
|
|
|
flake_ref = "${var.flake_host}?rev=${var.flake_rev}&ref=${var.flake_ref}"
|
2022-07-30 23:27:40 +02:00
|
|
|
flake_sha = var.flake_sha
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|