hackoregon / civic-devops

Master collection point for issues, procedures, and code to manage the HackOregon Civic platform
MIT License
11 stars 4 forks source link

Convert 2018 Local Elections API service to Fargate #262

Closed MikeTheCanuck closed 4 years ago

MikeTheCanuck commented 4 years ago

Addresses #244 for the 2018 Housing Affordability API. Mirrors the work in #259 and #260, and implements similar changes as hackoregon/hackoregon-aws-infrastructure#84. Uses the migration procedure documented here.

Acceptance Criteria

Tests that will confirm the container has successfully migrated:

  1. CloudFormation will report UPDATE_COMPLETE for the enhanced stack
  2. ECS will report (a) "Launch Type FARGATE" for the service, (b) 1 Task Running at the Task level, and (c) at the Task detail level a "Started at" timestamp that is at least 5 minutes into the past (which indicates that the container stayed RUNNING long enough to pass the ALB health check cycle)
  3. latest log in CloudWatch group for the associated service will show similar entries as current log output 10.180.9.210 [09/Aug/2019:20:52:04 +0000] GET /local-elections/ HTTP/1.1 200 23929 - ELB-HealthChecker/2.0 0.103165
  4. browser requests to https://service.civicpdx.org/local-elections/ballots/ will display a Swagger-schema-prettified response with count: 2823 and detailed JSON objects in the results section
  5. latest CloudWatch logs will display a recent web request to /local-elections/ballots/ with a 200 response code
MikeTheCanuck commented 4 years ago

Had to introduce this lingering fix: https://github.com/hackoregon/elections-2018-backend/commit/3825b9885e29fad97dd9770a7a299dd803af8164