Skip to content

Commit

Permalink
remove ecs services
Browse files Browse the repository at this point in the history
  • Loading branch information
kenoir committed Jan 16, 2025
1 parent ec089e8 commit 879741f
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 269 deletions.
2 changes: 1 addition & 1 deletion pipeline/terraform/2024-11-18/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module "pipeline" {
source = "../modules/stack"

reindexing_state = {
listen_to_reindexer = true
listen_to_reindexer = false
scale_up_tasks = false
scale_up_elastic_cluster = false
scale_up_id_minter_db = false
Expand Down
8 changes: 0 additions & 8 deletions pipeline/terraform/modules/pipeline_indices/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ module "denormalised_index" {
allow_delete = var.allow_delete
}

module "lambda_denormalised_index" {
source = "../es_index"
name = var.es_lambda_works_denormalised_index
mappings_name = "empty"
config_path = var.es_config_path
allow_delete = var.allow_delete
}

module "images_initial_index" {
source = "../es_index"
name = var.es_images_initial_index
Expand Down
2 changes: 0 additions & 2 deletions pipeline/terraform/modules/pipeline_indices/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ output "indices" {
value = {
source = module.source_index
denormalised = module.denormalised_index
lambda_denormalised = module.lambda_denormalised_index
images_initial = module.images_initial_index
images_augmented = module.images_augmented_index
images_indexed = module.images_indexed_index
Expand All @@ -16,7 +15,6 @@ output "index_names" {
value = {
source = module.source_index.name
denormalised = module.denormalised_index.name
lambda_denormalised = module.lambda_denormalised_index.name
images_initial = module.images_initial_index.name
images_augmented = module.images_augmented_index.name
images_indexed = module.images_indexed_index.name
Expand Down
4 changes: 1 addition & 3 deletions pipeline/terraform/modules/pipeline_indices/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ variable "es_works_merged_index" {
variable "es_works_identified_index" {
type = string
}

variable "es_works_denormalised_index" {
type = string
}
variable "es_lambda_works_denormalised_index" {
type = string
}
variable "es_works_index" {
type = string
}
Expand Down
15 changes: 7 additions & 8 deletions pipeline/terraform/modules/stack/elastic_pipeline.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,11 @@ module "pipeline_indices" {

allow_delete = var.allow_delete_indices

es_works_source_index = local.es_works_source_index
es_works_merged_index = local.es_works_merged_index
es_works_identified_index = local.es_works_identified_index
es_works_denormalised_index = local.es_works_denormalised_index
es_lambda_works_denormalised_index = local.es_lambda_works_denormalised_index
es_works_index = local.es_works_index
es_works_source_index = local.es_works_source_index
es_works_merged_index = local.es_works_merged_index
es_works_identified_index = local.es_works_identified_index
es_works_denormalised_index = local.es_works_denormalised_index
es_works_index = local.es_works_index

es_images_initial_index = local.es_images_initial_index
es_images_augmented_index = local.es_images_augmented_index
Expand Down Expand Up @@ -155,15 +154,15 @@ locals {
}
router = {
read = [local.indices.works_merged]
write = [local.indices.denormalised, local.indices.lambda_denormalised]
write = [local.indices.denormalised]
}
path_concatenator = {
read = [local.indices.works_merged]
write = [local.indices.works_merged]
}
relation_embedder = {
read = [local.indices.works_merged]
write = [local.indices.denormalised, local.indices.lambda_denormalised]
write = [local.indices.denormalised]
}
work_ingestor = {
read = [local.indices.denormalised]
Expand Down
13 changes: 5 additions & 8 deletions pipeline/terraform/modules/stack/locals.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
locals {
namespace = "catalogue-${var.pipeline_date}"

es_works_source_index = "works-source-${var.pipeline_date}"
es_works_merged_index = "works-merged-${var.pipeline_date}"
es_works_identified_index = "works-identified-${var.pipeline_date}"
es_works_denormalised_index = "works-denormalised-${var.pipeline_date}"
es_lambda_works_denormalised_index = "works-denormalised-lambda-${var.pipeline_date}"
es_works_index = "works-indexed-${var.pipeline_date}"
es_works_source_index = "works-source-${var.pipeline_date}"
es_works_merged_index = "works-merged-${var.pipeline_date}"
es_works_identified_index = "works-identified-${var.pipeline_date}"
es_works_denormalised_index = "works-denormalised-${var.pipeline_date}"
es_works_index = "works-indexed-${var.pipeline_date}"

es_images_initial_index = "images-initial-${var.pipeline_date}"
es_images_augmented_index = "images-augmented-${var.pipeline_date}"
Expand All @@ -17,8 +16,6 @@ locals {

# The max number of connections allowed by the instance.
# specified at /infrastructure/critical/rds_id_minter.tf
base_rds_instances = 1
id_minter_rds_max_connections = local.base_rds_instances * 45
id_minter_task_max_connections = min(9, local.max_capacity)

# We don't want to overload our databases if we're not reindexing
Expand Down
7 changes: 7 additions & 0 deletions pipeline/terraform/modules/stack/relation_embedder/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
output "router_work_output_topic_arn" {
value = module.router_work_output_topic.arn
}

output "relation_embedder_output_topic_arn" {
value = module.embedder_lambda_output_topic.arn
}
4 changes: 2 additions & 2 deletions pipeline/terraform/modules/stack/service_ingestor_works.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ module "ingestor_works" {
container_image = local.ingestor_works_image

topic_arns = [
module.router_work_output_topic.arn,
module.relation_embedder_output_topic.arn,
module.relation_embedder_sub.router_work_output_topic_arn,
module.relation_embedder_sub.relation_embedder_output_topic_arn
]

# The ingestor_works_flush_interval_seconds will wait for up to ingestor_works_flush_interval_seconds
Expand Down
76 changes: 0 additions & 76 deletions pipeline/terraform/modules/stack/service_work_batcher.tf

This file was deleted.

36 changes: 0 additions & 36 deletions pipeline/terraform/modules/stack/service_work_path_concatenator.tf

This file was deleted.

51 changes: 0 additions & 51 deletions pipeline/terraform/modules/stack/service_work_relation_embedder.tf

This file was deleted.

59 changes: 0 additions & 59 deletions pipeline/terraform/modules/stack/service_work_router.tf

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module "relation_embedder_sub" {
reindexing_state = var.reindexing_state

es_works_merged_index = local.es_works_merged_index
es_works_denormalised_index = local.es_lambda_works_denormalised_index
es_works_denormalised_index = local.es_works_denormalised_index
pipeline_storage_es_service_secrets = local.pipeline_storage_es_service_secrets

# path_concatenator
Expand Down
Loading

0 comments on commit 879741f

Please sign in to comment.