Page MenuHomePhabricator

[terraform][blob] Use different S3 bucket for staging
ClosedPublic

Authored by bartek on Aug 6 2023, 8:04 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 28, 6:00 PM
Unknown Object (File)
Thu, Nov 28, 3:57 PM
Unknown Object (File)
Sun, Nov 17, 3:04 AM
Unknown Object (File)
Sun, Nov 17, 3:04 AM
Unknown Object (File)
Sun, Nov 17, 2:59 AM
Unknown Object (File)
Sat, Nov 16, 11:28 PM
Unknown Object (File)
Oct 17 2024, 1:06 AM
Unknown Object (File)
Oct 17 2024, 1:06 AM
Subscribers

Details

Summary

Modified the blob service ECS task to:

  • Use the "latest" tag for staging Docker image
  • Add BLOB_S3_BUCKET_NAME environment variable to the task definition that uses the bucket name suffix introduced in D8714

Depends on D8742, D8714

Test Plan

Ran terraform plan in staging:

 # aws_ecs_task_definition.blob_service must be replaced
-/+ resource "aws_ecs_task_definition" "blob_service" {
      ~ container_definitions    = jsonencode(
          ~ [
              ~ {
                  - cpu              = 0
                  ~ environment      = [
                      + {
                          + name  = "BLOB_S3_BUCKET_NAME"
                          + value = "commapp-blob-staging"
                        },
                        {
                            name  = "RUST_LOG"
                            value = "info"
                        },
                    ]
                  ~ image            = "commapp/blob-server:0.2.0" -> "commapp/blob-server:latest"
                    name             = "blob-service-server"
                    # (2 unchanged attributes hidden)
                },
            ] # forces replacement
        )
      ~ id                       = "blob-service-task-def" -> (known after apply)
      ~ revision                 = 1 -> (known after apply)
        # (9 unchanged attributes hidden)
    }

To be done after other terraform diffs in this stack are applied:

  • Build docker image for staging (with "latest" tag), with D8742 applied
  • Apply this TF change to redeploy blob service
  • Look at ECS task logs - there should be a note: INFO blob::config: Using custom S3 bucket: commapp-blob-staging

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage