Skip to content

Commit 766ed8e

Browse files
update ecmwf to new nwp-consumer (#734)
* update ecmwf to new nwp-consumer * update
1 parent 2b68542 commit 766ed8e

File tree

2 files changed

+37
-25
lines changed

2 files changed

+37
-25
lines changed

terraform/nowcasting/production/main.tf

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -191,44 +191,51 @@ 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

196-
ecs-task_name = "nwp-consumer-ecmwf-uk"
197-
ecs-task_type = "consumer"
196+
ecs-task_name = "nwp-consumer-ecmwf-uk"
197+
ecs-task_type = "consumer"
198198
ecs-task_execution_role_arn = module.ecs.ecs_task_execution_role_arn
199199

200-
aws-region = var.region
201-
aws-environment = local.environment
202-
aws-secretsmanager_secret_arn = aws_secretsmanager_secret.nwp_consumer_secret.arn
200+
ecs-task_size = {
201+
cpu = 512
202+
memory = 1024
203+
}
203204

204-
s3-buckets = [
205-
{
206-
id : module.s3.s3-nwp-bucket.id
207-
access_policy_arn : module.s3.iam-policy-s3-nwp-write.arn
208-
}
209-
]
205+
aws-region = var.region
206+
aws-environment = local.environment
207+
208+
s3-buckets = [{
209+
id : module.s3.s3-nwp-bucket.id
210+
access_policy_arn : module.s3.iam-policy-s3-nwp-write.arn
211+
}]
210212

211213
container-env_vars = [
214+
{ "name" : "MODEL_REPOSITORY", "value" : "ecmwf-realtime" },
212215
{ "name" : "AWS_REGION", "value" : "eu-west-1" },
213-
{ "name" : "AWS_S3_BUCKET", "value" : module.s3.s3-nwp-bucket.id },
216+
{ "name" : "ECMWF_REALTIME_S3_REGION", "value": "eu-west-1" },
217+
{ "name" : "ECMWF_REALTIME_S3_BUCKET", "value" : "ocf-ecmwf-production" },
218+
{ "name" : "ZARRDIR", "value" : "s3://${module.s3.s3-nwp-bucket.id}/ecmwf/data" },
214219
{ "name" : "LOGLEVEL", "value" : "DEBUG" },
220+
{ "name" : "SENTRY_DSN", "value" : var.sentry_dsn },
221+
{ "name" : "CONCURRENCY", "value" : "false" },
222+
# legacy ones
223+
{ "name" : "AWS_S3_BUCKET", "value" : module.s3.s3-nwp-bucket.id },
215224
{ "name" : "ECMWF_AWS_REGION", "value": "eu-west-1" },
216225
{ "name" : "ECMWF_AWS_S3_BUCKET", "value" : "ocf-ecmwf-production" },
217226
{ "name" : "ECMWF_AREA", "value" : "uk" },
218-
{ "name" : "SENTRY_DSN", "value" : var.sentry_dsn },
219227
{ "name" : "ENVIRONMENT", "value" : local.environment },
228+
{ "name" : "SENTRY_DSN", "value" : var.sentry_dsn },
229+
{ "name" : "LOGLEVEL", "value" : "DEBUG" }
220230
]
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"
231+
232+
container-secret_vars = [
233+
{secret_policy_arn: aws_secretsmanager_secret.nwp_consumer_secret.arn,
234+
values: ["ECMWF_REALTIME_S3_ACCESS_KEY", "ECMWF_REALTIME_S3_ACCESS_SECRET"]}
231235
]
236+
container-tag = var.nwp_ecmwf_version
237+
container-name = "openclimatefix/nwp-consumer"
238+
container-command = ["consume"]
232239
}
233240

234241

@@ -681,7 +688,7 @@ module "forecast_blend" {
681688

682689
# 5.2
683690
module "airflow" {
684-
source = "github.com/openclimatefix/ocf-infrastructure//terraform/modules/services/airflow?ref=4d6eadd"
691+
source = "github.com/openclimatefix/ocf-infrastructure//terraform/modules/services/airflow?ref=2b68542"
685692

686693
aws-environment = local.environment
687694
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)