Skip to content

Commit 26dc81a

Browse files
authored
Reinstate 2024-11-18 pipeline and fix deployment (#2802)
* reinstate pipeline and fix deployment * make suffixes align, add comment on parameter expansion in bash
1 parent b5505a9 commit 26dc81a

File tree

3 files changed

+43
-42
lines changed

3 files changed

+43
-42
lines changed

builds/deploy_catalogue_pipeline.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ then
9292

9393
echo "Deploying λ pipeline services to catalogue-$PIPELINE_DATE"
9494
"$ROOT/builds/deploy_lambda_services.sh" \
95-
batcher \
96-
relation_embedder
95+
batcher:r_embed_batcher \
96+
relation_embedder:r_embed_embedder
9797
fi
9898

builds/deploy_lambda_services.sh

+10-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,17 @@ set -o pipefail
77
PIPELINE_NAMESPACE="catalogue-$PIPELINE_DATE"
88
REPOSITORY_URI="760097843905.dkr.ecr.eu-west-1.amazonaws.com"
99

10-
for SERVICE_NAME in "$@"
10+
for FUNCTION_SUFFIX_IMAGE_NAME_PAIR in "$@"
1111
do
12-
IMAGE_URI="${REPOSITORY_URI}"/uk.ac.wellcome/"${SERVICE_NAME}":"env.${PIPELINE_DATE}"
13-
FUNCTION_NAME="${PIPELINE_NAMESPACE}"-"${SERVICE_NAME}"
12+
# See https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
13+
# for an explanation of the syntax used here.
14+
# %:* removes the shortest matching pattern of "colon followed by any characters"
15+
# #*: removes the shortest matching pattern of "any characters followed by a colon"
16+
IMAGE_NAME="${FUNCTION_SUFFIX_IMAGE_NAME_PAIR%:*}"
17+
FUNCTION_SUFFIX="${FUNCTION_SUFFIX_IMAGE_NAME_PAIR#*:}"
18+
19+
IMAGE_URI="${REPOSITORY_URI}"/uk.ac.wellcome/"${IMAGE_NAME}":"env.${PIPELINE_DATE}"
20+
FUNCTION_NAME="${PIPELINE_NAMESPACE}"-"${FUNCTION_SUFFIX}"
1421

1522
echo "Deploying ${IMAGE_URI} to ${FUNCTION_NAME}, @ $(date) ..."
1623

pipeline/terraform/2024-11-18/main.tf

+31-37
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,32 @@
1-
# DEACTIVATED - 2024-12-16
2-
# This pipeline has been deactivated over the winter break,
3-
# to save costs and will be reactivated in the new year.
4-
# We need to keep this folder, so that new deploys don't go
5-
# to the production environment.
1+
module "pipeline" {
2+
source = "../modules/stack"
63

7-
# module "pipeline" {
8-
# source = "../modules/stack"
9-
#
10-
# reindexing_state = {
11-
# listen_to_reindexer = false
12-
# scale_up_tasks = false
13-
# scale_up_elastic_cluster = false
14-
# scale_up_id_minter_db = false
15-
# scale_up_matcher_db = false
16-
# }
17-
#
18-
# index_config = {
19-
# works = {
20-
# identified = "works_identified.2023-05-26"
21-
# merged = "works_merged.2023-05-26"
22-
# indexed = "works_indexed.2024-11-14"
23-
# }
24-
# images = {
25-
# indexed = "images_indexed.2024-11-14"
26-
# works_analysis = "works_indexed.2024-11-06"
27-
# }
28-
# }
29-
#
30-
# allow_delete_indices = true
31-
#
32-
# pipeline_date = local.pipeline_date
33-
# release_label = local.pipeline_date
34-
#
35-
# providers = {
36-
# aws.catalogue = aws.catalogue
37-
# }
38-
# }
4+
reindexing_state = {
5+
listen_to_reindexer = true
6+
scale_up_tasks = true
7+
scale_up_elastic_cluster = true
8+
scale_up_id_minter_db = true
9+
scale_up_matcher_db = true
10+
}
11+
12+
index_config = {
13+
works = {
14+
identified = "works_identified.2023-05-26"
15+
merged = "works_merged.2023-05-26"
16+
indexed = "works_indexed.2024-11-14"
17+
}
18+
images = {
19+
indexed = "images_indexed.2024-11-14"
20+
works_analysis = "works_indexed.2024-11-06"
21+
}
22+
}
23+
24+
allow_delete_indices = false
25+
26+
pipeline_date = local.pipeline_date
27+
release_label = local.pipeline_date
28+
29+
providers = {
30+
aws.catalogue = aws.catalogue
31+
}
32+
}

0 commit comments

Comments
 (0)