pandastrike / p42

CLI that simplifies the use of Docker Machine, Swarm, and Compose
ISC License
10 stars 0 forks source link

multiple availability-zones #20

Open robbwagoner opened 8 years ago

robbwagoner commented 8 years ago

Cloudformation template should support more than one availability-zone which are defined on a per-Subnet basis.

This can be tricky, especially with a static Cloudformation "template" and was an intentional decision by @dyoder. That is/was fine at the time, but to flexibly support the items below, a templated-template is probably a sensible thing to support multiple availability-zones.

  1. Each Region has a variable number of AZs.
  2. On a per AWS Account basis, there can be AZ-specific resource limitations. E.g. a particular instance type may not be available for an AZ
  3. Reserved Instances are purchased at the AZ-level

It probably makes some sense to pass an ordered list of desired AZs for a Cluster.

dyoder commented 8 years ago

@robbwagoner can you clarify what you're suggesting? is the idea to have a multiple AZ VPC?

fwiw the plan is definitely to templatize the the “template” much like we're doing now with the Dockerfile. So this sounds do-able, but I'm not sure I understand the win.

robbwagoner commented 8 years ago

@dyoder, indeed, multiple AZs in a VPC is exactly what I'm suggesting.

The win with templatizing is that there can be complex-ish logic to supporting multiple-AZs which I attempted to enumerate - the rules for selecting the appropriate AZs will largely depend on an AWS account and the Region. I.e. you may not want to just use the a & b or a-c AZs for a Region. Using US-East-1 as an example, I might want to use us-east-1c,us-east-1e, & us-east-1a (in that order because I have Reserved Instances purchased for c and e), but for AP-Southeast-2 (Sydney) I might want ap-southeast-2a & ap-southeast-2b.

robbwagoner commented 8 years ago

Additional clarification: the CFN templating DSL doesn't support conditionals with list items very well (the last I used it which was ~2 years ago). I think using a more advanced template engine to generate the CFN template will much more flexible, and result in simpler and clearer CFN templates.