OK, you are convinced, that infrastructure-as-code (managing computing resources, networks, configuring services through machine-readable definition files, rather than interactive configuration tools) is the way to go!
But do not know, which technology to use for it? Should I learn Terraform, do I need to buy Atlas, is Ansible really enough to implement everything? Will my code stay maintainable in 3 or 5 years?
We will have a look at a small, but real world task, consider implementations with all the mentioned tools and we will also discuss, which tools give you advantages in which specific situations
Community is Just as Important as Code by Andrea Goulet
Terraform, Ansible or pure CloudFormation
1. Terraform, Ansible, or pure
CloudFormation?
Vladimir Dobriakov
AWS Tech Community Days
Cologne, September 27th and 28th
2. infrastructure coder
Infrastructure as Code
• put under source control:
diffable, traceable, reproducible
• aim for simplicity - orthogonal concepts
• unit tests, integration tests and CI
1
5. implementation
Hosting
- 400 VMs in OpenStack
public cloud
- moving to private cloud
- moved applications
to kubernetes
- some AWS
People
- 40 dev
(5 teams)
- 10 ops
24x7
4
6. our aws usage
AWS Use Case 1: Media
Assets
AWS Use Case 2: DB
Backup
Offsite DB backup for
SQL databases.
5
11. terraform challenges: resources docs
Terraform is not an abstraction layer
across providers!
Need to dive into AWS docs anyway:
resource "aws_s3_bucket" "the_bucket" {
bucket = "${data.template_file.bucket_name.rendered}"
cors_rule {
expose_headers = ???
10
15. terraform challenges: tfstate
• Working with 9 people on same terraform
code base
• Terraform versions
• Refactoring: extract to module changes
resource names
• Refactoring: move objects with
tf state mv -state=terraform.tfstate.prod
module.publish media prod
module.publish media
14
23. learn aws!
Try to implement with CloudFormation first!
• learn access and identity management
(IAM) concepts
• refer to permissions list
http://amzn.to/2pPnT1p to implement
principle of least privelege
• use CloudFormation YAML format
22
24. orchestrate with ansible if needed
• for more sophisticated templating and
logic
• when using multiple clouds
• to store some state locally, e.g. generated
credentials
• to look up some state/parameters
elsewhere
23