Skip to content

Commit 4e78727

Browse files
add Primaries API (#936)
* add Primaries API * add ROUTERS * fix * 0.3.4 * Update terraform/nowcasting/development/main.tf Co-authored-by: devsjc <47188100+devsjc@users.noreply.github.com> * update api name * rename * Update terraform/nowcasting/development/variables.tf Co-authored-by: devsjc <47188100+devsjc@users.noreply.github.com> --------- Co-authored-by: devsjc <47188100+devsjc@users.noreply.github.com>
1 parent 23f3802 commit 4e78727

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

terraform/nowcasting/development/main.tf

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ This is the main terraform code for the UK platform. It is used to deploy the pl
1717
5.1 - PVSite database
1818
5.2 - PVSite API
1919
5.3 - PVSite ML bucket
20-
6.1 - Open Data PVnet
21-
7.0 - API Open Quartz Solar
20+
6.1 - Open Data PVnet (dev only)
21+
7.0 - API Open Quartz Solar (dev only)
2222
8.0 - Data Platform Database
2323
8.1 - Data Platform API
24+
9.0 - Primaries API
2425
2526
Variables used across all modules
2627
======*/
@@ -317,3 +318,32 @@ module "data_platform_api" {
317318
elbscheme="internal"
318319
elb_ports=["80","50051"]
319320
}
321+
322+
323+
# 9.0 Primaries API
324+
module "quartz-api" {
325+
source = "../../modules/services/eb_app"
326+
domain = local.domain
327+
aws-region = var.region
328+
aws-environment = local.environment
329+
aws-subnet_id = module.networking.public_subnet_ids[0]
330+
aws-vpc_id = module.networking.vpc_id
331+
container-command = ["quartz-api"]
332+
container-env_vars = [
333+
{ "name" : "SOURCE", "value" : "dataplatform" },
334+
{ "name" : "ROUTERS", "value" : "substations" },
335+
{ "name" : "PORT", "value" : "80" },
336+
{ "name" : "DB_URL", "value" : module.database.forecast-database-secret-url },
337+
{ "name" : "AUTH0_DOMAIN", "value" : var.auth_domain },
338+
{ "name" : "AUTH0_API_AUDIENCE", "value" : var.auth_api_audience },
339+
{ "name" : "SENTRY_DSN", "value" : var.sentry_dsn_api },
340+
{ "name" : "ENVIRONMENT", "value": local.environment},
341+
{ "name" : "DATA_PLATFORM_HOST", "value": module.data_platform_api.api_url},
342+
{ "name" : "DATA_PLATFORM_PORT", "value": "50051"},
343+
]
344+
container-name = "quartz-api"
345+
container-tag = var.version-api
346+
container-registry = "ghcr.io/openclimatefix"
347+
eb-app_name = "quartz-api"
348+
s3_bucket = []
349+
}

terraform/nowcasting/development/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,10 @@ variable "data_platform_api_version" {
8686
type = string
8787
description = "Docker verions for the data platform api"
8888
default = "update-build-location"
89+
}
90+
91+
variable "version-api" {
92+
type = string
93+
description = "Docker image tag for the quartz api"
94+
default = "0.3.4"
8995
}

0 commit comments

Comments
 (0)