From 12451b2fe6c2a6901cb072e48657aed5e6e0ffb4 Mon Sep 17 00:00:00 2001 From: iadjadj Date: Wed, 19 Jul 2023 16:26:02 +0200 Subject: [PATCH 01/11] refactor: deploy with repo armonik.infra --- infrastructure/quick-deploy/localhost/all/armonik.tf | 3 --- infrastructure/quick-deploy/localhost/all/monitoring.tf | 9 --------- infrastructure/quick-deploy/localhost/all/storage.tf | 7 ++----- infrastructure/quick-deploy/localhost/all/versions.tf | 6 +++--- versions.tfvars.json | 2 +- 5 files changed, 6 insertions(+), 21 deletions(-) diff --git a/infrastructure/quick-deploy/localhost/all/armonik.tf b/infrastructure/quick-deploy/localhost/all/armonik.tf index 51ae58279..ed39f3b07 100644 --- a/infrastructure/quick-deploy/localhost/all/armonik.tf +++ b/infrastructure/quick-deploy/localhost/all/armonik.tf @@ -1,10 +1,7 @@ module "armonik" { source = "./generated/infra-modules/armonik" - working_dir = "${path.root}/../../.." namespace = local.namespace logging_level = var.logging_level - storage_endpoint_url = local.storage_endpoint_url - monitoring = local.monitoring extra_conf = var.extra_conf // To avoid the "known after apply" behavior that arises from using depends_on, we are using a ternary expression to impose implicit dependencies on the below secrets. diff --git a/infrastructure/quick-deploy/localhost/all/monitoring.tf b/infrastructure/quick-deploy/localhost/all/monitoring.tf index 9d77d4480..d9806a3b9 100644 --- a/infrastructure/quick-deploy/localhost/all/monitoring.tf +++ b/infrastructure/quick-deploy/localhost/all/monitoring.tf @@ -16,7 +16,6 @@ module "seq" { tag = try(coalesce(var.seq.cli_image_tag), local.default_tags[var.seq.cli_image_name]) image_pull_secrets = var.seq.cli_pull_secrets } - working_dir = "${path.root}/../../.." authentication = var.seq.authentication system_ram_target = var.seq.system_ram_target retention_in_days = var.seq.retention_in_days @@ -53,7 +52,6 @@ module "node_exporter" { tag = try(coalesce(var.node_exporter.image_tag), local.default_tags[var.node_exporter.image_name]) image_pull_secrets = var.node_exporter.pull_secrets } - working_dir = "${path.root}/../../../.." } # Metrics exporter @@ -62,14 +60,12 @@ module "metrics_exporter" { namespace = local.namespace service_type = var.metrics_exporter.service_type node_selector = var.metrics_exporter.node_selector - storage_endpoint_url = local.storage_endpoint_url docker_image = { image = var.metrics_exporter.image_name tag = try(coalesce(var.metrics_exporter.image_tag), local.default_tags[var.metrics_exporter.image_name]) image_pull_secrets = var.metrics_exporter.pull_secrets } extra_conf = var.metrics_exporter.extra_conf - working_dir = "${path.root}/../../.." } resource "kubernetes_secret" "metrics_exporter" { @@ -93,7 +89,6 @@ module "partition_metrics_exporter" { namespace = local.namespace service_type = var.partition_metrics_exporter.service_type node_selector = var.partition_metrics_exporter.node_selector - storage_endpoint_url = local.storage_endpoint_url metrics_exporter_url = "${module.metrics_exporter.host}:${module.metrics_exporter.port}" docker_image = { image = var.partition_metrics_exporter.image_name @@ -101,7 +96,6 @@ module "partition_metrics_exporter" { image_pull_secrets = var.partition_metrics_exporter.pull_secrets } extra_conf = var.partition_metrics_exporter.extra_conf - working_dir = "${path.root}/../../.." depends_on = [module.metrics_exporter] } @@ -132,13 +126,11 @@ module "prometheus" { service_type = var.prometheus.service_type node_selector = var.prometheus.node_selector metrics_exporter_url = "${module.metrics_exporter.host}:${module.metrics_exporter.port}" - partition_metrics_exporter_url = length(module.partition_metrics_exporter) == 1 ? "${module.partition_metrics_exporter[0].host}:${module.partition_metrics_exporter[0].port}" : null docker_image = { image = var.prometheus.image_name tag = try(coalesce(var.prometheus.image_tag), local.default_tags[var.prometheus.image_name]) image_pull_secrets = var.prometheus.pull_secrets } - working_dir = "${path.root}/../../.." } resource "kubernetes_secret" "prometheus" { @@ -167,7 +159,6 @@ module "grafana" { tag = try(coalesce(var.grafana.image_tag), local.default_tags[var.grafana.image_name]) image_pull_secrets = var.grafana.pull_secrets } - working_dir = "${path.root}/../../.." authentication = var.grafana.authentication } diff --git a/infrastructure/quick-deploy/localhost/all/storage.tf b/infrastructure/quick-deploy/localhost/all/storage.tf index 4a9072c0a..4410c4685 100644 --- a/infrastructure/quick-deploy/localhost/all/storage.tf +++ b/infrastructure/quick-deploy/localhost/all/storage.tf @@ -2,8 +2,7 @@ module "activemq" { source = "./generated/infra-modules/storage/onpremise/activemq" namespace = local.namespace - working_dir = "${path.root}/../../.." - activemq = { + activemq = { image = var.activemq.image_name tag = try(coalesce(var.activemq.image_tag), local.default_tags[var.activemq.image_name]) node_selector = var.activemq.node_selector @@ -15,7 +14,6 @@ module "activemq" { module "mongodb" { source = "./generated/infra-modules/storage/onpremise/mongodb" namespace = local.namespace - working_dir = "${path.root}/../../.." mongodb = { image = var.mongodb.image_name tag = try(coalesce(var.mongodb.image_tag), local.default_tags[var.mongodb.image_name]) @@ -31,8 +29,7 @@ module "redis" { count = var.redis != null ? 1 : 0 source = "./generated/infra-modules/storage/onpremise/redis" namespace = local.namespace - working_dir = "${path.root}/../../.." - redis = { + redis = { image = var.redis.image_name tag = try(coalesce(var.redis.image_tag), local.default_tags[var.redis.image_name]) node_selector = var.redis.node_selector diff --git a/infrastructure/quick-deploy/localhost/all/versions.tf b/infrastructure/quick-deploy/localhost/all/versions.tf index 2753675a4..fedf46447 100644 --- a/infrastructure/quick-deploy/localhost/all/versions.tf +++ b/infrastructure/quick-deploy/localhost/all/versions.tf @@ -6,15 +6,15 @@ terraform { } local = { source = "hashicorp/local" - version = "~> 2.2.0" + version = "~> 2.4.0" } random = { source = "hashicorp/random" - version = "~> 3.4.3" + version = "~> 3.5.1" } kubernetes = { source = "hashicorp/kubernetes" - version = "~> 2.13.0" + version = "~> 2.21.1" } kubectl = { source = "gavinbunney/kubectl" diff --git a/versions.tfvars.json b/versions.tfvars.json index ac0839c57..83db6c7d5 100644 --- a/versions.tfvars.json +++ b/versions.tfvars.json @@ -1,7 +1,7 @@ { "armonik_versions": { "armonik": "2.14.0", - "infra": "0.0.2", + "infra": "main", "core": "0.14.3", "api": "3.10.0", "gui": "0.9.2", From 236b5da9acc24a208265f54573d8022fe9b2463e Mon Sep 17 00:00:00 2001 From: iadjadj Date: Thu, 20 Jul 2023 14:50:35 +0200 Subject: [PATCH 02/11] fix format terraform --- .../quick-deploy/localhost/all/armonik.tf | 8 +++---- .../quick-deploy/localhost/all/monitoring.tf | 24 +++++++++---------- .../quick-deploy/localhost/all/storage.tf | 18 +++++++------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/infrastructure/quick-deploy/localhost/all/armonik.tf b/infrastructure/quick-deploy/localhost/all/armonik.tf index ed39f3b07..6ed0c464d 100644 --- a/infrastructure/quick-deploy/localhost/all/armonik.tf +++ b/infrastructure/quick-deploy/localhost/all/armonik.tf @@ -1,8 +1,8 @@ module "armonik" { - source = "./generated/infra-modules/armonik" - namespace = local.namespace - logging_level = var.logging_level - extra_conf = var.extra_conf + source = "./generated/infra-modules/armonik" + namespace = local.namespace + logging_level = var.logging_level + extra_conf = var.extra_conf // To avoid the "known after apply" behavior that arises from using depends_on, we are using a ternary expression to impose implicit dependencies on the below secrets. fluent_bit_secret_name = kubernetes_secret.fluent_bit.id != null ? kubernetes_secret.fluent_bit.metadata[0].name : kubernetes_secret.fluent_bit.metadata[0].name diff --git a/infrastructure/quick-deploy/localhost/all/monitoring.tf b/infrastructure/quick-deploy/localhost/all/monitoring.tf index d9806a3b9..2c0582ee0 100644 --- a/infrastructure/quick-deploy/localhost/all/monitoring.tf +++ b/infrastructure/quick-deploy/localhost/all/monitoring.tf @@ -56,16 +56,16 @@ module "node_exporter" { # Metrics exporter module "metrics_exporter" { - source = "./generated/infra-modules/monitoring/onpremise/exporters/metrics-exporter" - namespace = local.namespace - service_type = var.metrics_exporter.service_type - node_selector = var.metrics_exporter.node_selector + source = "./generated/infra-modules/monitoring/onpremise/exporters/metrics-exporter" + namespace = local.namespace + service_type = var.metrics_exporter.service_type + node_selector = var.metrics_exporter.node_selector docker_image = { image = var.metrics_exporter.image_name tag = try(coalesce(var.metrics_exporter.image_tag), local.default_tags[var.metrics_exporter.image_name]) image_pull_secrets = var.metrics_exporter.pull_secrets } - extra_conf = var.metrics_exporter.extra_conf + extra_conf = var.metrics_exporter.extra_conf } resource "kubernetes_secret" "metrics_exporter" { @@ -95,8 +95,8 @@ module "partition_metrics_exporter" { tag = try(coalesce(var.partition_metrics_exporter.image_tag), local.default_tags[var.partition_metrics_exporter.image_name]) image_pull_secrets = var.partition_metrics_exporter.pull_secrets } - extra_conf = var.partition_metrics_exporter.extra_conf - depends_on = [module.metrics_exporter] + extra_conf = var.partition_metrics_exporter.extra_conf + depends_on = [module.metrics_exporter] } resource "kubernetes_secret" "partition_metrics_exporter" { @@ -121,11 +121,11 @@ resource "kubernetes_secret" "partition_metrics_exporter" { # Prometheus module "prometheus" { - source = "./generated/infra-modules/monitoring/onpremise/prometheus" - namespace = local.namespace - service_type = var.prometheus.service_type - node_selector = var.prometheus.node_selector - metrics_exporter_url = "${module.metrics_exporter.host}:${module.metrics_exporter.port}" + source = "./generated/infra-modules/monitoring/onpremise/prometheus" + namespace = local.namespace + service_type = var.prometheus.service_type + node_selector = var.prometheus.node_selector + metrics_exporter_url = "${module.metrics_exporter.host}:${module.metrics_exporter.port}" docker_image = { image = var.prometheus.image_name tag = try(coalesce(var.prometheus.image_tag), local.default_tags[var.prometheus.image_name]) diff --git a/infrastructure/quick-deploy/localhost/all/storage.tf b/infrastructure/quick-deploy/localhost/all/storage.tf index 4410c4685..477c17c72 100644 --- a/infrastructure/quick-deploy/localhost/all/storage.tf +++ b/infrastructure/quick-deploy/localhost/all/storage.tf @@ -1,8 +1,8 @@ # ActiveMQ module "activemq" { - source = "./generated/infra-modules/storage/onpremise/activemq" - namespace = local.namespace - activemq = { + source = "./generated/infra-modules/storage/onpremise/activemq" + namespace = local.namespace + activemq = { image = var.activemq.image_name tag = try(coalesce(var.activemq.image_tag), local.default_tags[var.activemq.image_name]) node_selector = var.activemq.node_selector @@ -12,8 +12,8 @@ module "activemq" { # MongoDB module "mongodb" { - source = "./generated/infra-modules/storage/onpremise/mongodb" - namespace = local.namespace + source = "./generated/infra-modules/storage/onpremise/mongodb" + namespace = local.namespace mongodb = { image = var.mongodb.image_name tag = try(coalesce(var.mongodb.image_tag), local.default_tags[var.mongodb.image_name]) @@ -26,10 +26,10 @@ module "mongodb" { # Redis module "redis" { - count = var.redis != null ? 1 : 0 - source = "./generated/infra-modules/storage/onpremise/redis" - namespace = local.namespace - redis = { + count = var.redis != null ? 1 : 0 + source = "./generated/infra-modules/storage/onpremise/redis" + namespace = local.namespace + redis = { image = var.redis.image_name tag = try(coalesce(var.redis.image_tag), local.default_tags[var.redis.image_name]) node_selector = var.redis.node_selector From 135e956f4c2a4cd78e347361d8c2b303b3dafb2f Mon Sep 17 00:00:00 2001 From: iadjadj Date: Fri, 21 Jul 2023 11:14:12 +0200 Subject: [PATCH 03/11] fix deploy localhost split --- infrastructure/quick-deploy/localhost/armonik/main.tf | 3 --- .../quick-deploy/localhost/armonik/versions.tf | 4 ++-- infrastructure/quick-deploy/localhost/monitoring/main.tf | 9 --------- .../quick-deploy/localhost/monitoring/versions.tf | 6 +++--- infrastructure/quick-deploy/localhost/storage/main.tf | 3 --- .../quick-deploy/localhost/storage/versions.tf | 6 +++--- 6 files changed, 8 insertions(+), 23 deletions(-) diff --git a/infrastructure/quick-deploy/localhost/armonik/main.tf b/infrastructure/quick-deploy/localhost/armonik/main.tf index 840052853..e1bd1fd4d 100644 --- a/infrastructure/quick-deploy/localhost/armonik/main.tf +++ b/infrastructure/quick-deploy/localhost/armonik/main.tf @@ -1,10 +1,7 @@ module "armonik" { source = "../generated/infra-modules/armonik" - working_dir = "${path.root}/../../.." namespace = var.namespace logging_level = var.logging_level - storage_endpoint_url = var.storage_endpoint_url - monitoring = var.monitoring extra_conf = { compute = try(var.extra_conf.compute, {}) control = try(var.extra_conf.control, {}) diff --git a/infrastructure/quick-deploy/localhost/armonik/versions.tf b/infrastructure/quick-deploy/localhost/armonik/versions.tf index dce13114c..efd3fe55b 100644 --- a/infrastructure/quick-deploy/localhost/armonik/versions.tf +++ b/infrastructure/quick-deploy/localhost/armonik/versions.tf @@ -6,7 +6,7 @@ terraform { } kubernetes = { source = "hashicorp/kubernetes" - version = "~> 2.13.0" + version = "~> 2.21.1" } external = { source = "hashicorp/external" @@ -18,7 +18,7 @@ terraform { } random = { source = "hashicorp/random" - version = "~> 3.4.3" + version = "~> 3.5.1" } local = { source = "hashicorp/local" diff --git a/infrastructure/quick-deploy/localhost/monitoring/main.tf b/infrastructure/quick-deploy/localhost/monitoring/main.tf index 57989b99b..bd8a1120d 100644 --- a/infrastructure/quick-deploy/localhost/monitoring/main.tf +++ b/infrastructure/quick-deploy/localhost/monitoring/main.tf @@ -16,7 +16,6 @@ module "seq" { tag = local.cli_seq_tag image_pull_secrets = local.cli_seq_image_pull_secrets } - working_dir = "${path.root}/../../.." authentication = var.authentication system_ram_target = local.seq_system_ram_target retention_in_days = local.retention_in_days @@ -33,7 +32,6 @@ module "node_exporter" { tag = local.node_exporter_tag image_pull_secrets = local.node_exporter_image_pull_secrets } - working_dir = "${path.root}/../../../.." } # Metrics exporter @@ -42,14 +40,12 @@ module "metrics_exporter" { namespace = var.namespace service_type = local.metrics_exporter_service_type node_selector = local.metrics_exporter_node_selector - storage_endpoint_url = var.storage_endpoint_url docker_image = { image = local.metrics_exporter_image tag = local.metrics_exporter_tag image_pull_secrets = local.metrics_exporter_image_pull_secrets } extra_conf = local.metrics_exporter_extra_conf - working_dir = "${path.root}/../../.." } # Partition metrics exporter @@ -59,7 +55,6 @@ module "metrics_exporter" { # service_type = local.partition_metrics_exporter_service_type # node_selector = local.partition_metrics_exporter_node_selector # logging_level = var.logging_level -# storage_endpoint_url = var.storage_endpoint_url # metrics_exporter_url = "${module.metrics_exporter.host}:${module.metrics_exporter.port}" # docker_image = { # image = local.partition_metrics_exporter_image @@ -67,7 +62,6 @@ module "metrics_exporter" { # image_pull_secrets = local.partition_metrics_exporter_image_pull_secrets # } # extra_conf = local.partition_metrics_exporter_extra_conf -# working_dir = "${path.root}/../../.." # depends_on = [module.metrics_exporter] #} @@ -78,14 +72,12 @@ module "prometheus" { service_type = local.prometheus_service_type node_selector = local.prometheus_node_selector metrics_exporter_url = "${module.metrics_exporter.host}:${module.metrics_exporter.port}" - partition_metrics_exporter_url = null #"${module.partition_metrics_exporter.host}:${module.partition_metrics_exporter.port}" docker_image = { image = local.prometheus_image tag = local.prometheus_tag image_pull_secrets = local.prometheus_image_pull_secrets } - working_dir = "${path.root}/../../.." depends_on = [ module.metrics_exporter, #module.partition_metrics_exporter @@ -106,7 +98,6 @@ module "grafana" { tag = local.grafana_tag image_pull_secrets = local.grafana_image_pull_secrets } - working_dir = "${path.root}/../../.." authentication = var.authentication depends_on = [module.prometheus] } diff --git a/infrastructure/quick-deploy/localhost/monitoring/versions.tf b/infrastructure/quick-deploy/localhost/monitoring/versions.tf index b8d685fd3..52c2c3c7e 100644 --- a/infrastructure/quick-deploy/localhost/monitoring/versions.tf +++ b/infrastructure/quick-deploy/localhost/monitoring/versions.tf @@ -2,7 +2,7 @@ terraform { required_providers { kubernetes = { source = "hashicorp/kubernetes" - version = "~> 2.13.0" + version = "~> 2.21.1" } external = { source = "hashicorp/external" @@ -14,11 +14,11 @@ terraform { } random = { source = "hashicorp/random" - version = "~> 3.4.3" + version = "~> 3.5.1" } local = { source = "hashicorp/local" - version = "~> 2.1.0" + version = "~> 2.4.0" } tls = { source = "hashicorp/tls" diff --git a/infrastructure/quick-deploy/localhost/storage/main.tf b/infrastructure/quick-deploy/localhost/storage/main.tf index f1d6b63e5..2af630aa4 100644 --- a/infrastructure/quick-deploy/localhost/storage/main.tf +++ b/infrastructure/quick-deploy/localhost/storage/main.tf @@ -2,7 +2,6 @@ module "activemq" { source = "../generated/infra-modules/storage/onpremise/activemq" namespace = var.namespace - working_dir = "${path.root}/../../.." activemq = { image = local.activemq_image tag = local.activemq_tag @@ -15,7 +14,6 @@ module "activemq" { module "mongodb" { source = "../generated/infra-modules/storage/onpremise/mongodb" namespace = var.namespace - working_dir = "${path.root}/../../.." mongodb = { image = local.mongodb_image tag = local.mongodb_tag @@ -31,7 +29,6 @@ module "redis" { count = var.redis != null ? 1 : 0 source = "../generated/infra-modules/storage/onpremise/redis" namespace = var.namespace - working_dir = "${path.root}/../../.." redis = { image = local.redis_image tag = local.redis_tag diff --git a/infrastructure/quick-deploy/localhost/storage/versions.tf b/infrastructure/quick-deploy/localhost/storage/versions.tf index 91aafaa0a..a82be4359 100644 --- a/infrastructure/quick-deploy/localhost/storage/versions.tf +++ b/infrastructure/quick-deploy/localhost/storage/versions.tf @@ -2,7 +2,7 @@ terraform { required_providers { kubernetes = { source = "hashicorp/kubernetes" - version = "~> 2.13.0" + version = "~> 2.21.1" } kubectl = { source = "gavinbunney/kubectl" @@ -18,11 +18,11 @@ terraform { } random = { source = "hashicorp/random" - version = "~> 3.4.3" + version = "~> 3.5.1" } local = { source = "hashicorp/local" - version = "~> 2.2.2" + version = "~> 2.4.0" } tls = { source = "hashicorp/tls" From ca54a4b8e289e9f476d7d5c101c79e21ccb25ba6 Mon Sep 17 00:00:00 2001 From: iadjadj Date: Fri, 21 Jul 2023 14:13:01 +0200 Subject: [PATCH 04/11] format terraform --- .../quick-deploy/localhost/armonik/main.tf | 6 +++--- .../quick-deploy/localhost/monitoring/main.tf | 20 +++++++++---------- .../quick-deploy/localhost/storage/main.tf | 14 ++++++------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/infrastructure/quick-deploy/localhost/armonik/main.tf b/infrastructure/quick-deploy/localhost/armonik/main.tf index e1bd1fd4d..0655de101 100644 --- a/infrastructure/quick-deploy/localhost/armonik/main.tf +++ b/infrastructure/quick-deploy/localhost/armonik/main.tf @@ -1,7 +1,7 @@ module "armonik" { - source = "../generated/infra-modules/armonik" - namespace = var.namespace - logging_level = var.logging_level + source = "../generated/infra-modules/armonik" + namespace = var.namespace + logging_level = var.logging_level extra_conf = { compute = try(var.extra_conf.compute, {}) control = try(var.extra_conf.control, {}) diff --git a/infrastructure/quick-deploy/localhost/monitoring/main.tf b/infrastructure/quick-deploy/localhost/monitoring/main.tf index bd8a1120d..e24440676 100644 --- a/infrastructure/quick-deploy/localhost/monitoring/main.tf +++ b/infrastructure/quick-deploy/localhost/monitoring/main.tf @@ -36,16 +36,16 @@ module "node_exporter" { # Metrics exporter module "metrics_exporter" { - source = "../generated/infra-modules/monitoring/onpremise/exporters/metrics-exporter" - namespace = var.namespace - service_type = local.metrics_exporter_service_type - node_selector = local.metrics_exporter_node_selector + source = "../generated/infra-modules/monitoring/onpremise/exporters/metrics-exporter" + namespace = var.namespace + service_type = local.metrics_exporter_service_type + node_selector = local.metrics_exporter_node_selector docker_image = { image = local.metrics_exporter_image tag = local.metrics_exporter_tag image_pull_secrets = local.metrics_exporter_image_pull_secrets } - extra_conf = local.metrics_exporter_extra_conf + extra_conf = local.metrics_exporter_extra_conf } # Partition metrics exporter @@ -67,11 +67,11 @@ module "metrics_exporter" { # Prometheus module "prometheus" { - source = "../generated/infra-modules/monitoring/onpremise/prometheus" - namespace = var.namespace - service_type = local.prometheus_service_type - node_selector = local.prometheus_node_selector - metrics_exporter_url = "${module.metrics_exporter.host}:${module.metrics_exporter.port}" + source = "../generated/infra-modules/monitoring/onpremise/prometheus" + namespace = var.namespace + service_type = local.prometheus_service_type + node_selector = local.prometheus_node_selector + metrics_exporter_url = "${module.metrics_exporter.host}:${module.metrics_exporter.port}" #"${module.partition_metrics_exporter.host}:${module.partition_metrics_exporter.port}" docker_image = { image = local.prometheus_image diff --git a/infrastructure/quick-deploy/localhost/storage/main.tf b/infrastructure/quick-deploy/localhost/storage/main.tf index 2af630aa4..683423a2f 100644 --- a/infrastructure/quick-deploy/localhost/storage/main.tf +++ b/infrastructure/quick-deploy/localhost/storage/main.tf @@ -1,7 +1,7 @@ # ActiveMQ module "activemq" { - source = "../generated/infra-modules/storage/onpremise/activemq" - namespace = var.namespace + source = "../generated/infra-modules/storage/onpremise/activemq" + namespace = var.namespace activemq = { image = local.activemq_image tag = local.activemq_tag @@ -12,8 +12,8 @@ module "activemq" { # MongoDB module "mongodb" { - source = "../generated/infra-modules/storage/onpremise/mongodb" - namespace = var.namespace + source = "../generated/infra-modules/storage/onpremise/mongodb" + namespace = var.namespace mongodb = { image = local.mongodb_image tag = local.mongodb_tag @@ -26,9 +26,9 @@ module "mongodb" { # Redis module "redis" { - count = var.redis != null ? 1 : 0 - source = "../generated/infra-modules/storage/onpremise/redis" - namespace = var.namespace + count = var.redis != null ? 1 : 0 + source = "../generated/infra-modules/storage/onpremise/redis" + namespace = var.namespace redis = { image = local.redis_image tag = local.redis_tag From 5e9e02c6509987ae3baf5f6b51d7615ab1c1469b Mon Sep 17 00:00:00 2001 From: lzianekhodja Date: Fri, 21 Jul 2023 16:43:42 +0200 Subject: [PATCH 05/11] reorganize localhost deployments directory --- .github/workflows/deploy.yml | 46 ++++++------- .../localhost/{all => all-in-one}/Makefile | 0 .../localhost/{all => all-in-one}/armonik.tf | 0 .../localhost/{all => all-in-one}/common.tf | 0 .../localhost/{all => all-in-one}/data/.keep | 0 .../localhost/{all => all-in-one}/images.tf | 0 .../localhost/{all => all-in-one}/keda.tf | 0 .../{all => all-in-one}/metrics-server.tf | 0 .../{all => all-in-one}/monitoring.tf | 0 .../localhost/{all => all-in-one}/outputs.tf | 0 .../{all => all-in-one}/parameters.tfvars | 63 ++++++++++++++---- .../{all => all-in-one}/providers.tf | 0 .../localhost/{all => all-in-one}/storage.tf | 0 .../{all => all-in-one}/variables.tf | 0 .../localhost/{all => all-in-one}/versions.tf | 0 .../localhost/{ => multi-stages}/Makefile | 2 +- .../{ => multi-stages}/armonik/Makefile | 0 .../{ => multi-stages}/armonik/backend.tf | 0 .../{ => multi-stages}/armonik/locals.tf | 0 .../{ => multi-stages}/armonik/main.tf | 0 .../{ => multi-stages}/armonik/outputs.tf | 0 .../armonik/parameters.tfvars | 0 .../{ => multi-stages}/armonik/providers.tf | 2 +- .../{ => multi-stages}/armonik/variables.tf | 0 .../{ => multi-stages}/armonik/versions.tf | 0 .../localhost/{ => multi-stages}/envvars.sh | 0 .../{ => multi-stages}/images/seq.png | Bin .../{ => multi-stages}/images/seq_auth.png | Bin .../{ => multi-stages}/keda/Makefile | 0 .../{ => multi-stages}/keda/backend.tf | 0 .../{ => multi-stages}/keda/locals.tf | 0 .../localhost/{ => multi-stages}/keda/main.tf | 0 .../{ => multi-stages}/keda/outputs.tf | 0 .../{ => multi-stages}/keda/parameters.tfvars | 0 .../{ => multi-stages}/keda/providers.tf | 2 +- .../{ => multi-stages}/keda/variables.tf | 0 .../{ => multi-stages}/keda/versions.tf | 0 .../metrics-server/Makefile | 0 .../metrics-server/backend.tf | 0 .../metrics-server/locals.tf | 0 .../{ => multi-stages}/metrics-server/main.tf | 0 .../metrics-server/outputs.tf | 0 .../metrics-server/parameters.tfvars | 0 .../metrics-server/providers.tf | 2 +- .../metrics-server/variables.tf | 0 .../metrics-server/versions.tf | 0 .../{ => multi-stages}/monitoring/Makefile | 0 .../{ => multi-stages}/monitoring/backend.tf | 0 .../{ => multi-stages}/monitoring/locals.tf | 0 .../{ => multi-stages}/monitoring/main.tf | 0 .../{ => multi-stages}/monitoring/outputs.tf | 0 .../monitoring/parameters.tfvars | 0 .../monitoring/providers.tf | 2 +- .../{ => multi-stages}/monitoring/secrets.tf | 0 .../monitoring/variables.tf | 0 .../{ => multi-stages}/monitoring/versions.tf | 0 .../multi-stages}/scripts/k8s_config.sh | 0 .../{ => multi-stages}/storage/Makefile | 0 .../{ => multi-stages}/storage/backend.tf | 0 .../{ => multi-stages}/storage/locals.tf | 0 .../{ => multi-stages}/storage/main.tf | 0 .../{ => multi-stages}/storage/outputs.tf | 0 .../storage/parameters.tfvars | 0 .../{ => multi-stages}/storage/providers.tf | 2 +- .../{ => multi-stages}/storage/secrets.tf | 0 .../{ => multi-stages}/storage/variables.tf | 0 .../{ => multi-stages}/storage/versions.tf | 0 67 files changed, 79 insertions(+), 42 deletions(-) rename infrastructure/quick-deploy/localhost/{all => all-in-one}/Makefile (100%) rename infrastructure/quick-deploy/localhost/{all => all-in-one}/armonik.tf (100%) rename infrastructure/quick-deploy/localhost/{all => all-in-one}/common.tf (100%) rename infrastructure/quick-deploy/localhost/{all => all-in-one}/data/.keep (100%) rename infrastructure/quick-deploy/localhost/{all => all-in-one}/images.tf (100%) rename infrastructure/quick-deploy/localhost/{all => all-in-one}/keda.tf (100%) rename infrastructure/quick-deploy/localhost/{all => all-in-one}/metrics-server.tf (100%) rename infrastructure/quick-deploy/localhost/{all => all-in-one}/monitoring.tf (100%) rename infrastructure/quick-deploy/localhost/{all => all-in-one}/outputs.tf (100%) rename infrastructure/quick-deploy/localhost/{all => all-in-one}/parameters.tfvars (86%) rename infrastructure/quick-deploy/localhost/{all => all-in-one}/providers.tf (100%) rename infrastructure/quick-deploy/localhost/{all => all-in-one}/storage.tf (100%) rename infrastructure/quick-deploy/localhost/{all => all-in-one}/variables.tf (100%) rename infrastructure/quick-deploy/localhost/{all => all-in-one}/versions.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/Makefile (98%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/armonik/Makefile (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/armonik/backend.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/armonik/locals.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/armonik/main.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/armonik/outputs.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/armonik/parameters.tfvars (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/armonik/providers.tf (91%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/armonik/variables.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/armonik/versions.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/envvars.sh (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/images/seq.png (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/images/seq_auth.png (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/keda/Makefile (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/keda/backend.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/keda/locals.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/keda/main.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/keda/outputs.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/keda/parameters.tfvars (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/keda/providers.tf (91%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/keda/variables.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/keda/versions.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/metrics-server/Makefile (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/metrics-server/backend.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/metrics-server/locals.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/metrics-server/main.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/metrics-server/outputs.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/metrics-server/parameters.tfvars (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/metrics-server/providers.tf (91%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/metrics-server/variables.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/metrics-server/versions.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/monitoring/Makefile (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/monitoring/backend.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/monitoring/locals.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/monitoring/main.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/monitoring/outputs.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/monitoring/parameters.tfvars (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/monitoring/providers.tf (91%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/monitoring/secrets.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/monitoring/variables.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/monitoring/versions.tf (100%) rename infrastructure/{utils => quick-deploy/localhost/multi-stages}/scripts/k8s_config.sh (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/storage/Makefile (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/storage/backend.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/storage/locals.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/storage/main.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/storage/outputs.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/storage/parameters.tfvars (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/storage/providers.tf (85%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/storage/secrets.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/storage/variables.tf (100%) rename infrastructure/quick-deploy/localhost/{ => multi-stages}/storage/versions.tf (100%) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 266909e45..802b596e4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -61,8 +61,8 @@ jobs: shell: bash run: | set -ex - export ADMIN_API_URL=$(cat infrastructure/quick-deploy/localhost/all/generated/armonik-output.json | jq -r '.armonik.admin_api_url') - export ADMIN_APP_URL=$(cat infrastructure/quick-deploy/localhost/all/generated/armonik-output.json | jq -r '.armonik.admin_app_url') + export ADMIN_API_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.admin_api_url') + export ADMIN_APP_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.admin_app_url') : "Add -f again when a success endpoint has been implemented" curl -sSL "${ADMIN_API_URL}" -o /dev/null || true "in v2.7.2, there is no api endpoint" curl -fsSL "${ADMIN_APP_URL}" -o /dev/null || true "in v2.7.2, there is no app endpoint" @@ -74,10 +74,10 @@ jobs: logs/infra/tfstates \ logs/app - if [ -e infrastructure/quick-deploy/localhost/all/generated/armonik-output.json ] ; then - cp infrastructure/quick-deploy/localhost/all/generated/armonik-output.json logs/infra/generated + if [ -e infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json ] ; then + cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json logs/infra/generated fi - cp infrastructure/quick-deploy/localhost/all/generated/armonik-terraform.tfstate logs/infra/tfstates + cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-terraform.tfstate logs/infra/tfstates sudo cp -rL /var/log/pods/armonik_* logs/app sudo chown $USER -R logs tar -czf admin-gui.tar.gz logs @@ -125,7 +125,7 @@ jobs: shell: bash run: | set -ex - export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all/generated/armonik-output.json | jq -r '.armonik.control_plane_url') + export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url') docker run --rm \ -e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \ -e Partition="stream" \ @@ -138,10 +138,10 @@ jobs: core-stream/infra/tfstates \ core-stream/app - if [ -e infrastructure/quick-deploy/localhost/all/generated/armonik-output.json ] ; then - cp infrastructure/quick-deploy/localhost/all/generated/armonik-output.json core-stream/infra/generated + if [ -e infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json ] ; then + cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json core-stream/infra/generated fi - cp infrastructure/quick-deploy/localhost/all/generated/armonik-terraform.tfstate core-stream/infra/tfstates + cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-terraform.tfstate core-stream/infra/tfstates sudo cp -rL /var/log/pods/armonik_* core-stream/app sudo chown $USER -R core-stream tar -czf core-stream.tar.gz core-stream @@ -189,7 +189,7 @@ jobs: shell: bash run: | set -ex - export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all/generated/armonik-output.json | jq -r '.armonik.control_plane_url') + export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url') docker run --rm \ -e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \ -e HtcMock__NTasks=2000 \ @@ -206,7 +206,7 @@ jobs: shell: bash run: | set -ex - export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all/generated/armonik-output.json | jq -r '.armonik.control_plane_url') + export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url') docker run --rm \ -e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \ -e HtcMock__NTasks=1000 \ @@ -223,7 +223,7 @@ jobs: shell: bash run: | set -ex - export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all/generated/armonik-output.json | jq -r '.armonik.control_plane_url') + export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url') docker run --rm \ -e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \ -e HtcMock__NTasks=1000 \ @@ -240,7 +240,7 @@ jobs: shell: bash run: | set -ex - export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all/generated/armonik-output.json | jq -r '.armonik.control_plane_url') + export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url') docker run --rm \ -e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \ -e HtcMock__NTasks=1000 \ @@ -261,10 +261,10 @@ jobs: htcmock/infra/tfstates \ htcmock/app - if [ -e infrastructure/quick-deploy/localhost/all/generated/armonik-output.json ] ; then - cp infrastructure/quick-deploy/localhost/all/generated/armonik-output.json htcmock/infra/generated + if [ -e infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json ] ; then + cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json htcmock/infra/generated fi - cp infrastructure/quick-deploy/localhost/all/generated/armonik-terraform.tfstate htcmock/infra/tfstates + cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-terraform.tfstate htcmock/infra/tfstates sudo cp -rL /var/log/pods/armonik_* htcmock/app sudo chown $USER -R htcmock tar -czf htcmock.tar.gz htcmock @@ -314,7 +314,7 @@ jobs: shell: bash run: | set -ex - export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all/generated/armonik-output.json | jq -r '.armonik.control_plane_url') + export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url') docker run --rm \ -e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \ -e BenchOptions__NTasks=200 \ @@ -325,7 +325,7 @@ jobs: shell: bash run: | set -ex - export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all/generated/armonik-output.json | jq -r '.armonik.control_plane_url') + export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url') docker run --rm \ -e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \ -e BenchOptions__NTasks=2 \ @@ -336,7 +336,7 @@ jobs: shell: bash run: | set -ex - export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all/generated/armonik-output.json | jq -r '.armonik.control_plane_url') + export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url') docker run --rm \ -e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \ -e BenchOptions__NTasks=10 \ @@ -349,7 +349,7 @@ jobs: shell: bash run: | set -ex - export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all/generated/armonik-output.json | jq -r '.armonik.control_plane_url') + export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url') docker run --rm \ -e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \ -e BenchOptions__NTasks=10 \ @@ -366,10 +366,10 @@ jobs: bench/infra/tfstates \ bench/app - if [ -e infrastructure/quick-deploy/localhost/all/generated/armonik-output.json ] ; then - cp infrastructure/quick-deploy/localhost/all/generated/armonik-output.json bench/infra/generated + if [ -e infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json ] ; then + cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json bench/infra/generated fi - cp infrastructure/quick-deploy/localhost/all/generated/armonik-terraform.tfstate bench/infra/tfstates + cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-terraform.tfstate bench/infra/tfstates sudo cp -rL /var/log/pods/armonik_* bench/app sudo chown $USER -R bench tar -czf bench.tar.gz bench diff --git a/infrastructure/quick-deploy/localhost/all/Makefile b/infrastructure/quick-deploy/localhost/all-in-one/Makefile similarity index 100% rename from infrastructure/quick-deploy/localhost/all/Makefile rename to infrastructure/quick-deploy/localhost/all-in-one/Makefile diff --git a/infrastructure/quick-deploy/localhost/all/armonik.tf b/infrastructure/quick-deploy/localhost/all-in-one/armonik.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/all/armonik.tf rename to infrastructure/quick-deploy/localhost/all-in-one/armonik.tf diff --git a/infrastructure/quick-deploy/localhost/all/common.tf b/infrastructure/quick-deploy/localhost/all-in-one/common.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/all/common.tf rename to infrastructure/quick-deploy/localhost/all-in-one/common.tf diff --git a/infrastructure/quick-deploy/localhost/all/data/.keep b/infrastructure/quick-deploy/localhost/all-in-one/data/.keep similarity index 100% rename from infrastructure/quick-deploy/localhost/all/data/.keep rename to infrastructure/quick-deploy/localhost/all-in-one/data/.keep diff --git a/infrastructure/quick-deploy/localhost/all/images.tf b/infrastructure/quick-deploy/localhost/all-in-one/images.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/all/images.tf rename to infrastructure/quick-deploy/localhost/all-in-one/images.tf diff --git a/infrastructure/quick-deploy/localhost/all/keda.tf b/infrastructure/quick-deploy/localhost/all-in-one/keda.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/all/keda.tf rename to infrastructure/quick-deploy/localhost/all-in-one/keda.tf diff --git a/infrastructure/quick-deploy/localhost/all/metrics-server.tf b/infrastructure/quick-deploy/localhost/all-in-one/metrics-server.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/all/metrics-server.tf rename to infrastructure/quick-deploy/localhost/all-in-one/metrics-server.tf diff --git a/infrastructure/quick-deploy/localhost/all/monitoring.tf b/infrastructure/quick-deploy/localhost/all-in-one/monitoring.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/all/monitoring.tf rename to infrastructure/quick-deploy/localhost/all-in-one/monitoring.tf diff --git a/infrastructure/quick-deploy/localhost/all/outputs.tf b/infrastructure/quick-deploy/localhost/all-in-one/outputs.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/all/outputs.tf rename to infrastructure/quick-deploy/localhost/all-in-one/outputs.tf diff --git a/infrastructure/quick-deploy/localhost/all/parameters.tfvars b/infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars similarity index 86% rename from infrastructure/quick-deploy/localhost/all/parameters.tfvars rename to infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars index d338b2573..1bf231d64 100644 --- a/infrastructure/quick-deploy/localhost/all/parameters.tfvars +++ b/infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars @@ -6,7 +6,7 @@ logging_level = "Information" # Object storage # Uncomment either the `redis` or the `minio` parameter -redis = {} +#redis = {} #minio = {} # Uncomment this to have minio S3 enabled instead of hostpath shared_storage @@ -85,7 +85,7 @@ compute_plane = { # Default partition that uses the C# extension for the worker default = { # number of replicas for each deployment of compute plane - replicas = 0 + replicas = 0 # ArmoniK polling agent polling_agent = { limits = { @@ -100,7 +100,7 @@ compute_plane = { # ArmoniK workers worker = [ { - image = "dockerhubaneo/armonik_worker_dll" + image = "dockerhubaneo/armonik_worker_dll" limits = { cpu = "1000m" memory = "1024Mi" @@ -117,7 +117,7 @@ compute_plane = { cooldown_period = 300 min_replica_count = 0 max_replica_count = 5 - behavior = { + behavior = { restore_to_original_replica_count = true stabilization_window_seconds = 300 type = "Percent" @@ -135,7 +135,7 @@ compute_plane = { # Partition for the stream worker stream = { # number of replicas for each deployment of compute plane - replicas = 0 + replicas = 0 # ArmoniK polling agent polling_agent = { limits = { @@ -150,7 +150,7 @@ compute_plane = { # ArmoniK workers worker = [ { - image = "dockerhubaneo/armonik_core_stream_test_worker" + image = "dockerhubaneo/armonik_core_stream_test_worker" limits = { cpu = "1000m" memory = "1024Mi" @@ -167,7 +167,7 @@ compute_plane = { cooldown_period = 300 min_replica_count = 0 max_replica_count = 5 - behavior = { + behavior = { restore_to_original_replica_count = true stabilization_window_seconds = 300 type = "Percent" @@ -185,7 +185,7 @@ compute_plane = { # Partition for the htcmock worker htcmock = { # number of replicas for each deployment of compute plane - replicas = 0 + replicas = 0 # ArmoniK polling agent polling_agent = { limits = { @@ -200,7 +200,7 @@ compute_plane = { # ArmoniK workers worker = [ { - image = "dockerhubaneo/armonik_core_htcmock_test_worker" + image = "dockerhubaneo/armonik_core_htcmock_test_worker" limits = { cpu = "1000m" memory = "1024Mi" @@ -217,7 +217,7 @@ compute_plane = { cooldown_period = 300 min_replica_count = 0 max_replica_count = 5 - behavior = { + behavior = { restore_to_original_replica_count = true stabilization_window_seconds = 300 type = "Percent" @@ -235,7 +235,7 @@ compute_plane = { # Partition for the bench worker bench = { # number of replicas for each deployment of compute plane - replicas = 0 + replicas = 0 # ArmoniK polling agent polling_agent = { limits = { @@ -250,7 +250,7 @@ compute_plane = { # ArmoniK workers worker = [ { - image = "dockerhubaneo/armonik_core_bench_test_worker" + image = "dockerhubaneo/armonik_core_bench_test_worker" limits = { cpu = "1000m" memory = "1024Mi" @@ -267,7 +267,7 @@ compute_plane = { cooldown_period = 300 min_replica_count = 0 max_replica_count = 5 - behavior = { + behavior = { restore_to_original_replica_count = true stabilization_window_seconds = 300 type = "Percent" @@ -312,3 +312,40 @@ extra_conf = { Submitter__MaxErrorAllowed = 50 } } + +activemq = { + image_name = "dockerhubaneo/activemq" + image_tag = "5.18.2" +} + +mongodb = { + image_name = "dockerhubaneo/mongodb" + image_tag = "6.0.7" +} + +node_exporter = { + image_name = "dockerhubaneo/nodeexporter" + image_tag = "1.6.0" +} + +prometheus = { + image_name = "dockerhubaneo/prometheus" + image_tag = "2.45.0" +} + +grafana = { + image_name = "dockerhubaneo/grafana" + image_tag = "10.0.2" +} + +redis = { + image_name = "dockerhubaneo/redis" + image_tag = "7.0.12" +} + +seq = { + image_name = "dockerhubaneo/seq" + image_tag = "2023.3" + cli_image_name = "dockerhubaneo/seqcli" + cli_image_tag = "2023.2" +} \ No newline at end of file diff --git a/infrastructure/quick-deploy/localhost/all/providers.tf b/infrastructure/quick-deploy/localhost/all-in-one/providers.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/all/providers.tf rename to infrastructure/quick-deploy/localhost/all-in-one/providers.tf diff --git a/infrastructure/quick-deploy/localhost/all/storage.tf b/infrastructure/quick-deploy/localhost/all-in-one/storage.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/all/storage.tf rename to infrastructure/quick-deploy/localhost/all-in-one/storage.tf diff --git a/infrastructure/quick-deploy/localhost/all/variables.tf b/infrastructure/quick-deploy/localhost/all-in-one/variables.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/all/variables.tf rename to infrastructure/quick-deploy/localhost/all-in-one/variables.tf diff --git a/infrastructure/quick-deploy/localhost/all/versions.tf b/infrastructure/quick-deploy/localhost/all-in-one/versions.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/all/versions.tf rename to infrastructure/quick-deploy/localhost/all-in-one/versions.tf diff --git a/infrastructure/quick-deploy/localhost/Makefile b/infrastructure/quick-deploy/localhost/multi-stages/Makefile similarity index 98% rename from infrastructure/quick-deploy/localhost/Makefile rename to infrastructure/quick-deploy/localhost/multi-stages/Makefile index c06345d0c..5fa515f89 100644 --- a/infrastructure/quick-deploy/localhost/Makefile +++ b/infrastructure/quick-deploy/localhost/multi-stages/Makefile @@ -10,7 +10,7 @@ export METRICS_SERVER=$(shell kubectl get deploy -A -l k8s-app=metrics-server -- CURRENT_DIR=$(shell pwd) GENERATED_DIR=$(CURRENT_DIR)/generated MODULES_DIR=$(GENERATED_DIR)/infra-modules -VERSIONS_FILE?=$(shell realpath ../../../versions.tfvars.json) +VERSIONS_FILE?=$(shell realpath ../../../../versions.tfvars.json) #################################### # Kubernetes namespace # diff --git a/infrastructure/quick-deploy/localhost/armonik/Makefile b/infrastructure/quick-deploy/localhost/multi-stages/armonik/Makefile similarity index 100% rename from infrastructure/quick-deploy/localhost/armonik/Makefile rename to infrastructure/quick-deploy/localhost/multi-stages/armonik/Makefile diff --git a/infrastructure/quick-deploy/localhost/armonik/backend.tf b/infrastructure/quick-deploy/localhost/multi-stages/armonik/backend.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/armonik/backend.tf rename to infrastructure/quick-deploy/localhost/multi-stages/armonik/backend.tf diff --git a/infrastructure/quick-deploy/localhost/armonik/locals.tf b/infrastructure/quick-deploy/localhost/multi-stages/armonik/locals.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/armonik/locals.tf rename to infrastructure/quick-deploy/localhost/multi-stages/armonik/locals.tf diff --git a/infrastructure/quick-deploy/localhost/armonik/main.tf b/infrastructure/quick-deploy/localhost/multi-stages/armonik/main.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/armonik/main.tf rename to infrastructure/quick-deploy/localhost/multi-stages/armonik/main.tf diff --git a/infrastructure/quick-deploy/localhost/armonik/outputs.tf b/infrastructure/quick-deploy/localhost/multi-stages/armonik/outputs.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/armonik/outputs.tf rename to infrastructure/quick-deploy/localhost/multi-stages/armonik/outputs.tf diff --git a/infrastructure/quick-deploy/localhost/armonik/parameters.tfvars b/infrastructure/quick-deploy/localhost/multi-stages/armonik/parameters.tfvars similarity index 100% rename from infrastructure/quick-deploy/localhost/armonik/parameters.tfvars rename to infrastructure/quick-deploy/localhost/multi-stages/armonik/parameters.tfvars diff --git a/infrastructure/quick-deploy/localhost/armonik/providers.tf b/infrastructure/quick-deploy/localhost/multi-stages/armonik/providers.tf similarity index 91% rename from infrastructure/quick-deploy/localhost/armonik/providers.tf rename to infrastructure/quick-deploy/localhost/multi-stages/armonik/providers.tf index 27aa8239b..7fc3f5964 100644 --- a/infrastructure/quick-deploy/localhost/armonik/providers.tf +++ b/infrastructure/quick-deploy/localhost/multi-stages/armonik/providers.tf @@ -1,7 +1,7 @@ # K8s configuration data "external" "k8s_config_context" { program = ["bash", "k8s_config.sh", var.k8s_config_path] - working_dir = ".${path.root}/../../utils/scripts" + working_dir = ".${path.root}/scripts" } provider "kubernetes" { diff --git a/infrastructure/quick-deploy/localhost/armonik/variables.tf b/infrastructure/quick-deploy/localhost/multi-stages/armonik/variables.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/armonik/variables.tf rename to infrastructure/quick-deploy/localhost/multi-stages/armonik/variables.tf diff --git a/infrastructure/quick-deploy/localhost/armonik/versions.tf b/infrastructure/quick-deploy/localhost/multi-stages/armonik/versions.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/armonik/versions.tf rename to infrastructure/quick-deploy/localhost/multi-stages/armonik/versions.tf diff --git a/infrastructure/quick-deploy/localhost/envvars.sh b/infrastructure/quick-deploy/localhost/multi-stages/envvars.sh similarity index 100% rename from infrastructure/quick-deploy/localhost/envvars.sh rename to infrastructure/quick-deploy/localhost/multi-stages/envvars.sh diff --git a/infrastructure/quick-deploy/localhost/images/seq.png b/infrastructure/quick-deploy/localhost/multi-stages/images/seq.png similarity index 100% rename from infrastructure/quick-deploy/localhost/images/seq.png rename to infrastructure/quick-deploy/localhost/multi-stages/images/seq.png diff --git a/infrastructure/quick-deploy/localhost/images/seq_auth.png b/infrastructure/quick-deploy/localhost/multi-stages/images/seq_auth.png similarity index 100% rename from infrastructure/quick-deploy/localhost/images/seq_auth.png rename to infrastructure/quick-deploy/localhost/multi-stages/images/seq_auth.png diff --git a/infrastructure/quick-deploy/localhost/keda/Makefile b/infrastructure/quick-deploy/localhost/multi-stages/keda/Makefile similarity index 100% rename from infrastructure/quick-deploy/localhost/keda/Makefile rename to infrastructure/quick-deploy/localhost/multi-stages/keda/Makefile diff --git a/infrastructure/quick-deploy/localhost/keda/backend.tf b/infrastructure/quick-deploy/localhost/multi-stages/keda/backend.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/keda/backend.tf rename to infrastructure/quick-deploy/localhost/multi-stages/keda/backend.tf diff --git a/infrastructure/quick-deploy/localhost/keda/locals.tf b/infrastructure/quick-deploy/localhost/multi-stages/keda/locals.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/keda/locals.tf rename to infrastructure/quick-deploy/localhost/multi-stages/keda/locals.tf diff --git a/infrastructure/quick-deploy/localhost/keda/main.tf b/infrastructure/quick-deploy/localhost/multi-stages/keda/main.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/keda/main.tf rename to infrastructure/quick-deploy/localhost/multi-stages/keda/main.tf diff --git a/infrastructure/quick-deploy/localhost/keda/outputs.tf b/infrastructure/quick-deploy/localhost/multi-stages/keda/outputs.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/keda/outputs.tf rename to infrastructure/quick-deploy/localhost/multi-stages/keda/outputs.tf diff --git a/infrastructure/quick-deploy/localhost/keda/parameters.tfvars b/infrastructure/quick-deploy/localhost/multi-stages/keda/parameters.tfvars similarity index 100% rename from infrastructure/quick-deploy/localhost/keda/parameters.tfvars rename to infrastructure/quick-deploy/localhost/multi-stages/keda/parameters.tfvars diff --git a/infrastructure/quick-deploy/localhost/keda/providers.tf b/infrastructure/quick-deploy/localhost/multi-stages/keda/providers.tf similarity index 91% rename from infrastructure/quick-deploy/localhost/keda/providers.tf rename to infrastructure/quick-deploy/localhost/multi-stages/keda/providers.tf index 882c7d3ce..e5fb4796d 100644 --- a/infrastructure/quick-deploy/localhost/keda/providers.tf +++ b/infrastructure/quick-deploy/localhost/multi-stages/keda/providers.tf @@ -1,7 +1,7 @@ # K8s configuration data "external" "k8s_config_context" { program = ["bash", "k8s_config.sh", var.k8s_config_path] - working_dir = ".${path.root}/../../utils/scripts" + working_dir = ".${path.root}/scripts" } provider "kubernetes" { diff --git a/infrastructure/quick-deploy/localhost/keda/variables.tf b/infrastructure/quick-deploy/localhost/multi-stages/keda/variables.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/keda/variables.tf rename to infrastructure/quick-deploy/localhost/multi-stages/keda/variables.tf diff --git a/infrastructure/quick-deploy/localhost/keda/versions.tf b/infrastructure/quick-deploy/localhost/multi-stages/keda/versions.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/keda/versions.tf rename to infrastructure/quick-deploy/localhost/multi-stages/keda/versions.tf diff --git a/infrastructure/quick-deploy/localhost/metrics-server/Makefile b/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/Makefile similarity index 100% rename from infrastructure/quick-deploy/localhost/metrics-server/Makefile rename to infrastructure/quick-deploy/localhost/multi-stages/metrics-server/Makefile diff --git a/infrastructure/quick-deploy/localhost/metrics-server/backend.tf b/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/backend.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/metrics-server/backend.tf rename to infrastructure/quick-deploy/localhost/multi-stages/metrics-server/backend.tf diff --git a/infrastructure/quick-deploy/localhost/metrics-server/locals.tf b/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/locals.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/metrics-server/locals.tf rename to infrastructure/quick-deploy/localhost/multi-stages/metrics-server/locals.tf diff --git a/infrastructure/quick-deploy/localhost/metrics-server/main.tf b/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/main.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/metrics-server/main.tf rename to infrastructure/quick-deploy/localhost/multi-stages/metrics-server/main.tf diff --git a/infrastructure/quick-deploy/localhost/metrics-server/outputs.tf b/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/outputs.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/metrics-server/outputs.tf rename to infrastructure/quick-deploy/localhost/multi-stages/metrics-server/outputs.tf diff --git a/infrastructure/quick-deploy/localhost/metrics-server/parameters.tfvars b/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/parameters.tfvars similarity index 100% rename from infrastructure/quick-deploy/localhost/metrics-server/parameters.tfvars rename to infrastructure/quick-deploy/localhost/multi-stages/metrics-server/parameters.tfvars diff --git a/infrastructure/quick-deploy/localhost/metrics-server/providers.tf b/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/providers.tf similarity index 91% rename from infrastructure/quick-deploy/localhost/metrics-server/providers.tf rename to infrastructure/quick-deploy/localhost/multi-stages/metrics-server/providers.tf index 882c7d3ce..e5fb4796d 100644 --- a/infrastructure/quick-deploy/localhost/metrics-server/providers.tf +++ b/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/providers.tf @@ -1,7 +1,7 @@ # K8s configuration data "external" "k8s_config_context" { program = ["bash", "k8s_config.sh", var.k8s_config_path] - working_dir = ".${path.root}/../../utils/scripts" + working_dir = ".${path.root}/scripts" } provider "kubernetes" { diff --git a/infrastructure/quick-deploy/localhost/metrics-server/variables.tf b/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/variables.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/metrics-server/variables.tf rename to infrastructure/quick-deploy/localhost/multi-stages/metrics-server/variables.tf diff --git a/infrastructure/quick-deploy/localhost/metrics-server/versions.tf b/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/versions.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/metrics-server/versions.tf rename to infrastructure/quick-deploy/localhost/multi-stages/metrics-server/versions.tf diff --git a/infrastructure/quick-deploy/localhost/monitoring/Makefile b/infrastructure/quick-deploy/localhost/multi-stages/monitoring/Makefile similarity index 100% rename from infrastructure/quick-deploy/localhost/monitoring/Makefile rename to infrastructure/quick-deploy/localhost/multi-stages/monitoring/Makefile diff --git a/infrastructure/quick-deploy/localhost/monitoring/backend.tf b/infrastructure/quick-deploy/localhost/multi-stages/monitoring/backend.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/monitoring/backend.tf rename to infrastructure/quick-deploy/localhost/multi-stages/monitoring/backend.tf diff --git a/infrastructure/quick-deploy/localhost/monitoring/locals.tf b/infrastructure/quick-deploy/localhost/multi-stages/monitoring/locals.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/monitoring/locals.tf rename to infrastructure/quick-deploy/localhost/multi-stages/monitoring/locals.tf diff --git a/infrastructure/quick-deploy/localhost/monitoring/main.tf b/infrastructure/quick-deploy/localhost/multi-stages/monitoring/main.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/monitoring/main.tf rename to infrastructure/quick-deploy/localhost/multi-stages/monitoring/main.tf diff --git a/infrastructure/quick-deploy/localhost/monitoring/outputs.tf b/infrastructure/quick-deploy/localhost/multi-stages/monitoring/outputs.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/monitoring/outputs.tf rename to infrastructure/quick-deploy/localhost/multi-stages/monitoring/outputs.tf diff --git a/infrastructure/quick-deploy/localhost/monitoring/parameters.tfvars b/infrastructure/quick-deploy/localhost/multi-stages/monitoring/parameters.tfvars similarity index 100% rename from infrastructure/quick-deploy/localhost/monitoring/parameters.tfvars rename to infrastructure/quick-deploy/localhost/multi-stages/monitoring/parameters.tfvars diff --git a/infrastructure/quick-deploy/localhost/monitoring/providers.tf b/infrastructure/quick-deploy/localhost/multi-stages/monitoring/providers.tf similarity index 91% rename from infrastructure/quick-deploy/localhost/monitoring/providers.tf rename to infrastructure/quick-deploy/localhost/multi-stages/monitoring/providers.tf index 882c7d3ce..e5fb4796d 100644 --- a/infrastructure/quick-deploy/localhost/monitoring/providers.tf +++ b/infrastructure/quick-deploy/localhost/multi-stages/monitoring/providers.tf @@ -1,7 +1,7 @@ # K8s configuration data "external" "k8s_config_context" { program = ["bash", "k8s_config.sh", var.k8s_config_path] - working_dir = ".${path.root}/../../utils/scripts" + working_dir = ".${path.root}/scripts" } provider "kubernetes" { diff --git a/infrastructure/quick-deploy/localhost/monitoring/secrets.tf b/infrastructure/quick-deploy/localhost/multi-stages/monitoring/secrets.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/monitoring/secrets.tf rename to infrastructure/quick-deploy/localhost/multi-stages/monitoring/secrets.tf diff --git a/infrastructure/quick-deploy/localhost/monitoring/variables.tf b/infrastructure/quick-deploy/localhost/multi-stages/monitoring/variables.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/monitoring/variables.tf rename to infrastructure/quick-deploy/localhost/multi-stages/monitoring/variables.tf diff --git a/infrastructure/quick-deploy/localhost/monitoring/versions.tf b/infrastructure/quick-deploy/localhost/multi-stages/monitoring/versions.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/monitoring/versions.tf rename to infrastructure/quick-deploy/localhost/multi-stages/monitoring/versions.tf diff --git a/infrastructure/utils/scripts/k8s_config.sh b/infrastructure/quick-deploy/localhost/multi-stages/scripts/k8s_config.sh similarity index 100% rename from infrastructure/utils/scripts/k8s_config.sh rename to infrastructure/quick-deploy/localhost/multi-stages/scripts/k8s_config.sh diff --git a/infrastructure/quick-deploy/localhost/storage/Makefile b/infrastructure/quick-deploy/localhost/multi-stages/storage/Makefile similarity index 100% rename from infrastructure/quick-deploy/localhost/storage/Makefile rename to infrastructure/quick-deploy/localhost/multi-stages/storage/Makefile diff --git a/infrastructure/quick-deploy/localhost/storage/backend.tf b/infrastructure/quick-deploy/localhost/multi-stages/storage/backend.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/storage/backend.tf rename to infrastructure/quick-deploy/localhost/multi-stages/storage/backend.tf diff --git a/infrastructure/quick-deploy/localhost/storage/locals.tf b/infrastructure/quick-deploy/localhost/multi-stages/storage/locals.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/storage/locals.tf rename to infrastructure/quick-deploy/localhost/multi-stages/storage/locals.tf diff --git a/infrastructure/quick-deploy/localhost/storage/main.tf b/infrastructure/quick-deploy/localhost/multi-stages/storage/main.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/storage/main.tf rename to infrastructure/quick-deploy/localhost/multi-stages/storage/main.tf diff --git a/infrastructure/quick-deploy/localhost/storage/outputs.tf b/infrastructure/quick-deploy/localhost/multi-stages/storage/outputs.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/storage/outputs.tf rename to infrastructure/quick-deploy/localhost/multi-stages/storage/outputs.tf diff --git a/infrastructure/quick-deploy/localhost/storage/parameters.tfvars b/infrastructure/quick-deploy/localhost/multi-stages/storage/parameters.tfvars similarity index 100% rename from infrastructure/quick-deploy/localhost/storage/parameters.tfvars rename to infrastructure/quick-deploy/localhost/multi-stages/storage/parameters.tfvars diff --git a/infrastructure/quick-deploy/localhost/storage/providers.tf b/infrastructure/quick-deploy/localhost/multi-stages/storage/providers.tf similarity index 85% rename from infrastructure/quick-deploy/localhost/storage/providers.tf rename to infrastructure/quick-deploy/localhost/multi-stages/storage/providers.tf index b5b71fc7b..d0a40e2a5 100644 --- a/infrastructure/quick-deploy/localhost/storage/providers.tf +++ b/infrastructure/quick-deploy/localhost/multi-stages/storage/providers.tf @@ -1,7 +1,7 @@ # K8s configuration data "external" "k8s_config_context" { program = ["bash", "k8s_config.sh", var.k8s_config_path] - working_dir = ".${path.root}/../../utils/scripts" + working_dir = ".${path.root}/scripts" } provider "kubernetes" { diff --git a/infrastructure/quick-deploy/localhost/storage/secrets.tf b/infrastructure/quick-deploy/localhost/multi-stages/storage/secrets.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/storage/secrets.tf rename to infrastructure/quick-deploy/localhost/multi-stages/storage/secrets.tf diff --git a/infrastructure/quick-deploy/localhost/storage/variables.tf b/infrastructure/quick-deploy/localhost/multi-stages/storage/variables.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/storage/variables.tf rename to infrastructure/quick-deploy/localhost/multi-stages/storage/variables.tf diff --git a/infrastructure/quick-deploy/localhost/storage/versions.tf b/infrastructure/quick-deploy/localhost/multi-stages/storage/versions.tf similarity index 100% rename from infrastructure/quick-deploy/localhost/storage/versions.tf rename to infrastructure/quick-deploy/localhost/multi-stages/storage/versions.tf From 8c67857870231c6ff79687163c2b34d83a940ab4 Mon Sep 17 00:00:00 2001 From: lzianekhodja Date: Fri, 21 Jul 2023 16:46:03 +0200 Subject: [PATCH 06/11] reformat --- .../localhost/all-in-one/parameters.tfvars | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars b/infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars index 1bf231d64..79ef3a274 100644 --- a/infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars +++ b/infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars @@ -85,7 +85,7 @@ compute_plane = { # Default partition that uses the C# extension for the worker default = { # number of replicas for each deployment of compute plane - replicas = 0 + replicas = 0 # ArmoniK polling agent polling_agent = { limits = { @@ -100,7 +100,7 @@ compute_plane = { # ArmoniK workers worker = [ { - image = "dockerhubaneo/armonik_worker_dll" + image = "dockerhubaneo/armonik_worker_dll" limits = { cpu = "1000m" memory = "1024Mi" @@ -117,7 +117,7 @@ compute_plane = { cooldown_period = 300 min_replica_count = 0 max_replica_count = 5 - behavior = { + behavior = { restore_to_original_replica_count = true stabilization_window_seconds = 300 type = "Percent" @@ -135,7 +135,7 @@ compute_plane = { # Partition for the stream worker stream = { # number of replicas for each deployment of compute plane - replicas = 0 + replicas = 0 # ArmoniK polling agent polling_agent = { limits = { @@ -150,7 +150,7 @@ compute_plane = { # ArmoniK workers worker = [ { - image = "dockerhubaneo/armonik_core_stream_test_worker" + image = "dockerhubaneo/armonik_core_stream_test_worker" limits = { cpu = "1000m" memory = "1024Mi" @@ -167,7 +167,7 @@ compute_plane = { cooldown_period = 300 min_replica_count = 0 max_replica_count = 5 - behavior = { + behavior = { restore_to_original_replica_count = true stabilization_window_seconds = 300 type = "Percent" @@ -185,7 +185,7 @@ compute_plane = { # Partition for the htcmock worker htcmock = { # number of replicas for each deployment of compute plane - replicas = 0 + replicas = 0 # ArmoniK polling agent polling_agent = { limits = { @@ -200,7 +200,7 @@ compute_plane = { # ArmoniK workers worker = [ { - image = "dockerhubaneo/armonik_core_htcmock_test_worker" + image = "dockerhubaneo/armonik_core_htcmock_test_worker" limits = { cpu = "1000m" memory = "1024Mi" @@ -217,7 +217,7 @@ compute_plane = { cooldown_period = 300 min_replica_count = 0 max_replica_count = 5 - behavior = { + behavior = { restore_to_original_replica_count = true stabilization_window_seconds = 300 type = "Percent" @@ -235,7 +235,7 @@ compute_plane = { # Partition for the bench worker bench = { # number of replicas for each deployment of compute plane - replicas = 0 + replicas = 0 # ArmoniK polling agent polling_agent = { limits = { @@ -250,7 +250,7 @@ compute_plane = { # ArmoniK workers worker = [ { - image = "dockerhubaneo/armonik_core_bench_test_worker" + image = "dockerhubaneo/armonik_core_bench_test_worker" limits = { cpu = "1000m" memory = "1024Mi" @@ -267,7 +267,7 @@ compute_plane = { cooldown_period = 300 min_replica_count = 0 max_replica_count = 5 - behavior = { + behavior = { restore_to_original_replica_count = true stabilization_window_seconds = 300 type = "Percent" From 566b37397ab24166cb4533095ff06d432196ac9d Mon Sep 17 00:00:00 2001 From: lzianekhodja Date: Fri, 21 Jul 2023 18:43:24 +0200 Subject: [PATCH 07/11] delete external data to get k8s context --- .../quick-deploy/localhost/all-in-one/providers.tf | 10 ++-------- .../localhost/multi-stages/armonik/providers.tf | 10 ++-------- .../localhost/multi-stages/keda/providers.tf | 10 ++-------- .../localhost/multi-stages/metrics-server/providers.tf | 10 ++-------- .../localhost/multi-stages/monitoring/providers.tf | 10 ++-------- .../localhost/multi-stages/storage/providers.tf | 8 +------- .../multi-stages => utils}/scripts/k8s_config.sh | 0 7 files changed, 11 insertions(+), 47 deletions(-) rename infrastructure/{quick-deploy/localhost/multi-stages => utils}/scripts/k8s_config.sh (100%) diff --git a/infrastructure/quick-deploy/localhost/all-in-one/providers.tf b/infrastructure/quick-deploy/localhost/all-in-one/providers.tf index 27aa8239b..19329fcf3 100644 --- a/infrastructure/quick-deploy/localhost/all-in-one/providers.tf +++ b/infrastructure/quick-deploy/localhost/all-in-one/providers.tf @@ -1,12 +1,6 @@ -# K8s configuration -data "external" "k8s_config_context" { - program = ["bash", "k8s_config.sh", var.k8s_config_path] - working_dir = ".${path.root}/../../utils/scripts" -} - provider "kubernetes" { config_path = var.k8s_config_path - config_context = lookup(tomap(data.external.k8s_config_context.result), "k8s_config_context", var.k8s_config_context) + config_context = var.k8s_config_context } # package manager for kubernetes @@ -14,6 +8,6 @@ provider "helm" { helm_driver = "configmap" kubernetes { config_path = var.k8s_config_path - config_context = lookup(tomap(data.external.k8s_config_context.result), "k8s_config_context", var.k8s_config_context) + config_context = var.k8s_config_context } } diff --git a/infrastructure/quick-deploy/localhost/multi-stages/armonik/providers.tf b/infrastructure/quick-deploy/localhost/multi-stages/armonik/providers.tf index 7fc3f5964..19329fcf3 100644 --- a/infrastructure/quick-deploy/localhost/multi-stages/armonik/providers.tf +++ b/infrastructure/quick-deploy/localhost/multi-stages/armonik/providers.tf @@ -1,12 +1,6 @@ -# K8s configuration -data "external" "k8s_config_context" { - program = ["bash", "k8s_config.sh", var.k8s_config_path] - working_dir = ".${path.root}/scripts" -} - provider "kubernetes" { config_path = var.k8s_config_path - config_context = lookup(tomap(data.external.k8s_config_context.result), "k8s_config_context", var.k8s_config_context) + config_context = var.k8s_config_context } # package manager for kubernetes @@ -14,6 +8,6 @@ provider "helm" { helm_driver = "configmap" kubernetes { config_path = var.k8s_config_path - config_context = lookup(tomap(data.external.k8s_config_context.result), "k8s_config_context", var.k8s_config_context) + config_context = var.k8s_config_context } } diff --git a/infrastructure/quick-deploy/localhost/multi-stages/keda/providers.tf b/infrastructure/quick-deploy/localhost/multi-stages/keda/providers.tf index e5fb4796d..1fe752fa8 100644 --- a/infrastructure/quick-deploy/localhost/multi-stages/keda/providers.tf +++ b/infrastructure/quick-deploy/localhost/multi-stages/keda/providers.tf @@ -1,12 +1,6 @@ -# K8s configuration -data "external" "k8s_config_context" { - program = ["bash", "k8s_config.sh", var.k8s_config_path] - working_dir = ".${path.root}/scripts" -} - provider "kubernetes" { config_path = var.k8s_config_path - config_context = lookup(tomap(data.external.k8s_config_context.result), "k8s_config_context", var.k8s_config_context) + config_context = var.k8s_config_context } # package manager for kubernetes @@ -14,6 +8,6 @@ provider "helm" { helm_driver = "configmap" kubernetes { config_path = var.k8s_config_path - config_context = lookup(tomap(data.external.k8s_config_context.result), "k8s_config_context", var.k8s_config_context) + config_context = var.k8s_config_context } } \ No newline at end of file diff --git a/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/providers.tf b/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/providers.tf index e5fb4796d..1fe752fa8 100644 --- a/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/providers.tf +++ b/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/providers.tf @@ -1,12 +1,6 @@ -# K8s configuration -data "external" "k8s_config_context" { - program = ["bash", "k8s_config.sh", var.k8s_config_path] - working_dir = ".${path.root}/scripts" -} - provider "kubernetes" { config_path = var.k8s_config_path - config_context = lookup(tomap(data.external.k8s_config_context.result), "k8s_config_context", var.k8s_config_context) + config_context = var.k8s_config_context } # package manager for kubernetes @@ -14,6 +8,6 @@ provider "helm" { helm_driver = "configmap" kubernetes { config_path = var.k8s_config_path - config_context = lookup(tomap(data.external.k8s_config_context.result), "k8s_config_context", var.k8s_config_context) + config_context = var.k8s_config_context } } \ No newline at end of file diff --git a/infrastructure/quick-deploy/localhost/multi-stages/monitoring/providers.tf b/infrastructure/quick-deploy/localhost/multi-stages/monitoring/providers.tf index e5fb4796d..1fe752fa8 100644 --- a/infrastructure/quick-deploy/localhost/multi-stages/monitoring/providers.tf +++ b/infrastructure/quick-deploy/localhost/multi-stages/monitoring/providers.tf @@ -1,12 +1,6 @@ -# K8s configuration -data "external" "k8s_config_context" { - program = ["bash", "k8s_config.sh", var.k8s_config_path] - working_dir = ".${path.root}/scripts" -} - provider "kubernetes" { config_path = var.k8s_config_path - config_context = lookup(tomap(data.external.k8s_config_context.result), "k8s_config_context", var.k8s_config_context) + config_context = var.k8s_config_context } # package manager for kubernetes @@ -14,6 +8,6 @@ provider "helm" { helm_driver = "configmap" kubernetes { config_path = var.k8s_config_path - config_context = lookup(tomap(data.external.k8s_config_context.result), "k8s_config_context", var.k8s_config_context) + config_context = var.k8s_config_context } } \ No newline at end of file diff --git a/infrastructure/quick-deploy/localhost/multi-stages/storage/providers.tf b/infrastructure/quick-deploy/localhost/multi-stages/storage/providers.tf index d0a40e2a5..be42449b2 100644 --- a/infrastructure/quick-deploy/localhost/multi-stages/storage/providers.tf +++ b/infrastructure/quick-deploy/localhost/multi-stages/storage/providers.tf @@ -1,10 +1,4 @@ -# K8s configuration -data "external" "k8s_config_context" { - program = ["bash", "k8s_config.sh", var.k8s_config_path] - working_dir = ".${path.root}/scripts" -} - provider "kubernetes" { config_path = var.k8s_config_path - config_context = lookup(tomap(data.external.k8s_config_context.result), "k8s_config_context", var.k8s_config_context) + config_context = var.k8s_config_context } \ No newline at end of file diff --git a/infrastructure/quick-deploy/localhost/multi-stages/scripts/k8s_config.sh b/infrastructure/utils/scripts/k8s_config.sh similarity index 100% rename from infrastructure/quick-deploy/localhost/multi-stages/scripts/k8s_config.sh rename to infrastructure/utils/scripts/k8s_config.sh From 9b57cc77301d89d958fe5ed77e89cfa6ff80092b Mon Sep 17 00:00:00 2001 From: lzianekhodja Date: Mon, 24 Jul 2023 09:22:06 +0200 Subject: [PATCH 08/11] Fix parameters of localhost all-in-one --- .../localhost/all-in-one/parameters.tfvars | 39 +------------------ 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars b/infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars index 79ef3a274..d338b2573 100644 --- a/infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars +++ b/infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars @@ -6,7 +6,7 @@ logging_level = "Information" # Object storage # Uncomment either the `redis` or the `minio` parameter -#redis = {} +redis = {} #minio = {} # Uncomment this to have minio S3 enabled instead of hostpath shared_storage @@ -312,40 +312,3 @@ extra_conf = { Submitter__MaxErrorAllowed = 50 } } - -activemq = { - image_name = "dockerhubaneo/activemq" - image_tag = "5.18.2" -} - -mongodb = { - image_name = "dockerhubaneo/mongodb" - image_tag = "6.0.7" -} - -node_exporter = { - image_name = "dockerhubaneo/nodeexporter" - image_tag = "1.6.0" -} - -prometheus = { - image_name = "dockerhubaneo/prometheus" - image_tag = "2.45.0" -} - -grafana = { - image_name = "dockerhubaneo/grafana" - image_tag = "10.0.2" -} - -redis = { - image_name = "dockerhubaneo/redis" - image_tag = "7.0.12" -} - -seq = { - image_name = "dockerhubaneo/seq" - image_tag = "2023.3" - cli_image_name = "dockerhubaneo/seqcli" - cli_image_tag = "2023.2" -} \ No newline at end of file From b4db265439b50efd771a408f8b69d5df9761aad1 Mon Sep 17 00:00:00 2001 From: lzianekhodja Date: Wed, 9 Aug 2023 09:19:47 +0200 Subject: [PATCH 09/11] use terraform plugin cache and update changelog --- CHANGELOG.md | 1 + armonik-versions.txt | 2 +- .../quick-deploy/localhost/all-in-one/Makefile | 2 ++ .../quick-deploy/localhost/multi-stages/Makefile | 11 +++++++++++ .../localhost/multi-stages/armonik/Makefile | 2 ++ .../quick-deploy/localhost/multi-stages/keda/Makefile | 2 ++ .../localhost/multi-stages/metrics-server/Makefile | 2 ++ .../localhost/multi-stages/monitoring/Makefile | 2 ++ .../localhost/multi-stages/storage/Makefile | 2 ++ versions.tfvars.json | 2 +- 10 files changed, 26 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8d1b6148..33f9239af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ Changed * Upgrade version of SeqCli from `2023.1` to `2023.2` * Upgrade version of Admin GUI from `0.9.1` to `0.9.2`. * Upgrade version of MinIO from `RELEASE.2023-02-10T18-48-39Z` to `RELEASE.2023-07-18T17-49-40Z`. +* Upgrade version of infrastructure from `0.0.2` to `1.0.0`. ## [v2.14.0](https://github.com/aneoconsulting/armonik/tree/v2.14.0) (2023-07-05) diff --git a/armonik-versions.txt b/armonik-versions.txt index 8e5996d4a..fcdf246be 100644 --- a/armonik-versions.txt +++ b/armonik-versions.txt @@ -1,4 +1,4 @@ -infra=0.0.2 +infra=1.0.0 core=0.14.3 worker=0.12.1 admin-gui=0.9.2 diff --git a/infrastructure/quick-deploy/localhost/all-in-one/Makefile b/infrastructure/quick-deploy/localhost/all-in-one/Makefile index c5878cfc3..9e58a9466 100644 --- a/infrastructure/quick-deploy/localhost/all-in-one/Makefile +++ b/infrastructure/quick-deploy/localhost/all-in-one/Makefile @@ -11,6 +11,7 @@ MODULES_VERSION=$(shell cat $(VERSIONS_FILE) | jq -r '.armonik_versions.infra') export KUBE_CONFIG_PATH?=$(HOME)/.kube/config export TF_DATA_DIR?=$(GENERATED_DIR) +export TF_PLUGIN_CACHE_DIR?=$(GENERATED_DIR)/terraform-plugins export NAMESPACE?=armonik export PREFIX?=armonik-local export TF_VAR_namespace?=$(NAMESPACE) @@ -26,6 +27,7 @@ env: @set init: + mkdir -p $(TF_PLUGIN_CACHE_DIR) mkdir -p $(GENERATED_DIR) terraform init -upgrade -reconfigure -backend-config="secret_suffix=$(PREFIX)" -var-file=$(VERSIONS_FILE) -var-file=$(PARAMETERS_FILE) -var-file=$(EXTRA_PARAMETERS_FILE) diff --git a/infrastructure/quick-deploy/localhost/multi-stages/Makefile b/infrastructure/quick-deploy/localhost/multi-stages/Makefile index 5fa515f89..15fb80d98 100644 --- a/infrastructure/quick-deploy/localhost/multi-stages/Makefile +++ b/infrastructure/quick-deploy/localhost/multi-stages/Makefile @@ -10,6 +10,7 @@ export METRICS_SERVER=$(shell kubectl get deploy -A -l k8s-app=metrics-server -- CURRENT_DIR=$(shell pwd) GENERATED_DIR=$(CURRENT_DIR)/generated MODULES_DIR=$(GENERATED_DIR)/infra-modules +TERRAFORM_PLUGINS?=$(GENERATED_DIR)/terraform-plugins VERSIONS_FILE?=$(shell realpath ../../../../versions.tfvars.json) #################################### @@ -35,6 +36,7 @@ deploy-keda: $(MAKE) -C $(CURRENT_DIR)/keda deploy \ NAMESPACE=$(KEDA_KUBERNETES_NAMESPACE) \ MODULES_DIR=$(MODULES_DIR) \ + TERRAFORM_PLUGINS=$(TERRAFORM_PLUGINS) \ VERSIONS_FILE=$(VERSIONS_FILE);\ fi @@ -42,6 +44,7 @@ destroy-keda: $(MAKE) -C $(CURRENT_DIR)/keda destroy \ NAMESPACE=$(KEDA_KUBERNETES_NAMESPACE) \ MODULES_DIR=$(MODULES_DIR) \ + TERRAFORM_PLUGINS=$(TERRAFORM_PLUGINS) \ VERSIONS_FILE=$(VERSIONS_FILE) clean-keda: @@ -56,6 +59,7 @@ deploy-metrics-server: $(MAKE) -C $(CURRENT_DIR)/metrics-server deploy \ NAMESPACE=$(METRICS_SERVER_KUBERNETES_NAMESPACE) \ MODULES_DIR=$(MODULES_DIR) \ + TERRAFORM_PLUGINS=$(TERRAFORM_PLUGINS) \ VERSIONS_FILE=$(VERSIONS_FILE);\ fi @@ -63,6 +67,7 @@ destroy-metrics-server: $(MAKE) -C $(CURRENT_DIR)/metrics-server destroy \ NAMESPACE=$(METRICS_SERVER_KUBERNETES_NAMESPACE) \ MODULES_DIR=$(MODULES_DIR) \ + TERRAFORM_PLUGINS=$(TERRAFORM_PLUGINS) \ VERSIONS_FILE=$(VERSIONS_FILE) clean-metrics-server: @@ -79,6 +84,7 @@ deploy-storage: FILE_STORAGE_FILE=$(ARMONIK_FILE_STORAGE_FILE) \ FILE_SERVER_IP=$(ARMONIK_FILE_SERVER_IP) \ MODULES_DIR=$(MODULES_DIR) \ + TERRAFORM_PLUGINS=$(TERRAFORM_PLUGINS) \ VERSIONS_FILE=$(VERSIONS_FILE) destroy-storage: @@ -88,6 +94,7 @@ destroy-storage: FILE_STORAGE_FILE=$(ARMONIK_FILE_STORAGE_FILE) \ FILE_SERVER_IP=$(ARMONIK_FILE_SERVER_IP) \ MODULES_DIR=$(MODULES_DIR) \ + TERRAFORM_PLUGINS=$(TERRAFORM_PLUGINS) \ VERSIONS_FILE=$(VERSIONS_FILE) clean-storage: @@ -101,12 +108,14 @@ deploy-monitoring: $(MAKE) -C $(CURRENT_DIR)/monitoring deploy \ NAMESPACE=$(ARMONIK_KUBERNETES_NAMESPACE) \ MODULES_DIR=$(MODULES_DIR) \ + TERRAFORM_PLUGINS=$(TERRAFORM_PLUGINS) \ VERSIONS_FILE=$(VERSIONS_FILE) destroy-monitoring: $(MAKE) -C $(CURRENT_DIR)/monitoring destroy \ NAMESPACE=$(ARMONIK_KUBERNETES_NAMESPACE) \ MODULES_DIR=$(MODULES_DIR) \ + TERRAFORM_PLUGINS=$(TERRAFORM_PLUGINS) \ VERSIONS_FILE=$(VERSIONS_FILE) clean-monitoring: @@ -120,12 +129,14 @@ deploy-armonik: $(MAKE) -C $(CURRENT_DIR)/armonik deploy \ NAMESPACE=$(ARMONIK_KUBERNETES_NAMESPACE) \ MODULES_DIR=$(MODULES_DIR) \ + TERRAFORM_PLUGINS=$(TERRAFORM_PLUGINS) \ VERSIONS_FILE=$(VERSIONS_FILE) destroy-armonik: $(MAKE) -C $(CURRENT_DIR)/armonik destroy \ NAMESPACE=$(ARMONIK_KUBERNETES_NAMESPACE) \ MODULES_DIR=$(MODULES_DIR) \ + TERRAFORM_PLUGINS=$(TERRAFORM_PLUGINS) \ VERSIONS_FILE=$(VERSIONS_FILE) clean-armonik: diff --git a/infrastructure/quick-deploy/localhost/multi-stages/armonik/Makefile b/infrastructure/quick-deploy/localhost/multi-stages/armonik/Makefile index 0d5741e58..06c017808 100644 --- a/infrastructure/quick-deploy/localhost/multi-stages/armonik/Makefile +++ b/infrastructure/quick-deploy/localhost/multi-stages/armonik/Makefile @@ -10,6 +10,7 @@ MODULES_VERSION=$(shell cat $(VERSIONS_FILE) | jq -r '.armonik_versions.infra') export KUBE_CONFIG_PATH?=$(HOME)/.kube/config export TF_DATA_DIR?=$(GENERATED_DIR) +export TF_PLUGIN_CACHE_DIR?=$(TERRAFORM_PLUGINS) export NAMESPACE?=armonik .PHONY: apply destroy @@ -19,6 +20,7 @@ deploy: get-modules init apply output destroy: init delete init: + mkdir -p $(TF_PLUGIN_CACHE_DIR) mkdir -p $(GENERATED_DIR) terraform init -upgrade -reconfigure \ -backend-config="secret_suffix=armonik-$(BACKEND_SUFFIX)" \ diff --git a/infrastructure/quick-deploy/localhost/multi-stages/keda/Makefile b/infrastructure/quick-deploy/localhost/multi-stages/keda/Makefile index 658a40168..964ea0e9d 100644 --- a/infrastructure/quick-deploy/localhost/multi-stages/keda/Makefile +++ b/infrastructure/quick-deploy/localhost/multi-stages/keda/Makefile @@ -10,6 +10,7 @@ MODULES_VERSION=$(shell cat $(VERSIONS_FILE) | jq -r '.armonik_versions.infra') export KUBE_CONFIG_PATH?=$(HOME)/.kube/config export TF_DATA_DIR?=$(GENERATED_DIR) +export TF_PLUGIN_CACHE_DIR?=$(TERRAFORM_PLUGINS) export NAMESPACE?=default .PHONY: apply destroy @@ -19,6 +20,7 @@ deploy: get-modules init apply output destroy: init delete init: + mkdir -p $(TF_PLUGIN_CACHE_DIR) mkdir -p $(GENERATED_DIR) terraform init -upgrade -reconfigure \ -backend-config="secret_suffix=keda-$(BACKEND_SUFFIX)" \ diff --git a/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/Makefile b/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/Makefile index d434c1b9e..363e32958 100644 --- a/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/Makefile +++ b/infrastructure/quick-deploy/localhost/multi-stages/metrics-server/Makefile @@ -10,6 +10,7 @@ MODULES_VERSION=$(shell cat $(VERSIONS_FILE) | jq -r '.armonik_versions.infra') export KUBE_CONFIG_PATH?=$(HOME)/.kube/config export TF_DATA_DIR?=$(GENERATED_DIR) +export TF_PLUGIN_CACHE_DIR?=$(TERRAFORM_PLUGINS) export NAMESPACE?=kube-system .PHONY: apply destroy @@ -19,6 +20,7 @@ deploy: get-modules init apply output destroy: init delete init: + mkdir -p $(TF_PLUGIN_CACHE_DIR) mkdir -p $(GENERATED_DIR) terraform init -upgrade -reconfigure \ -backend-config="secret_suffix=metrics-server-$(BACKEND_SUFFIX)" \ diff --git a/infrastructure/quick-deploy/localhost/multi-stages/monitoring/Makefile b/infrastructure/quick-deploy/localhost/multi-stages/monitoring/Makefile index 847126b97..2550fea9a 100644 --- a/infrastructure/quick-deploy/localhost/multi-stages/monitoring/Makefile +++ b/infrastructure/quick-deploy/localhost/multi-stages/monitoring/Makefile @@ -10,6 +10,7 @@ MODULES_VERSION=$(shell cat $(VERSIONS_FILE) | jq -r '.armonik_versions.infra') export KUBE_CONFIG_PATH?=$(HOME)/.kube/config export TF_DATA_DIR?=$(GENERATED_DIR) +export TF_PLUGIN_CACHE_DIR?=$(TERRAFORM_PLUGINS) export NAMESPACE?=armonik .PHONY: apply destroy @@ -19,6 +20,7 @@ deploy: get-modules init apply output destroy: init delete init: + mkdir -p $(TF_PLUGIN_CACHE_DIR) mkdir -p $(GENERATED_DIR) terraform init -upgrade -reconfigure \ -backend-config="secret_suffix=monitoring-$(BACKEND_SUFFIX)" \ diff --git a/infrastructure/quick-deploy/localhost/multi-stages/storage/Makefile b/infrastructure/quick-deploy/localhost/multi-stages/storage/Makefile index 0d0240779..d30e8036c 100644 --- a/infrastructure/quick-deploy/localhost/multi-stages/storage/Makefile +++ b/infrastructure/quick-deploy/localhost/multi-stages/storage/Makefile @@ -10,6 +10,7 @@ MODULES_VERSION=$(shell cat $(VERSIONS_FILE) | jq -r '.armonik_versions.infra') export KUBE_CONFIG_PATH?=$(HOME)/.kube/config export TF_DATA_DIR?=$(GENERATED_DIR) +export TF_PLUGIN_CACHE_DIR?=$(TERRAFORM_PLUGINS) export NAMESPACE?=armonik export SHARED_HOST_PATH?=$(HOME)/data export FILE_STORAGE_FILE?=HostPath @@ -22,6 +23,7 @@ deploy: get-modules init apply output destroy: init delete init: + mkdir -p $(TF_PLUGIN_CACHE_DIR) mkdir -p $(GENERATED_DIR) terraform init -upgrade -reconfigure \ -backend-config="secret_suffix=storage-$(BACKEND_SUFFIX)" \ diff --git a/versions.tfvars.json b/versions.tfvars.json index 7f81999d6..2666add59 100644 --- a/versions.tfvars.json +++ b/versions.tfvars.json @@ -1,7 +1,7 @@ { "armonik_versions": { "armonik": "2.14.0", - "infra": "main", + "infra": "1.0.0", "core": "0.14.3", "api": "3.10.0", "gui": "0.9.2", From 8776b29145e11b47cb326a651d8ed300da6c7264 Mon Sep 17 00:00:00 2001 From: lzianekhodja Date: Wed, 9 Aug 2023 09:58:32 +0200 Subject: [PATCH 10/11] update pipeline deploy.yml --- .github/workflows/deploy.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 802b596e4..837153080 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -77,7 +77,7 @@ jobs: if [ -e infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json ] ; then cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json logs/infra/generated fi - cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-terraform.tfstate logs/infra/tfstates + make -C infrastructure/quick-deploy/localhost/all-in-one/ state-pull > logs/infra/tfstates/armonik-terraform.tfstate sudo cp -rL /var/log/pods/armonik_* logs/app sudo chown $USER -R logs tar -czf admin-gui.tar.gz logs @@ -89,7 +89,7 @@ jobs: - name: Destroy deployment uses: aneoconsulting/ArmoniK.Action.Deploy/destroy@main with: - type: localhost + type: localhost coreStream: runs-on: ubuntu-latest @@ -141,7 +141,7 @@ jobs: if [ -e infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json ] ; then cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json core-stream/infra/generated fi - cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-terraform.tfstate core-stream/infra/tfstates + make -C infrastructure/quick-deploy/localhost/all-in-one/ state-pull > core-stream/infra/tfstates/armonik-terraform.tfstate sudo cp -rL /var/log/pods/armonik_* core-stream/app sudo chown $USER -R core-stream tar -czf core-stream.tar.gz core-stream @@ -180,7 +180,7 @@ jobs: docker: true terraform: true k3s: true - aws: true + aws: true - name: Deploy uses: aneoconsulting/ArmoniK.Action.Deploy/deploy@main with: @@ -201,7 +201,7 @@ jobs: -e HtcMock__EnableSmallOutput=false \ -e HtcMock__EnableFastCompute=false \ -e HtcMock__Partition="htcmock" \ - dockerhubaneo/armonik_core_htcmock_test_client:${{ steps.core.outputs.tag }} + dockerhubaneo/armonik_core_htcmock_test_client:${{ steps.core.outputs.tag }} - name: Test HTC Mock - 1 level shell: bash run: | @@ -264,7 +264,7 @@ jobs: if [ -e infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json ] ; then cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json htcmock/infra/generated fi - cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-terraform.tfstate htcmock/infra/tfstates + make -C infrastructure/quick-deploy/localhost/all-in-one/ state-pull > htcmock/infra/tfstates/armonik-terraform.tfstate sudo cp -rL /var/log/pods/armonik_* htcmock/app sudo chown $USER -R htcmock tar -czf htcmock.tar.gz htcmock @@ -305,11 +305,11 @@ jobs: docker: true terraform: true k3s: true - aws: true + aws: true - name: Deploy uses: aneoconsulting/ArmoniK.Action.Deploy/deploy@main with: - type: localhost + type: localhost - name: Test Bench - many tasks (200) shell: bash run: | @@ -369,7 +369,7 @@ jobs: if [ -e infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json ] ; then cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json bench/infra/generated fi - cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-terraform.tfstate bench/infra/tfstates + make -C infrastructure/quick-deploy/localhost/all-in-one/ state-pull > bench/infra/tfstates/armonik-terraform.tfstate sudo cp -rL /var/log/pods/armonik_* bench/app sudo chown $USER -R bench tar -czf bench.tar.gz bench From 1f8be7e7176fecbf6b049f7318dc3c7ef67ee06c Mon Sep 17 00:00:00 2001 From: lzianekhodja Date: Wed, 9 Aug 2023 11:15:14 +0200 Subject: [PATCH 11/11] Add backend kubernetes for all-in-one localhost --- infrastructure/quick-deploy/localhost/all-in-one/backend.tf | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 infrastructure/quick-deploy/localhost/all-in-one/backend.tf diff --git a/infrastructure/quick-deploy/localhost/all-in-one/backend.tf b/infrastructure/quick-deploy/localhost/all-in-one/backend.tf new file mode 100644 index 000000000..8a0f42083 --- /dev/null +++ b/infrastructure/quick-deploy/localhost/all-in-one/backend.tf @@ -0,0 +1,4 @@ +terraform { + backend "kubernetes" { + } +}