Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change gsp to ecs tasks, remove gsp module #631

Merged
merged 5 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions terraform/modules/services/gsp/README.md

This file was deleted.

39 changes: 0 additions & 39 deletions terraform/modules/services/gsp/cloudwatch.tf

This file was deleted.

147 changes: 0 additions & 147 deletions terraform/modules/services/gsp/ecs.tf

This file was deleted.

29 changes: 0 additions & 29 deletions terraform/modules/services/gsp/iam.tf

This file was deleted.

36 changes: 0 additions & 36 deletions terraform/modules/services/gsp/variables.tf

This file was deleted.

111 changes: 101 additions & 10 deletions terraform/nowcasting/development/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ The componentes ares:
3.4 - Satellite Consumer
3.5 - Satellite Data Tailor Clean up
3.6 - PV Consumer
3.7 - GSP Consumer (from PVLive)
3.7 - GSP Consumer (From PVLive)
3.8 - GSP Consumer - GSP Day After
3.9 - GSP Consumer - National Day After
4.1 - Metrics
4.2 - Forecast PVnet 1
4.3 - Forecast National XG
Expand Down Expand Up @@ -333,16 +335,105 @@ module "pv" {
}

# 3.7
module "gsp" {
source = "../../modules/services/gsp"
module "gsp-consumer" {
source = "../../modules/services/ecs_task"

region = var.region
environment = local.environment
public_subnet_ids = module.networking.public_subnet_ids
database_secret = module.database.forecast-database-secret
docker_version = var.gsp_version
iam-policy-rds-read-secret = module.database.iam-policy-forecast-db-read
ecs_task_execution_role_arn = module.ecs.ecs_task_execution_role_arn
ecs-task_name = "gsp"
ecs-task_type = "consumer"
ecs-task_execution_role_arn = module.ecs.ecs_task_execution_role_arn
ecs-task_size = {
cpu = 256
memory = 512
storage = 21
}

aws-region = var.region
aws-environment = local.environment

s3-buckets = []

container-env_vars = [
{ "name" : "SENTRY_DSN", "value" : var.sentry_dsn },
{ "name" : "ENVIRONMENT", "value" : local.environment },
{ "name" : "LOGLEVEL", "value" : "DEBUG"},
{ "name" :"REGIME", "value" : "in-day"},
{ "name" :"N_GSPS", "value" : "317"}
]
container-secret_vars = [
{secret_policy_arn: module.database.forecast-database-secret.arn,
values: ["DB_URL"]}
]
container-tag = var.gsp_version
container-name = "openclimatefix/gspconsumer"
container-command = []
}

# 3.8
module "gsp-consumer-day-after-gsp" {
source = "../../modules/services/ecs_task"

ecs-task_name = "gsp-day-after"
ecs-task_type = "consumer"
ecs-task_execution_role_arn = module.ecs.ecs_task_execution_role_arn
ecs-task_size = {
cpu = 256
memory = 512
storage = 21
}

aws-region = var.region
aws-environment = local.environment

s3-buckets = []

container-env_vars = [
{ "name" : "SENTRY_DSN", "value" : var.sentry_dsn },
{ "name" : "ENVIRONMENT", "value" : local.environment },
{ "name" : "LOGLEVEL", "value" : "DEBUG"},
{ "name" :"REGIME", "value" : "day-after"},
{ "name" :"N_GSPS", "value" : "317"}
]
container-secret_vars = [
{secret_policy_arn: module.database.forecast-database-secret.arn,
values: ["DB_URL"]}
]
container-tag = var.gsp_version
container-name = "openclimatefix/gspconsumer"
container-command = []
}

# 3.9
module "gsp-consumer-day-after-national" {
source = "../../modules/services/ecs_task"

ecs-task_name = "national-day-after"
ecs-task_type = "consumer"
ecs-task_execution_role_arn = module.ecs.ecs_task_execution_role_arn
ecs-task_size = {
cpu = 256
memory = 512
storage = 21
}

aws-region = var.region
aws-environment = local.environment

s3-buckets = []

container-env_vars = [
{ "name" : "SENTRY_DSN", "value" : var.sentry_dsn },
{ "name" : "ENVIRONMENT", "value" : local.environment },
{ "name" :"REGIME", "value" : "day-after"},
{ "name" :"N_GSPS", "value" : "0"},
{ "name" :"INCLUDE_NATIONAL", "value" : "True"},
]
container-secret_vars = [
{secret_policy_arn: module.database.forecast-database-secret.arn,
values: ["DB_URL"]}
]
container-tag = var.gsp_version
container-name = "openclimatefix/gspconsumer"
container-command = []
}

# 4.1
Expand Down