Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Howto: run multiple clusters. #136

Open
mcameron opened this issue Mar 8, 2017 · 10 comments
Open

Howto: run multiple clusters. #136

mcameron opened this issue Mar 8, 2017 · 10 comments

Comments

@mcameron
Copy link

mcameron commented Mar 8, 2017

I'm looking for confirmation that tack can be used to run multiple clusters in one AWS account, in such a way that one cluster can be cleaned, leaving the other cluster untouched.

This does require an amount of terraform state file handling and I plan to use terragrunt for that. Happy to provide a PR, if that's of use.

Mainly I want to be confident that a make clean is safe and that nothing is shared between the two clusters spun up with different names (security groups for example).

@mcameron
Copy link
Author

mcameron commented Mar 8, 2017

I probably should also mention that I'm a big fan, and have had better results with Tack than I've had with Kops or Kube-aws so far, so thank you.

@yagonobre
Copy link
Contributor

I run multiple clusters in one AWS account, using tack but I modified tack for storage terraform state in s3. I think that terragrunt can work fine.

@lexhung
Copy link

lexhung commented Mar 9, 2017

Hi all,

I created a modified version of tack where we can easily create multiple clusters.

It is same with normal tack except you have to provide a cluster config before running make.

E.g. ENV=prod make all or (make all ENV=test)

Generated files of each cluster will be put under a sub folder of ./build

E.g. build/name.toplevel.domain

I can send a pull request if we find it useful.


https://github.com/lexhung/tack/blob/master/Makefile
https://github.com/lexhung/tack

@mcameron
Copy link
Author

Thanks for the links @lexhung.

@lexhung the diff here is quite big: master...lexhung:master

Are all those changes required for running multiple clusters in one account, or is it just 8a83ab9 and 3b9a34f?

@cemo
Copy link

cemo commented Mar 14, 2017

For what it's worth, Terraform will provide environments in 0.9. This is still in beta and in 2 months I expect a release.

@owenmorgan
Copy link

@cemo do you have documentation on environments?

@cemo
Copy link

cemo commented Mar 14, 2017

@owenmorgan check this PR and related files:

https://github.com/hashicorp/terraform/pull/12366/files

@lexhung
Copy link

lexhung commented Mar 14, 2017

@mcameron In order to enable multi-cluster, the changes here are:

  • putting the paths into variables (so I can better track/switch the filepaths of each cluster)
  • using a single source of terraform output (see .tfstate task in makefiles/terraform.mk) so we don't have to run terraform output everytime we need those values.
  • plug directory variables into terraform config ("build-dir", "dir-tmp", "dir-ssl", "dir-keypair")
  • modify the terraform commands to use new configuration, states, plan locations.
  • a few tweaks for my particular use case (e.g. disable busybox-test, VPC rule warning, ...) which I can revert for the pull request.

@cemo
Copy link

cemo commented Mar 16, 2017

@owenmorgan Terraform 0.9 is released.

@owenmorgan
Copy link

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants