2023-04-23 23:20:07 +02:00
|
|
|
# resource "nomad_volume" "hydra-db" {
|
|
|
|
# type = "csi"
|
|
|
|
# plugin_id = "org.democratic-csi.nfs"
|
|
|
|
# volume_id = "hydra-db"
|
|
|
|
# name = "hydra-db"
|
|
|
|
# external_id = "hydra-db"
|
2022-06-01 08:41:51 +02:00
|
|
|
|
2023-04-23 23:20:07 +02:00
|
|
|
# capability {
|
|
|
|
# access_mode = "single-node-writer"
|
|
|
|
# attachment_mode = "file-system"
|
|
|
|
# }
|
2022-06-01 08:41:51 +02:00
|
|
|
|
2023-04-23 23:20:07 +02:00
|
|
|
# context = {
|
|
|
|
# server = "blowhole.hosts.in.redalder.org"
|
|
|
|
# share = "/var/nfs/hydra-db"
|
|
|
|
# node_attach_driver = "nfs"
|
|
|
|
# provisioner_driver = "node-manual"
|
|
|
|
# }
|
2022-06-01 08:41:51 +02:00
|
|
|
|
2023-04-23 23:20:07 +02:00
|
|
|
# mount_options {
|
|
|
|
# fs_type = "nfs"
|
|
|
|
# mount_flags = [ "nfsvers=3", "hard", "async" ]
|
|
|
|
# }
|
|
|
|
# }
|
2022-06-01 08:41:51 +02:00
|
|
|
|
2023-04-23 23:20:07 +02:00
|
|
|
# resource "nomad_volume" "hydra-data" {
|
|
|
|
# type = "csi"
|
|
|
|
# plugin_id = "org.democratic-csi.nfs"
|
|
|
|
# volume_id = "hydra-data"
|
|
|
|
# name = "hydra-data"
|
|
|
|
# external_id = "hydra-data"
|
2022-06-01 08:41:51 +02:00
|
|
|
|
2023-04-23 23:20:07 +02:00
|
|
|
# capability {
|
|
|
|
# access_mode = "single-node-writer"
|
|
|
|
# attachment_mode = "file-system"
|
|
|
|
# }
|
2022-06-01 08:41:51 +02:00
|
|
|
|
2023-04-23 23:20:07 +02:00
|
|
|
# context = {
|
|
|
|
# server = "blowhole.hosts.in.redalder.org"
|
|
|
|
# share = "/var/nfs/hydra-data"
|
|
|
|
# node_attach_driver = "nfs"
|
|
|
|
# provisioner_driver = "node-manual"
|
|
|
|
# }
|
2022-06-01 08:41:51 +02:00
|
|
|
|
2023-04-23 23:20:07 +02:00
|
|
|
# mount_options {
|
|
|
|
# fs_type = "nfs"
|
|
|
|
# mount_flags = [ "nfsvers=3", "hard", "async" ]
|
|
|
|
# }
|
|
|
|
# }
|
2022-06-01 08:41:51 +02:00
|
|
|
|
2023-04-23 23:20:07 +02:00
|
|
|
# resource "nomad_volume" "hydra-nix" {
|
|
|
|
# type = "csi"
|
|
|
|
# plugin_id = "org.democratic-csi.nfs"
|
|
|
|
# volume_id = "hydra-nix"
|
|
|
|
# name = "hydra-nix"
|
|
|
|
# external_id = "hydra-nix"
|
2022-06-01 08:41:51 +02:00
|
|
|
|
2023-04-23 23:20:07 +02:00
|
|
|
# capability {
|
|
|
|
# access_mode = "single-node-writer"
|
|
|
|
# attachment_mode = "file-system"
|
|
|
|
# }
|
2022-06-01 08:41:51 +02:00
|
|
|
|
2023-04-23 23:20:07 +02:00
|
|
|
# context = {
|
|
|
|
# server = "blowhole.hosts.in.redalder.org"
|
|
|
|
# share = "/var/nfs/hydra-nix"
|
|
|
|
# node_attach_driver = "nfs"
|
|
|
|
# provisioner_driver = "node-manual"
|
|
|
|
# }
|
2022-06-01 08:41:51 +02:00
|
|
|
|
2023-04-23 23:20:07 +02:00
|
|
|
# mount_options {
|
|
|
|
# fs_type = "nfs"
|
|
|
|
# mount_flags = [ "nfsvers=3", "hard", "async" ]
|
|
|
|
# }
|
|
|
|
# }
|
2022-06-01 08:41:51 +02:00
|
|
|
|
2023-04-23 23:20:07 +02:00
|
|
|
# resource "vault_policy" "hydra-policy" {
|
|
|
|
# name = "hydra-policy"
|
|
|
|
# policy = <<EOF
|
|
|
|
# path "kv/data/hydra" {
|
|
|
|
# capabilities = ["read"]
|
|
|
|
# }
|
|
|
|
# EOF
|
|
|
|
# }
|
2022-06-01 08:41:51 +02:00
|
|
|
|
2023-04-23 23:20:07 +02:00
|
|
|
# resource "nomad_job" "hydra" {
|
|
|
|
# jobspec = file("${path.module}/job/hydra.hcl")
|
2022-06-01 08:41:51 +02:00
|
|
|
|
2023-04-23 23:20:07 +02:00
|
|
|
# hcl2 {
|
|
|
|
# enabled = true
|
|
|
|
# vars = {
|
|
|
|
# flake_ref = "${var.flake_host}?rev=${var.flake_rev}&ref=${var.flake_ref}"
|
|
|
|
# flake_sha = var.flake_sha
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# }
|