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

Required routing to support Docker containers in Hack Oregon infrastructure #147

Closed MikeTheCanuck closed 6 years ago

MikeTheCanuck commented 6 years ago

TL;DR What's the requirement?

Example of compliant routing

Why is this necessary?

Good question, probably-crappy answer incoming: it works. We've hosted API with their endpoints and swagger interfaces like this for two years now. Are there better/different solutions? Probably.

We're dependent on DNS for the URL service.civicpdx.org, ALB (application load balancing) for routing requests to each container, CloudFormation for ensuring there are multiple healthy containers available, and the AWS Health Check protocol for ensuring we're not sending requests to a dead container. Tugging at this solution means re-hydrating the expertise to wrangle all these pieces, and sadly we were understaffed for that amount of work.

bhgrant8 commented 6 years ago

Two points:

static files (swagger) are found at http://service.civicpdx.org/transportation-systems/static/

We should directly define what should be accessible at the project root, ie: http://service.civicpdx.org/transportation-systems/

We will want something here, and need it for the ALB health checks but

Do we want Swagger at the base or the built in browsable api such as in: http://service.civicpdx.org/disaster-resilience/

MikeTheCanuck commented 6 years ago

Better explanation of the reason for these non-obvious routing changes here: https://github.com/hackoregon/elections-2018-backend/issues/3

MikeTheCanuck commented 6 years ago

Do we want Swagger at the base or the built in browsable api such as in (old version of Disaster)?

I have no strong opinion here @bhgrant8 - just want something that will respond healthily and can be used by the public.

MikeTheCanuck commented 6 years ago

Looks like everyone has decided on their API routing in their containers, and I don't have the energy to refactor to a more consistent pattern across the APIs.