terraform-dcos icon indicating copy to clipboard operation
terraform-dcos copied to clipboard

Multi-AZ AWS setup

Open jeremyvdw opened this issue 7 years ago • 11 comments

The number of AZ used is based on the number of master nodes, which is quite opinionated. I'm definitively open to feedback.

jeremyvdw avatar Jan 24 '18 22:01 jeremyvdw

I think the assumption is pretty okay.

Jeeppler avatar Apr 19 '18 22:04 Jeeppler

there is a bug for private/public agents subnets, it should check the masters count but it check agents ones

rimusz avatar Apr 23 '18 15:04 rimusz

master and agents .tf files need to use element in subnet_id as per subnet_id = "${element(aws_subnet.public.*.id,count.index)}" and those two merge conflicts resolved then PR is good to be merged

rimusz avatar Apr 23 '18 17:04 rimusz

Hey, thanks for the feedback. I’m pushing a fix later today.

jeremyvdw avatar Apr 24 '18 10:04 jeremyvdw

also can you make it optional please, thanks and master are not recommend to be spread around multi-az, they need to stay in one AZ

rimusz avatar Apr 24 '18 10:04 rimusz

@rimusz Based on this document, I was confident that masters could be spread around different AZ.

Do you want a "spread in AZ" optional switch that either deploy all master to a single zone masters like described here, or cross zone masters ?

Also, the smoke test is failing on TeamCity but I can't access it.

jeremyvdw avatar Apr 25 '18 12:04 jeremyvdw

it is not really recommended to spread masters across multi-az (is more harm than good). bootstrap and master can stay in one zone by default e.g. ${aws_subnet.public.0.id}" and the agents then can be spread across all available zones, this what exactly I have made for the custom terraform setup based on this one repo. if masters stay in one zone, and agents are spread across multi-az then I think we do not need optional one. I cannot access teamcity as well

rimusz avatar Apr 25 '18 13:04 rimusz

please remove count = "${var.num_of_masters}" from the private-/public-agent.tf files, so agent can be spread on all available zones in the region

rimusz avatar Apr 25 '18 14:04 rimusz

LGTM cc @bernadinm I have tested such setup, not sure why CI fails there

rimusz avatar Apr 25 '18 18:04 rimusz

@rimusz CI fails because the CI script is not yet merged but the PR triggers are activated. We need to merge this: https://github.com/dcos/terraform-dcos/pull/47

cprovencher avatar Apr 27 '18 21:04 cprovencher

@bernadinm can we merge this one? I been using this solution without isues

rimusz avatar Jun 28 '18 16:06 rimusz