From f90f6166aea73cbda45160649add0528e458aa26 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sun, 10 Aug 2025 19:55:01 +1000 Subject: [PATCH] feat: add s3 interface - add 5 ceph rgw containers --- config/instances/ausyd1nxvm2115/config.yaml | 7 +++ .../instances/ausyd1nxvm2115/terragrunt.hcl | 52 +++++++++++++++++++ config/instances/ausyd1nxvm2116/config.yaml | 7 +++ .../instances/ausyd1nxvm2116/terragrunt.hcl | 52 +++++++++++++++++++ config/instances/ausyd1nxvm2117/config.yaml | 7 +++ .../instances/ausyd1nxvm2117/terragrunt.hcl | 52 +++++++++++++++++++ config/instances/ausyd1nxvm2118/config.yaml | 7 +++ .../instances/ausyd1nxvm2118/terragrunt.hcl | 52 +++++++++++++++++++ config/instances/ausyd1nxvm2119/config.yaml | 7 +++ .../instances/ausyd1nxvm2119/terragrunt.hcl | 52 +++++++++++++++++++ templates/base/boilerplate.yml | 1 + 11 files changed, 296 insertions(+) create mode 100644 config/instances/ausyd1nxvm2115/config.yaml create mode 100644 config/instances/ausyd1nxvm2115/terragrunt.hcl create mode 100644 config/instances/ausyd1nxvm2116/config.yaml create mode 100644 config/instances/ausyd1nxvm2116/terragrunt.hcl create mode 100644 config/instances/ausyd1nxvm2117/config.yaml create mode 100644 config/instances/ausyd1nxvm2117/terragrunt.hcl create mode 100644 config/instances/ausyd1nxvm2118/config.yaml create mode 100644 config/instances/ausyd1nxvm2118/terragrunt.hcl create mode 100644 config/instances/ausyd1nxvm2119/config.yaml create mode 100644 config/instances/ausyd1nxvm2119/terragrunt.hcl diff --git a/config/instances/ausyd1nxvm2115/config.yaml b/config/instances/ausyd1nxvm2115/config.yaml new file mode 100644 index 0000000..59f2b27 --- /dev/null +++ b/config/instances/ausyd1nxvm2115/config.yaml @@ -0,0 +1,7 @@ +description: CephRGW +cobbler_mgmt_classes: + - roles::infra::ceph::rgw +profiles: + - disk10 + - net_com1_eth0 + - 2core4096 diff --git a/config/instances/ausyd1nxvm2115/terragrunt.hcl b/config/instances/ausyd1nxvm2115/terragrunt.hcl new file mode 100644 index 0000000..c3099a9 --- /dev/null +++ b/config/instances/ausyd1nxvm2115/terragrunt.hcl @@ -0,0 +1,52 @@ +locals { + node_name = "prodnxsr0009" + config_common = yamldecode(file("${get_terragrunt_dir()}/../config_common.yaml")) + config_specific = yamldecode(file("${get_terragrunt_dir()}/config.yaml")) + config = merge(local.config_common, local.config_specific) + instance_name = basename(get_terragrunt_dir()) +} + +inputs = merge( + { + name = local.instance_name + }, + local.config +) + +include "root" { + path = find_in_parent_folders("root.hcl") +} + +include "instances" { + path = find_in_parent_folders("instances.hcl") + expose = true + merge_strategy = "deep" +} + +dependencies { + paths = ["${get_repo_root()}/config/nodes/${local.node_name}"] +} + +terraform { + source = "${get_repo_root()}/modules/instance" +} + +generate "incus" { + path = "incus.tf" + if_exists = "overwrite_terragrunt" + contents = <<-EOF + provider "incus" { + generate_client_certificates = true + accept_remote_certificate = true + + remote { + name = "${basename(get_terragrunt_dir())}" + scheme = "https" + address = "${yamldecode(file("${get_repo_root()}/config/nodes/${local.node_name}/config.yaml")).node_addr}" + port = "${yamldecode(file("${get_repo_root()}/config/nodes/${local.node_name}/config.yaml")).node_port}" + token = "${get_env("INCUS_TOKEN_${upper(local.node_name)}")}" + default = true + } + } + EOF +} diff --git a/config/instances/ausyd1nxvm2116/config.yaml b/config/instances/ausyd1nxvm2116/config.yaml new file mode 100644 index 0000000..59f2b27 --- /dev/null +++ b/config/instances/ausyd1nxvm2116/config.yaml @@ -0,0 +1,7 @@ +description: CephRGW +cobbler_mgmt_classes: + - roles::infra::ceph::rgw +profiles: + - disk10 + - net_com1_eth0 + - 2core4096 diff --git a/config/instances/ausyd1nxvm2116/terragrunt.hcl b/config/instances/ausyd1nxvm2116/terragrunt.hcl new file mode 100644 index 0000000..de7d211 --- /dev/null +++ b/config/instances/ausyd1nxvm2116/terragrunt.hcl @@ -0,0 +1,52 @@ +locals { + node_name = "prodnxsr0010" + config_common = yamldecode(file("${get_terragrunt_dir()}/../config_common.yaml")) + config_specific = yamldecode(file("${get_terragrunt_dir()}/config.yaml")) + config = merge(local.config_common, local.config_specific) + instance_name = basename(get_terragrunt_dir()) +} + +inputs = merge( + { + name = local.instance_name + }, + local.config +) + +include "root" { + path = find_in_parent_folders("root.hcl") +} + +include "instances" { + path = find_in_parent_folders("instances.hcl") + expose = true + merge_strategy = "deep" +} + +dependencies { + paths = ["${get_repo_root()}/config/nodes/${local.node_name}"] +} + +terraform { + source = "${get_repo_root()}/modules/instance" +} + +generate "incus" { + path = "incus.tf" + if_exists = "overwrite_terragrunt" + contents = <<-EOF + provider "incus" { + generate_client_certificates = true + accept_remote_certificate = true + + remote { + name = "${basename(get_terragrunt_dir())}" + scheme = "https" + address = "${yamldecode(file("${get_repo_root()}/config/nodes/${local.node_name}/config.yaml")).node_addr}" + port = "${yamldecode(file("${get_repo_root()}/config/nodes/${local.node_name}/config.yaml")).node_port}" + token = "${get_env("INCUS_TOKEN_${upper(local.node_name)}")}" + default = true + } + } + EOF +} diff --git a/config/instances/ausyd1nxvm2117/config.yaml b/config/instances/ausyd1nxvm2117/config.yaml new file mode 100644 index 0000000..59f2b27 --- /dev/null +++ b/config/instances/ausyd1nxvm2117/config.yaml @@ -0,0 +1,7 @@ +description: CephRGW +cobbler_mgmt_classes: + - roles::infra::ceph::rgw +profiles: + - disk10 + - net_com1_eth0 + - 2core4096 diff --git a/config/instances/ausyd1nxvm2117/terragrunt.hcl b/config/instances/ausyd1nxvm2117/terragrunt.hcl new file mode 100644 index 0000000..98fe447 --- /dev/null +++ b/config/instances/ausyd1nxvm2117/terragrunt.hcl @@ -0,0 +1,52 @@ +locals { + node_name = "prodnxsr0011" + config_common = yamldecode(file("${get_terragrunt_dir()}/../config_common.yaml")) + config_specific = yamldecode(file("${get_terragrunt_dir()}/config.yaml")) + config = merge(local.config_common, local.config_specific) + instance_name = basename(get_terragrunt_dir()) +} + +inputs = merge( + { + name = local.instance_name + }, + local.config +) + +include "root" { + path = find_in_parent_folders("root.hcl") +} + +include "instances" { + path = find_in_parent_folders("instances.hcl") + expose = true + merge_strategy = "deep" +} + +dependencies { + paths = ["${get_repo_root()}/config/nodes/${local.node_name}"] +} + +terraform { + source = "${get_repo_root()}/modules/instance" +} + +generate "incus" { + path = "incus.tf" + if_exists = "overwrite_terragrunt" + contents = <<-EOF + provider "incus" { + generate_client_certificates = true + accept_remote_certificate = true + + remote { + name = "${basename(get_terragrunt_dir())}" + scheme = "https" + address = "${yamldecode(file("${get_repo_root()}/config/nodes/${local.node_name}/config.yaml")).node_addr}" + port = "${yamldecode(file("${get_repo_root()}/config/nodes/${local.node_name}/config.yaml")).node_port}" + token = "${get_env("INCUS_TOKEN_${upper(local.node_name)}")}" + default = true + } + } + EOF +} diff --git a/config/instances/ausyd1nxvm2118/config.yaml b/config/instances/ausyd1nxvm2118/config.yaml new file mode 100644 index 0000000..59f2b27 --- /dev/null +++ b/config/instances/ausyd1nxvm2118/config.yaml @@ -0,0 +1,7 @@ +description: CephRGW +cobbler_mgmt_classes: + - roles::infra::ceph::rgw +profiles: + - disk10 + - net_com1_eth0 + - 2core4096 diff --git a/config/instances/ausyd1nxvm2118/terragrunt.hcl b/config/instances/ausyd1nxvm2118/terragrunt.hcl new file mode 100644 index 0000000..b33a99b --- /dev/null +++ b/config/instances/ausyd1nxvm2118/terragrunt.hcl @@ -0,0 +1,52 @@ +locals { + node_name = "prodnxsr0012" + config_common = yamldecode(file("${get_terragrunt_dir()}/../config_common.yaml")) + config_specific = yamldecode(file("${get_terragrunt_dir()}/config.yaml")) + config = merge(local.config_common, local.config_specific) + instance_name = basename(get_terragrunt_dir()) +} + +inputs = merge( + { + name = local.instance_name + }, + local.config +) + +include "root" { + path = find_in_parent_folders("root.hcl") +} + +include "instances" { + path = find_in_parent_folders("instances.hcl") + expose = true + merge_strategy = "deep" +} + +dependencies { + paths = ["${get_repo_root()}/config/nodes/${local.node_name}"] +} + +terraform { + source = "${get_repo_root()}/modules/instance" +} + +generate "incus" { + path = "incus.tf" + if_exists = "overwrite_terragrunt" + contents = <<-EOF + provider "incus" { + generate_client_certificates = true + accept_remote_certificate = true + + remote { + name = "${basename(get_terragrunt_dir())}" + scheme = "https" + address = "${yamldecode(file("${get_repo_root()}/config/nodes/${local.node_name}/config.yaml")).node_addr}" + port = "${yamldecode(file("${get_repo_root()}/config/nodes/${local.node_name}/config.yaml")).node_port}" + token = "${get_env("INCUS_TOKEN_${upper(local.node_name)}")}" + default = true + } + } + EOF +} diff --git a/config/instances/ausyd1nxvm2119/config.yaml b/config/instances/ausyd1nxvm2119/config.yaml new file mode 100644 index 0000000..59f2b27 --- /dev/null +++ b/config/instances/ausyd1nxvm2119/config.yaml @@ -0,0 +1,7 @@ +description: CephRGW +cobbler_mgmt_classes: + - roles::infra::ceph::rgw +profiles: + - disk10 + - net_com1_eth0 + - 2core4096 diff --git a/config/instances/ausyd1nxvm2119/terragrunt.hcl b/config/instances/ausyd1nxvm2119/terragrunt.hcl new file mode 100644 index 0000000..5326e08 --- /dev/null +++ b/config/instances/ausyd1nxvm2119/terragrunt.hcl @@ -0,0 +1,52 @@ +locals { + node_name = "prodnxsr0013" + config_common = yamldecode(file("${get_terragrunt_dir()}/../config_common.yaml")) + config_specific = yamldecode(file("${get_terragrunt_dir()}/config.yaml")) + config = merge(local.config_common, local.config_specific) + instance_name = basename(get_terragrunt_dir()) +} + +inputs = merge( + { + name = local.instance_name + }, + local.config +) + +include "root" { + path = find_in_parent_folders("root.hcl") +} + +include "instances" { + path = find_in_parent_folders("instances.hcl") + expose = true + merge_strategy = "deep" +} + +dependencies { + paths = ["${get_repo_root()}/config/nodes/${local.node_name}"] +} + +terraform { + source = "${get_repo_root()}/modules/instance" +} + +generate "incus" { + path = "incus.tf" + if_exists = "overwrite_terragrunt" + contents = <<-EOF + provider "incus" { + generate_client_certificates = true + accept_remote_certificate = true + + remote { + name = "${basename(get_terragrunt_dir())}" + scheme = "https" + address = "${yamldecode(file("${get_repo_root()}/config/nodes/${local.node_name}/config.yaml")).node_addr}" + port = "${yamldecode(file("${get_repo_root()}/config/nodes/${local.node_name}/config.yaml")).node_port}" + token = "${get_env("INCUS_TOKEN_${upper(local.node_name)}")}" + default = true + } + } + EOF +} diff --git a/templates/base/boilerplate.yml b/templates/base/boilerplate.yml index e0488f6..c092b80 100644 --- a/templates/base/boilerplate.yml +++ b/templates/base/boilerplate.yml @@ -41,6 +41,7 @@ variables: - roles::infra::auth::glauth - roles::infra::auth::openldap - roles::infra::automation::rundeck + - roles::infra::ceph::rgw - roles::infra::cobbler::server - roles::infra::db::redis - roles::infra::dhcp::server