Skip to content

Commit 242276c

Browse files
committed
update ecmwf to new nwp-consumer
1 parent 2b68542 commit 242276c

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

terraform/nowcasting/production/main.tf

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ module "nwp-metoffice" {
191191

192192
# 3.3
193193
module "nwp-ecmwf" {
194-
source = "github.com/openclimatefix/ocf-infrastructure//terraform/modules/services/ecs_task?ref=26e3b29"
194+
source = "github.com/openclimatefix/ocf-infrastructure//terraform/modules/services/ecs_task?ref=2b68542"
195195

196196
ecs-task_name = "nwp-consumer-ecmwf-uk"
197197
ecs-task_type = "consumer"
@@ -209,26 +209,31 @@ module "nwp-ecmwf" {
209209
]
210210

211211
container-env_vars = [
212+
{ "name" : "MODEL_REPOSITORY", "value" : "ecmwf-realtime" },
212213
{ "name" : "AWS_REGION", "value" : "eu-west-1" },
213-
{ "name" : "AWS_S3_BUCKET", "value" : module.s3.s3-nwp-bucket.id },
214+
{ "name" : "ECMWF_REALTIME_S3_REGION", "value": "eu-west-1" },
215+
{ "name" : "ECMWF_REALTIME_S3_BUCKET", "value" : "ocf-ecmwf-production" },
216+
{ "name" : "ZARRDIR", "value" : "s3://${module.s3.s3-nwp-bucket.id}/ecmwf/data" },
214217
{ "name" : "LOGLEVEL", "value" : "DEBUG" },
218+
{ "name" : "SENTRY_DSN", "value" : var.sentry_dsn },
219+
{ "name" : "CONCURRENCY", "value" : "false" },
220+
# legacy ones
221+
{ "name" : "AWS_S3_BUCKET", "value" : module.s3.s3-nwp-bucket.id },
215222
{ "name" : "ECMWF_AWS_REGION", "value": "eu-west-1" },
216223
{ "name" : "ECMWF_AWS_S3_BUCKET", "value" : "ocf-ecmwf-production" },
217224
{ "name" : "ECMWF_AREA", "value" : "uk" },
218-
{ "name" : "SENTRY_DSN", "value" : var.sentry_dsn },
219225
{ "name" : "ENVIRONMENT", "value" : local.environment },
226+
{ "name" : "SENTRY_DSN", "value" : var.sentry_dsn },
227+
{ "name" : "LOGLEVEL", "value" : "DEBUG" }
220228
]
221-
container-secret_vars = ["ECMWF_AWS_ACCESS_KEY", "ECMWF_AWS_ACCESS_SECRET"]
222-
container-tag = var.nwp_version
223-
container-name = "openclimatefix/nwp-consumer"
224-
container-command = [
225-
"download",
226-
"--source=ecmwf-s3",
227-
"--sink=s3",
228-
"--rdir=ecmwf/raw",
229-
"--zdir=ecmwf/data",
230-
"--create-latest"
229+
230+
container-secret_vars = [
231+
{secret_policy_arn: aws_secretsmanager_secret.nwp_consumer_secret.arn,
232+
values: ["ECMWF_REALTIME_S3_ACCESS_KEY", "ECMWF_REALTIME_S3_ACCESS_SECRET"]}
231233
]
234+
container-tag = var.nwp_ecmwf_version
235+
container-name = "openclimatefix/nwp-consumer"
236+
container-command = ["consume"]
232237
}
233238

234239

@@ -681,7 +686,7 @@ module "forecast_blend" {
681686

682687
# 5.2
683688
module "airflow" {
684-
source = "github.com/openclimatefix/ocf-infrastructure//terraform/modules/services/airflow?ref=4d6eadd"
689+
source = "github.com/openclimatefix/ocf-infrastructure//terraform/modules/services/airflow?ref=2b68542"
685690

686691
aws-environment = local.environment
687692
aws-domain = local.domain

terraform/nowcasting/production/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ variable "nwp_version" {
1818
description = "The NWP version"
1919
}
2020

21+
variable "nwp_ecmwf_version" {
22+
description = "The ECMWF NWP version"
23+
default="1.0.9"
24+
}
25+
2126
variable "sat_version" {
2227
description = "The Satellite version"
2328
}

0 commit comments

Comments
 (0)