Skip to content

Commit

Permalink
Merge branch 'main' into s3-site-forecast-ecs-task
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield authored Nov 14, 2024
2 parents d302494 + b02cd13 commit bf6726d
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 159 deletions.
7 changes: 0 additions & 7 deletions terraform/modules/services/database_clean_up/README.md

This file was deleted.

12 changes: 0 additions & 12 deletions terraform/modules/services/database_clean_up/cloudwatch.tf

This file was deleted.

55 changes: 0 additions & 55 deletions terraform/modules/services/database_clean_up/ecs.tf

This file was deleted.

18 changes: 0 additions & 18 deletions terraform/modules/services/database_clean_up/iam.tf

This file was deleted.

53 changes: 0 additions & 53 deletions terraform/modules/services/database_clean_up/variables.tf

This file was deleted.

46 changes: 32 additions & 14 deletions terraform/nowcasting/development/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -837,19 +837,37 @@ source = "../../modules/services/ecs_task"

# 6.5
module "pvsite_database_clean_up" {
source = "../../modules/services/database_clean_up"
region = var.region
environment = local.environment
app-name = "database_clean_up"
ecs_config = {
docker_image = "openclimatefix/pvsite_database_cleanup"
docker_version = var.database_cleanup_version
memory_mb = 512
cpu = 256
}
rds_config = {
database_secret_arn = module.pvsite_database.secret.arn
database_secret_read_policy_arn = module.pvsite_database.secret-policy.arn
}
source = "../../modules/services/ecs_task"

ecs-task_name = "database_clean_up"
ecs-task_type = "clean"
ecs-task_execution_role_arn = module.ecs.ecs_task_execution_role_arn
ecs-task_size = {
cpu = 256
memory = 512
}

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

container-env_vars = [
{"name": "LOGLEVEL", "value" : "INFO"},
{"name": "OCF_ENVIRONMENT", "value": local.environment},
{ "name" : "ENVIRONMENT", "value" : local.environment },
{ "name" : "SENTRY_DSN", "value" : var.sentry_dsn },
{ "name" : "SAVE_DIR", "value" : "s3://${module.pvsite_ml_bucket.bucket_id}/database" },
]
container-secret_vars = [
{secret_policy_arn: module.pvsite_database.secret.arn,
values: ["DB_URL"]},
]
container-tag = var.database_cleanup_version
container-name = "openclimatefix/pvsite_database_cleanup"
container-registry = "docker.io"
s3-buckets = [
{ id : module.pvsite_ml_bucket.bucket_id,
access_policy_arn = module.pvsite_ml_bucket.write_policy_arn
}
]
container-command = []
}

0 comments on commit bf6726d

Please sign in to comment.