diff --git a/infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars b/infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars index 6bc5dc935..840fcc180 100644 --- a/infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars +++ b/infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars @@ -5,7 +5,7 @@ logging_level = "Information" #metrics_server = {} # Object storage -# Uncomment either the `redis` or the `minio` parameter +# Uncomment either the `redis`, the `minio`or the `nfs` parameter redis = {} #minio = {} # nfs = { @@ -15,6 +15,11 @@ redis = {} # Uncomment this to have minio S3 enabled instead of hostpath shared_storage #minio_s3_fs = {} # Shared storage +# Queue +# Uncomment either the `activemq` or the `rabbitmq` parameter +activemq = {} +#rabbitmq = {} + metrics_exporter = { extra_conf = { MongoDB__AllowInsecureTls = true diff --git a/infrastructure/quick-deploy/localhost/all-in-one/storage.tf b/infrastructure/quick-deploy/localhost/all-in-one/storage.tf index 24c540322..820fab650 100644 --- a/infrastructure/quick-deploy/localhost/all-in-one/storage.tf +++ b/infrastructure/quick-deploy/localhost/all-in-one/storage.tf @@ -1,5 +1,6 @@ # ActiveMQ module "activemq" { + count = var.activemq != null ? 1 : 0 source = "./generated/infra-modules/storage/onpremise/activemq" namespace = local.namespace activemq = { @@ -10,6 +11,16 @@ module "activemq" { } } +module "rabbitmq" { + count = var.rabbitmq != null ? 1 : 0 + source = "./generated/infra-modules/storage/onpremise/rabbitmq" + namespace = local.namespace + image = var.rabbitmq.image + tag = try(coalesce(var.rabbitmq.tag), local.default_tags[var.rabbitmq.image]) + helm_chart_repository = try(coalesce(var.rabbitmq.helm_chart_repository), var.helm_charts.rabbitmq.repository) + helm_chart_version = try(coalesce(var.rabbitmq.helm_chart_verison), var.helm_charts.rabbitmq.version) +} + # MongoDB module "mongodb" { source = "./generated/infra-modules/storage/onpremise/mongodb" @@ -81,7 +92,6 @@ module "nfs" { pvc_name = var.nfs.pvc_name } - # Shared storage resource "kubernetes_secret" "shared_storage" { metadata { @@ -121,8 +131,8 @@ resource "kubernetes_secret" "deployed_queue_storage" { data = { list = join(",", local.storage_endpoint_url.deployed_queue_storages) adapter = local.storage_endpoint_url.queue_storage_adapter - adapter_class_name = module.activemq.adapter_class_name - adapter_absolute_path = module.activemq.adapter_absolute_path + adapter_class_name = local.queue_module.adapter_class_name + adapter_absolute_path = local.queue_module.adapter_absolute_path } } @@ -144,16 +154,16 @@ locals { deployed_table_storages = ["MongoDB"] deployed_queue_storages = ["Amqp"] activemq = { - url = module.activemq.url - host = module.activemq.host - port = module.activemq.port - web_url = module.activemq.web_url - credentials = module.activemq.user_credentials - certificates = module.activemq.user_certificate - endpoints = module.activemq.endpoints - adapter_class_name = module.activemq.adapter_class_name - adapter_absolute_path = module.activemq.adapter_absolute_path - engine_type = module.activemq.engine_type + url = local.queue_module.url + host = local.queue_module.host + port = local.queue_module.port + web_url = local.queue_module.web_url + credentials = local.queue_module.user_credentials + certificates = local.queue_module.user_certificate + endpoints = local.queue_module.endpoints + adapter_class_name = local.queue_module.adapter_class_name + adapter_absolute_path = local.queue_module.adapter_absolute_path + engine_type = local.queue_module.engine_type allow_host_mismatch = true } redis = length(module.redis) > 0 ? { @@ -186,4 +196,5 @@ locals { bucket_name = try(module.minio[0].bucket_name, "") } : null } + queue_module = coalesce(one(module.activemq), one(module.rabbitmq)) } diff --git a/infrastructure/quick-deploy/localhost/all-in-one/variables.tf b/infrastructure/quick-deploy/localhost/all-in-one/variables.tf index 5572d321d..5a771c0d8 100644 --- a/infrastructure/quick-deploy/localhost/all-in-one/variables.tf +++ b/infrastructure/quick-deploy/localhost/all-in-one/variables.tf @@ -95,7 +95,20 @@ variable "activemq" { node_selector = optional(any, {}) image_pull_secrets = optional(string, "") }) - default = {} + default = null +} + +# Parameters for RabbitMQ +variable "rabbitmq" { + description = "Parameters of RabbitMQ" + type = object({ + image = optional(string, "bitnami/rabbitmq") + tag = optional(string) + helm_chart_repository = optional(string) + helm_chart_version = optional(string) + service_type = optional(string, "ClusterIP") + }) + default = null } # Parameters for MongoDB diff --git a/versions.tfvars.json b/versions.tfvars.json index 0f330bc29..3086e1cff 100644 --- a/versions.tfvars.json +++ b/versions.tfvars.json @@ -2,8 +2,8 @@ "armonik_versions": { "armonik": "2.18.2", "infra": "main", - "core": "0.20.5", - "api": "3.15.1", + "core": "0.21.0", + "api": "3.16.0", "gui": "0.11.4", "extcsharp": "0.14.1", "samples": "2.18.2" @@ -62,13 +62,15 @@ "rtsp/mongosh": "1.10.1", "nginxinc/nginx-unprivileged": "1.25.1-alpine-slim", "datalust/seqcli": "2023.2", - "k8s.gcr.io/sig-storage/nfs-subdir-external-provisioner": "v4.0.2" + "k8s.gcr.io/sig-storage/nfs-subdir-external-provisioner": "v4.0.2", + "bitnami/rabbitmq": "3.12.12-debian-11-r21" }, "helm_charts" : { "keda" : { "repository" : "https://kedacore.github.io/charts" , "version" : "2.9.4"}, "metrics_server" : { "repository" : "https://kubernetes-sigs.github.io/metrics-server/" , "version" :"3.8.3"}, "cluster_autoscaler" : {"repository" : "https://kubernetes.github.io/autoscaler" , "version" : "9.24.0"}, "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.3.0" } + "efs_csi_driver" : { "repository" :"https://kubernetes-sigs.github.io/aws-efs-csi-driver/" , "version": "2.3.0" }, + "rabbitmq" : { "repository" : "https://charts.bitnami.com/bitnami" , "version" : "12.11.0"} } }