2022-10-27 11:39:39 +02:00
|
|
|
resource "nomad_volume" "matrix-synapse" {
|
2022-09-18 18:24:43 +02:00
|
|
|
type = "csi"
|
2022-10-27 11:39:39 +02:00
|
|
|
plugin_id = "org.democratic-csi.nfs"
|
|
|
|
volume_id = "matrix-synapse"
|
|
|
|
name = "matrix-synapse"
|
|
|
|
external_id = "matrix-synapse"
|
2022-09-18 18:24:43 +02:00
|
|
|
|
|
|
|
capability {
|
2023-04-20 11:47:46 +02:00
|
|
|
access_mode = "multi-node-multi-writer"
|
2022-09-18 18:24:43 +02:00
|
|
|
attachment_mode = "file-system"
|
|
|
|
}
|
|
|
|
|
|
|
|
context = {
|
|
|
|
server = "blowhole.hosts.in.redalder.org"
|
2023-05-03 12:07:50 +02:00
|
|
|
share = "/mnt/kyle/infrastructure/matrix/synapse"
|
2022-10-27 11:39:39 +02:00
|
|
|
node_attach_driver = "nfs"
|
|
|
|
provisioner_driver = "node-manual"
|
2022-09-18 18:24:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
mount_options {
|
|
|
|
fs_type = "nfs"
|
2023-05-03 12:07:50 +02:00
|
|
|
mount_flags = [ "hard", "vers=4.2", "rsize=16384", "wsize=16384", "async" ]
|
2022-09-18 18:24:43 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-30 01:21:24 +02:00
|
|
|
resource "nomad_volume" "matrix-postgresql" {
|
|
|
|
type = "csi"
|
|
|
|
plugin_id = "org.democratic-csi.nfs"
|
|
|
|
volume_id = "matrix-postgresql"
|
|
|
|
name = "matrix-postgresql"
|
|
|
|
external_id = "matrix-postgresql"
|
|
|
|
|
|
|
|
capability {
|
|
|
|
access_mode = "single-node-writer"
|
|
|
|
attachment_mode = "file-system"
|
|
|
|
}
|
|
|
|
|
|
|
|
context = {
|
|
|
|
server = "blowhole.hosts.in.redalder.org"
|
2023-05-03 12:07:50 +02:00
|
|
|
share = "/mnt/kyle/infrastructure/matrix/postgresql"
|
2022-10-30 01:21:24 +02:00
|
|
|
node_attach_driver = "nfs"
|
|
|
|
provisioner_driver = "node-manual"
|
|
|
|
}
|
|
|
|
|
|
|
|
mount_options {
|
|
|
|
fs_type = "nfs"
|
2023-05-03 12:07:50 +02:00
|
|
|
mount_flags = [ "hard", "vers=4.2", "rsize=16384", "wsize=16384", "async" ]
|
2022-10-30 01:21:24 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-27 11:39:39 +02:00
|
|
|
resource "nomad_volume" "matrix-registrations" {
|
|
|
|
type = "csi"
|
|
|
|
plugin_id = "org.democratic-csi.nfs"
|
|
|
|
volume_id = "matrix-registrations"
|
|
|
|
name = "matrix-registrations"
|
|
|
|
external_id = "matrix-registrations"
|
|
|
|
|
|
|
|
capability {
|
|
|
|
access_mode = "multi-node-multi-writer"
|
|
|
|
attachment_mode = "file-system"
|
|
|
|
}
|
|
|
|
|
|
|
|
context = {
|
|
|
|
server = "blowhole.hosts.in.redalder.org"
|
2023-05-03 12:07:50 +02:00
|
|
|
share = "/mnt/kyle/infrastructure/matrix/registrations"
|
2022-10-27 11:39:39 +02:00
|
|
|
node_attach_driver = "nfs"
|
|
|
|
provisioner_driver = "node-manual"
|
|
|
|
}
|
|
|
|
|
|
|
|
mount_options {
|
|
|
|
fs_type = "nfs"
|
2023-05-03 12:07:50 +02:00
|
|
|
mount_flags = [ "hard", "vers=4.2", "rsize=16384", "wsize=16384", "async" ]
|
2022-10-27 11:39:39 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "nomad_volume" "matrix-mautrix-facebook" {
|
|
|
|
type = "csi"
|
|
|
|
plugin_id = "org.democratic-csi.nfs"
|
|
|
|
volume_id = "matrix-mautrix-facebook"
|
|
|
|
name = "matrix-mautrix-facebook"
|
|
|
|
external_id = "matrix-mautrix-facebook"
|
|
|
|
|
|
|
|
capability {
|
|
|
|
access_mode = "single-node-writer"
|
|
|
|
attachment_mode = "file-system"
|
|
|
|
}
|
|
|
|
|
|
|
|
context = {
|
|
|
|
server = "blowhole.hosts.in.redalder.org"
|
2023-05-03 12:07:50 +02:00
|
|
|
share = "/mnt/kyle/infrastructure/matrix/mautrix-facebook"
|
2022-10-27 11:39:39 +02:00
|
|
|
node_attach_driver = "nfs"
|
|
|
|
provisioner_driver = "node-manual"
|
|
|
|
}
|
|
|
|
|
|
|
|
mount_options {
|
|
|
|
fs_type = "nfs"
|
2023-05-03 12:07:50 +02:00
|
|
|
mount_flags = [ "hard", "vers=4.2", "rsize=16384", "wsize=16384", "async" ]
|
2022-10-27 11:39:39 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-14 16:27:29 +02:00
|
|
|
resource "nomad_volume" "matrix-mautrix-signal" {
|
|
|
|
type = "csi"
|
|
|
|
plugin_id = "org.democratic-csi.nfs"
|
|
|
|
volume_id = "matrix-mautrix-signal"
|
|
|
|
name = "matrix-mautrix-signal"
|
|
|
|
external_id = "matrix-mautrix-signal"
|
|
|
|
|
|
|
|
capability {
|
|
|
|
access_mode = "single-node-writer"
|
|
|
|
attachment_mode = "file-system"
|
|
|
|
}
|
|
|
|
|
|
|
|
context = {
|
|
|
|
server = "blowhole.hosts.in.redalder.org"
|
|
|
|
share = "/mnt/kyle/infrastructure/matrix/mautrix-signal"
|
|
|
|
node_attach_driver = "nfs"
|
|
|
|
provisioner_driver = "node-manual"
|
|
|
|
}
|
|
|
|
|
|
|
|
mount_options {
|
|
|
|
fs_type = "nfs"
|
|
|
|
mount_flags = [ "hard", "vers=4.2", "rsize=16384", "wsize=16384", "async" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-20 11:47:46 +02:00
|
|
|
resource "nomad_volume" "matrix-redis" {
|
|
|
|
type = "csi"
|
|
|
|
plugin_id = "org.democratic-csi.nfs"
|
|
|
|
volume_id = "matrix-redis"
|
|
|
|
name = "matrix-redis"
|
|
|
|
external_id = "matrix-redis"
|
|
|
|
|
|
|
|
capability {
|
|
|
|
access_mode = "single-node-writer"
|
|
|
|
attachment_mode = "file-system"
|
|
|
|
}
|
|
|
|
|
|
|
|
context = {
|
|
|
|
server = "blowhole.hosts.in.redalder.org"
|
2023-05-03 12:07:50 +02:00
|
|
|
share = "/mnt/kyle/infrastructure/matrix/redis"
|
2023-04-20 11:47:46 +02:00
|
|
|
node_attach_driver = "nfs"
|
|
|
|
provisioner_driver = "node-manual"
|
|
|
|
}
|
|
|
|
|
|
|
|
mount_options {
|
|
|
|
fs_type = "nfs"
|
2023-05-03 12:07:50 +02:00
|
|
|
mount_flags = [ "hard", "vers=4.2", "rsize=16384", "wsize=16384", "async" ]
|
2023-04-20 11:47:46 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-14 16:27:29 +02:00
|
|
|
resource "vault_policy" "matrix-mautrix-signal-policy" {
|
|
|
|
name = "matrix-mautrix-signal-policy"
|
|
|
|
policy = <<EOF
|
|
|
|
path "kv/data/cluster/matrix/mautrix-signal/main" {
|
|
|
|
capabilities = ["read"]
|
|
|
|
}
|
|
|
|
path "kv/data/cluster/matrix/mautrix-signal/postgresql" {
|
|
|
|
capabilities = ["read"]
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
2022-10-27 11:39:39 +02:00
|
|
|
resource "vault_policy" "matrix-mautrix-facebook-policy" {
|
|
|
|
name = "matrix-mautrix-facebook-policy"
|
|
|
|
policy = <<EOF
|
2023-05-14 16:27:29 +02:00
|
|
|
path "kv/data/cluster/matrix/mautrix-facebook/main" {
|
|
|
|
capabilities = ["read"]
|
|
|
|
}
|
|
|
|
path "kv/data/cluster/matrix/mautrix-facebook/postgresql" {
|
2022-10-27 11:39:39 +02:00
|
|
|
capabilities = ["read"]
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "vault_policy" "matrix-synapse-policy" {
|
|
|
|
name = "matrix-synapse-policy"
|
|
|
|
policy = <<EOF
|
2023-04-20 11:47:46 +02:00
|
|
|
path "kv/data/cluster/matrix/synapse" {
|
2022-10-27 11:39:39 +02:00
|
|
|
capabilities = ["read"]
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
2023-05-14 16:27:29 +02:00
|
|
|
resource "vault_policy" "matrix-postgresql-policy" {
|
|
|
|
name = "matrix-postgresql-policy"
|
|
|
|
policy = <<EOF
|
|
|
|
path "kv/data/cluster/matrix/synapse" {
|
|
|
|
capabilities = ["read"]
|
|
|
|
}
|
|
|
|
|
|
|
|
path "kv/data/cluster/matrix/mautrix-facebook/postgresql" {
|
|
|
|
capabilities = ["read"]
|
|
|
|
}
|
|
|
|
|
|
|
|
path "kv/data/cluster/matrix/mautrix-signal/postgresql" {
|
|
|
|
capabilities = ["read"]
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "nomad_job" "matrix-synapse" {
|
|
|
|
jobspec = file("${path.module}/job/matrix-synapse.hcl")
|
|
|
|
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
vars = {
|
|
|
|
flake_ref = "${var.flake_host}?ref=${var.flake_ref}&rev=${var.flake_rev}"
|
|
|
|
flake_sha = var.flake_sha
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "nomad_job" "matrix-mautrix-facebook" {
|
|
|
|
jobspec = file("${path.module}/job/matrix-mautrix-facebook.hcl")
|
|
|
|
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
vars = {
|
|
|
|
flake_ref = "${var.flake_host}?ref=${var.flake_ref}&rev=${var.flake_rev}"
|
|
|
|
flake_sha = var.flake_sha
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "nomad_job" "matrix-mautrix-signal" {
|
|
|
|
jobspec = file("${path.module}/job/matrix-mautrix-signal.hcl")
|
|
|
|
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
vars = {
|
|
|
|
flake_ref = "${var.flake_host}?ref=${var.flake_ref}&rev=${var.flake_rev}"
|
|
|
|
flake_sha = var.flake_sha
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "nomad_job" "matrix-heisenbridge" {
|
|
|
|
jobspec = file("${path.module}/job/matrix-heisenbridge.hcl")
|
2022-09-18 18:24:43 +02:00
|
|
|
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
vars = {
|
2022-10-27 11:39:39 +02:00
|
|
|
flake_ref = "${var.flake_host}?ref=${var.flake_ref}&rev=${var.flake_rev}"
|
2022-09-18 18:24:43 +02:00
|
|
|
flake_sha = var.flake_sha
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|