Example of simplified (automated) HAProxy load-balanced web server cluster deployment to AWS w/ tf

346 views
Skip to first unread message

Paul Capestany

unread,
Mar 28, 2016, 6:24:10 AM3/28/16
to Terraform

Direct link to theGithub repo → centos-haproxy-terraform


This is the first "tutorial" that I'm really putting out there, happy to get any feedback (be it positive or negative)!

Joshua Garnett

unread,
Mar 28, 2016, 9:38:57 AM3/28/16
to terrafo...@googlegroups.com
Hi Paul,

Thanks for putting that together.  A few points of feedback.
  • If this is meant to be an example, do not check in the *.tfstate & *.tfstate.backup files
  • A python or ruby script using the appropriate supporting libraries would make it easier to understand what run.sh is doing
  • Assuming the user does not have a key pair already created, you should use terraform to create a key pair from their local ssh key using the aws_key_pair resource
  • sleep 420 feels like a long time to wait for an instance to come up
  • It'd be great to see the series go from the very manual setup to using auto scale groups and then using service discovery
--Josh

On Mon, Mar 28, 2016 at 6:24 AM, Paul Capestany <cape...@gmail.com> wrote:

Direct link to theGithub repo → centos-haproxy-terraform


This is the first "tutorial" that I'm really putting out there, happy to get any feedback (be it positive or negative)!

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/913a0397-cbb4-4451-82c0-f6aa88c7aab0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paul Capestany

unread,
Mar 28, 2016, 6:42:48 PM3/28/16
to Terraform
Hi Josh, 

Ah, great point on not including active *.tfstate & *.tfstate.backup in an example/tutorial post. Fixed.

Hadn't heard about "aws_key_pair" resource, good to know!

Thanks for the feedback :)
Reply all
Reply to author
Forward
0 new messages