Skip to content

Commit

Permalink
Added SQS support to ArmoniK
Browse files Browse the repository at this point in the history
  • Loading branch information
AncientPatata committed Dec 19, 2024
1 parent a0ed39c commit 13ffd16
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 36 deletions.
2 changes: 1 addition & 1 deletion infrastructure/quick-deploy/aws/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ clean:
rm -rf $(TF_DATA_DIR) .terraform.lock.hcl .terraform

docs:
terraform-docs markdown table --output-file parameters.md --output-mode inject $(CURRENT_DIR)
terraform-docs markdown table --output-file parameters.md --output-mode inject $(CURRENT_DIR)
6 changes: 5 additions & 1 deletion infrastructure/quick-deploy/aws/armonik.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module "armonik" {
logging_level = var.logging_level

configurations = merge(var.configurations, {
core = [module.mq, module.elasticache, module.mongodb, module.mongodb_sharded, var.configurations.core]
core = [module.sqs, module.mq, module.elasticache, module.mongodb, module.mongodb_sharded, var.configurations.core]
})

fluent_bit = module.fluent_bit
Expand All @@ -17,6 +17,7 @@ module "armonik" {
// If compute plane has no partition data, provides a default
// but always overrides the images
compute_plane = { for k, v in var.compute_plane : k => merge({
service_account_name = length(var.sqs_service_account_name) > 0 ? var.sqs_service_account_name : null
partition_data = {
priority = 1
reserved_pods = 1
Expand All @@ -38,6 +39,7 @@ module "armonik" {
control_plane = merge(var.control_plane, {
image = local.ecr_images["${var.control_plane.image}:${try(coalesce(var.control_plane.tag), "")}"].name
tag = local.ecr_images["${var.control_plane.image}:${try(coalesce(var.control_plane.tag), "")}"].tag
service_account_name = length(var.sqs_service_account_name) > 0 ? var.sqs_service_account_name : null
})
admin_gui = merge(var.admin_gui, {
image = local.ecr_images["${var.admin_gui.image}:${try(coalesce(var.admin_gui.tag), "")}"].name
Expand Down Expand Up @@ -76,4 +78,6 @@ module "armonik" {
image = local.ecr_images["${var.pod_deletion_cost.image}:${try(coalesce(var.pod_deletion_cost.tag), "")}"].image
tag = local.ecr_images["${var.pod_deletion_cost.image}:${try(coalesce(var.pod_deletion_cost.tag), "")}"].tag
})

depends_on = [ module.sqs_service_account ]
}
2 changes: 1 addition & 1 deletion infrastructure/quick-deploy/aws/parameters.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -718,4 +718,4 @@ environment_description = {
version = "0.0.0"
description = "AWS environment"
color = "#80ff80"
}
}
20 changes: 20 additions & 0 deletions infrastructure/quick-deploy/aws/storage.tf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ resource "kubernetes_secret" "elasticache" {

# Amazon MQ
module "mq" {
count = length(var.sqs_service_account_name) > 0 ? 0 : 1
source = "./generated/infra-modules/storage/aws/mq"
tags = local.tags
name = "${local.prefix}-mq"
Expand All @@ -143,6 +144,25 @@ module "mq" {
kms_key_id = local.kms_key
}

module "sqs" {
count = length(var.sqs_service_account_name) > 0 ? 1 : 0
source = "./generated/infra-modules/storage/aws/sqs"
namespace = local.namespace
region = var.region
prefix = local.prefix
}

module "sqs_service_account" {
count = length(var.sqs_service_account_name) > 0 ? 1 : 0
namespace = local.namespace
source = "./generated/infra-modules/service-account/aws"
prefix = local.prefix
service_account_name = var.sqs_service_account_name
oidc_provider_arn = module.eks.aws_eks_module.oidc_provider_arn
oidc_issuer_url = module.eks.aws_eks_module.cluster_oidc_issuer_url
decrypt_policy_arn = aws_iam_policy.decrypt_object.arn
}

# MongoDB
module "mongodb" {
count = can(coalesce(var.mongodb_sharding)) ? 0 : 1
Expand Down
6 changes: 6 additions & 0 deletions infrastructure/quick-deploy/aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,12 @@ variable "mq_credentials" {
}
}

variable "sqs_service_account_name" {
description = "Name to use for the created SQS service account, SQS will be used when set" # no spaces or _ or else it'll fail to deploy (validation?)
type = string
default = ""
}

# Parameters for MongoDB
variable "mongodb" {
description = "Parameters of MongoDB"
Expand Down
66 changes: 33 additions & 33 deletions versions.tfvars.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"armonik_versions": {
"armonik": "2.20.0",
"infra": "0.6.1-pre1-fbd66b9",
"armonik": "2.21.0",
"infra": "0.7.0",
"infra_plugins": "0.1.1",
"core": "0.27.2",
"api": "3.19.0",
"gui": "0.12.4",
"extcsharp": "0.12.9",
"samples": "2.20.0"
"core": "0.28.0",
"api": "3.21.0",
"gui": "0.13.3",
"extcsharp": "0.12.11",
"samples": "2.21.0"
},
"armonik_images": {
"armonik": [
Expand Down Expand Up @@ -47,46 +47,46 @@
]
},
"image_tags": {
"registry.k8s.io/autoscaling/cluster-autoscaler": "v1.30.2",
"registry.k8s.io/metrics-server/metrics-server": "v0.7.1",
"ghcr.io/kedacore/keda": "2.9.3",
"ghcr.io/kedacore/keda-metrics-apiserver": "2.9.3",
"registry.k8s.io/autoscaling/cluster-autoscaler": "v1.31.0",
"registry.k8s.io/metrics-server/metrics-server": "v0.7.2",
"ghcr.io/kedacore/keda": "2.16.0",
"ghcr.io/kedacore/keda-metrics-apiserver": "2.16.0",
"public.ecr.aws/aws-ec2/aws-node-termination-handler": "v1.22.1",
"public.ecr.aws/efs-csi-driver/amazon/aws-efs-csi-driver": "v2.0.6",
"public.ecr.aws/eks-distro/kubernetes-csi/livenessprobe": "v2.13.0-eks-1-30-11",
"public.ecr.aws/eks-distro/kubernetes-csi/node-driver-registrar": "v2.11.0-eks-1-30-11",
"public.ecr.aws/eks-distro/kubernetes-csi/external-provisioner": "v5.0.1-eks-1-30-11",
"public.ecr.aws/efs-csi-driver/amazon/aws-efs-csi-driver": "v2.1.0",
"public.ecr.aws/eks-distro/kubernetes-csi/livenessprobe": "v2.14.0-eks-1-31-7",
"public.ecr.aws/eks-distro/kubernetes-csi/node-driver-registrar": "v2.12.0-eks-1-31-7",
"public.ecr.aws/eks-distro/kubernetes-csi/external-provisioner": "v5.1.0-eks-1-31-7",
"symptoma/activemq": "5.18.4",
"mongo": "7.0.12",
"mongo": "8.0.3",
"bitnami/mongodb": "8.0.3-debian-12-r0",
"bitnami/mongodb-sharded": "8.0.3-debian-12-r0",
"redis": "7.4.0-alpine",
"minio/minio": "RELEASE.2024-08-03T04-33-23Z",
"rtsp/mongosh": "2.3.3",
"redis": "7.4.1-alpine",
"minio/minio": "RELEASE.2024-11-07T00-52-20Z",
"datalust/seq": "2024.3",
"grafana/grafana": "11.1.1",
"prom/node-exporter": "v1.8.1",
"prom/prometheus": "v2.53.1",
"fluent/fluent-bit": "3.0.4",
"rtsp/mongosh": "2.2.15",
"nginxinc/nginx-unprivileged": "1.27.0-alpine-slim",
"datalust/seqcli": "2024.3",
"grafana/grafana": "11.3.0",
"prom/node-exporter": "v1.8.2",
"prom/prometheus": "v3.0.0",
"fluent/fluent-bit": "3.1.10",
"nginxinc/nginx-unprivileged": "1.27.2-alpine-slim",
"registry.k8s.io/sig-storage/nfs-subdir-external-provisioner": "v4.0.18",
"bitnami/rabbitmq": "3.12.14",
"ghcr.io/chaos-mesh/chaos-mesh": "v2.6.3",
"ghcr.io/chaos-mesh/chaos-daemon": "v2.6.3",
"ghcr.io/chaos-mesh/chaos-dashboard": "v2.6.3",
"bitnami/rabbitmq": "4.0.3",
"ghcr.io/chaos-mesh/chaos-mesh": "v2.7.0",
"ghcr.io/chaos-mesh/chaos-daemon": "v2.7.0",
"ghcr.io/chaos-mesh/chaos-dashboard": "v2.7.0",
"ghcr.io/prometheus-community/windows-exporter": "0.29.2-ltsc2022",
"mcr.microsoft.com/windows/nanoserver": "ltsc2022"
},
"helm_charts" : {
"keda" : { "repository" : "https://kedacore.github.io/charts" , "version" : "2.9.3"},
"metrics_server" : { "repository" : "https://kubernetes-sigs.github.io/metrics-server/" , "version" :"3.12.0"},
"cluster_autoscaler" : {"repository" : "https://kubernetes.github.io/autoscaler" , "version" : "9.36.0"},
"keda" : { "repository" : "https://kedacore.github.io/charts" , "version" : "2.16.0"},
"metrics_server" : { "repository" : "https://kubernetes-sigs.github.io/metrics-server/" , "version" :"3.12.2"},
"cluster_autoscaler" : {"repository" : "https://kubernetes.github.io/autoscaler" , "version" : "9.43.2"},
"termination_handler" : {"repository" : "https://aws.github.io/eks-charts" , "version" : "0.21.0" },
"efs_csi_driver" : { "repository" :"https://kubernetes-sigs.github.io/aws-efs-csi-driver/" , "version": "2.5.7" },
"efs_csi_driver" : { "repository" :"https://kubernetes-sigs.github.io/aws-efs-csi-driver/" , "version": "3.0.8" },
"rabbitmq" : { "repository" : "https://charts.bitnami.com/bitnami" , "version" : "13.0.2"},
"chaos_mesh" : { "repository" : "https://charts.chaos-mesh.org" , "version" : "2.6.3"},
"mongodb" : { "repository": "oci://registry-1.docker.io/bitnamicharts", "version" : "16.2.2"},
"mongodb-sharded" : { "repository": "oci://registry-1.docker.io/bitnamicharts", "version" : "9.0.3" }
}
}
}

0 comments on commit 13ffd16

Please sign in to comment.