@@ -125,65 +125,68 @@ import {
125125
126126# 4.0
127127module "nwp_consumer_ecmwf_live_ecs_task" {
128- source = " github.com/openclimatefix/ocf-infrastructure//terraform/modules/services/ecs_task?ref=205465e "
128+ source = " github.com/openclimatefix/ocf-infrastructure//terraform/modules/services/ecs_task?ref=37046a3 "
129129
130130 ecs-task_name = " nwp-consumer-ecmwf-india"
131131 ecs-task_type = " consumer"
132132 ecs-task_execution_role_arn = module. ecs-cluster . ecs_task_execution_role_arn
133133 ecs-task_size = {
134- cpu = 2048
135- memory = 10240
134+ cpu = 512
135+ memory = 1024
136136 }
137137
138-
139138 aws-region = var. region
140139 aws-environment = local. environment
141- aws-secretsmanager_secret_arn = aws_secretsmanager_secret. nwp_consumer_secret . arn
142140
143- s3-buckets = [{
144- id: module.s3- nwp- bucket.bucket_id,
145- access_policy_arn: module.s3- nwp- bucket.write_policy_arn
146- }]
141+ s3-buckets = [
142+ {
143+ id : module.s3- nwp- bucket.bucket_id,
144+ access_policy_arn : module.s3- nwp- bucket.write_policy_arn
145+ }
146+ ]
147147
148148 container-env_vars = [
149+ { " name" : " MODEL_REPOSITORY" , " value" : " ecmwf-realtime" },
150+ { " name" : " MODEL" , " value" : " hres-ifs-india" },
149151 { " name" : " AWS_REGION" , " value" : var.region },
152+ { " name" : " ECMWF_REALTIME_S3_REGION" , " value" : " eu-west-1" },
153+ { " name" : " ECMWF_REALTIME_S3_BUCKET" , " value" : " ocf-ecmwf-production" },
154+ { " name" : " ZARRDIR" , " value" : " s3://${ module . s3-nwp-bucket . bucket_id } /ecmwf/data" },
155+ { " name" : " LOGLEVEL" , " value" : " DEBUG" },
156+ { " name" : " SENTRY_DSN" , " value" : var.sentry_dsn },
157+ { " name" : " CONCURRENCY" , " value" : " false" },
158+ # legacy
150159 { " name" : " AWS_S3_BUCKET" , " value" : module.s3- nwp- bucket.bucket_id },
151- { " name" : " ECMWF_AWS_REGION" , " value" : " eu-west-1" },
160+ { " name" : " ECMWF_AWS_REGION" , " value" : " eu-west-1" },
152161 { " name" : " ECMWF_AWS_S3_BUCKET" , " value" : " ocf-ecmwf-production" },
153- { " name" : " LOGLEVEL" , " value" : " DEBUG" },
154162 { " name" : " ECMWF_AREA" , " value" : " india" },
155- { " name" : " SENTRY_DSN" , " value" : var.sentry_dsn },
156163 { " name" : " ENVIRONMENT" , " value" : local.environment },
157164 ]
158- container-secret_vars = [" ECMWF_AWS_ACCESS_KEY" , " ECMWF_AWS_ACCESS_SECRET" ]
165+ container-secret_vars = [
166+ {secret_policy_arn: aws_secretsmanager_secret.nwp_consumer_secret.arn,
167+ values: [" ECMWF_REALTIME_S3_ACCESS_KEY" , " ECMWF_REALTIME_S3_ACCESS_SECRET" ]
168+ }]
159169 container-tag = var. version-nwp
160170 container-name = " openclimatefix/nwp-consumer"
161171 container-command = [
162- " download" ,
163- " --source=ecmwf-s3" ,
164- " --sink=s3" ,
165- " --rdir=ecmwf/raw" ,
166- " --zdir=ecmwf/data" ,
167- " --create-latest"
172+ " consume"
168173 ]
169174}
170175
171176# 4.1
172177module "nwp_consumer_gfs_live_ecs_task" {
173- source = " github.com/openclimatefix/ocf-infrastructure//terraform/modules/services/ecs_task?ref=205465e "
178+ source = " github.com/openclimatefix/ocf-infrastructure//terraform/modules/services/ecs_task?ref=37046a3 "
174179
175180 ecs-task_name = " nwp-consumer-gfs-india"
176181 ecs-task_type = " consumer"
177182 ecs-task_size = {
178- cpu = 1024
179- memory = 5120
180- storage = 60
183+ cpu = 512
184+ memory = 1024
181185 }
182186 ecs-task_execution_role_arn = module. ecs-cluster . ecs_task_execution_role_arn
183187
184188 aws-region = var. region
185189 aws-environment = local. environment
186- aws-secretsmanager_secret_arn = aws_secretsmanager_secret. nwp_consumer_secret . arn
187190
188191 s3-buckets = [
189192 {
@@ -193,29 +196,27 @@ module "nwp_consumer_gfs_live_ecs_task" {
193196 ]
194197
195198 container-env_vars = [
199+ { " name" : " MODEL_REPOSITORY" , " value" : " gfs" },
196200 { " name" : " AWS_REGION" , " value" : var.region },
197- { " name" : " AWS_S3_BUCKET " , " value" : module.s3- nwp- bucket.bucket_id },
201+ { " name" : " ZARRDIR " , " value" : " s3:// ${ module . s3-nwp-bucket . bucket_id } /gfs/data " },
198202 { " name" : " LOGLEVEL" , " value" : " DEBUG" },
199203 { " name" : " SENTRY_DSN" , " value" : var.sentry_dsn },
204+ { " name" : " CONCURRENCY" , " value" : " false" },
205+ # legacy
206+ { " name" : " AWS_S3_BUCKET" , " value" : module.s3- nwp- bucket.bucket_id },
200207 { " name" : " ENVIRONMENT" , " value" : local.environment },
201208 ]
202209 container-secret_vars = []
203210 container-tag = var. version-nwp
204211 container-name = " openclimatefix/nwp-consumer"
205212 container-command = [
206- " download" ,
207- " --source=gfs" ,
208- " --sink=s3" ,
209- " --rdir=gfs/raw" ,
210- " --zdir=gfs/data" ,
211- " --create-latest" ,
212- " --no-rename-vars"
213+ " consume"
213214 ]
214215}
215216
216217# 4.2
217218module "nwp-consumer-metoffice-live-ecs-task" {
218- source = " github.com/openclimatefix/ocf-infrastructure//terraform/modules/services/ecs_task?ref=f0ecf51 "
219+ source = " github.com/openclimatefix/ocf-infrastructure//terraform/modules/services/ecs_task?ref=37046a3 "
219220
220221 ecs-task_name = " nwp-consumer-metoffice-india"
221222 ecs-task_type = " consumer"
@@ -249,7 +250,7 @@ module "nwp-consumer-metoffice-live-ecs-task" {
249250 values: [" METOFFICE_API_KEY" ],
250251 }
251252 ]
252- container-tag = " devsjc-major-refactor "
253+ container-tag = var . version-nwp
253254 container-name = " openclimatefix/nwp-consumer"
254255 container-command = [" consume" ]
255256}
@@ -442,7 +443,7 @@ module "forecast-ad" {
442443
443444# 5.0
444445module "airflow" {
445- source = " github.com/openclimatefix/ocf-infrastructure//terraform/modules/services/airflow?ref=7e27e14 "
446+ source = " github.com/openclimatefix/ocf-infrastructure//terraform/modules/services/airflow?ref=631a791 "
446447 aws-environment = local. environment
447448 aws-region = local. region
448449 aws-domain = local. domain
0 commit comments