Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: started rabbitmq intergration #1262

Merged
merged 3 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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
Expand Down
37 changes: 24 additions & 13 deletions infrastructure/quick-deploy/localhost/all-in-one/storage.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# ActiveMQ
module "activemq" {
count = var.activemq != null ? 1 : 0
source = "./generated/infra-modules/storage/onpremise/activemq"
namespace = local.namespace
activemq = {
Expand All @@ -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"
Expand Down Expand Up @@ -81,7 +92,6 @@ module "nfs" {
pvc_name = var.nfs.pvc_name
}


# Shared storage
resource "kubernetes_secret" "shared_storage" {
metadata {
Expand Down Expand Up @@ -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
}
}

Expand All @@ -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 ? {
Expand Down Expand Up @@ -186,4 +196,5 @@ locals {
bucket_name = try(module.minio[0].bucket_name, "")
} : null
}
queue_module = coalesce(one(module.activemq), one(module.rabbitmq))
}
16 changes: 15 additions & 1 deletion infrastructure/quick-deploy/localhost/all-in-one/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,21 @@ 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({
enable = optional(bool, true)
jdongo-aneo marked this conversation as resolved.
Show resolved Hide resolved
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
Expand Down
10 changes: 6 additions & 4 deletions versions.tfvars.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
jdongo-aneo marked this conversation as resolved.
Show resolved Hide resolved
"gui": "0.11.4",
"extcsharp": "0.14.1",
"samples": "2.18.2"
Expand Down Expand Up @@ -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"}
}
}
Loading