Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
An introduction to Terraform
Julien Pivotto (@roidelapluie)
RMLL, Saint-Étienne
July 4th, 2017
whoami
Julien Pivotto
@roidelapluie
Sysadmin at inuits
Automation, monitoring, HA
RMLL 2013 org team
inuits
Building infrastructure
Cloud age
Baremtal: talking to your automation tool
(cobbler, foreman)
PaaS: Talking to your infra...
Challenges of current infra
Planning changes
Executing changes
Working together
Keeping up to date (usable) inventories
DevOps
The DevOps principles: CAMS
(a definition of DevOps)
Culture
Automation
Measurement
Sharing
(Damon Edwards and John Willis...
Automation
Automate all the things
Version Control
Continuous Integration and Deployment
Infrastructure as Code
Terraform
Terraform
Open Source
Mozilla Public License 2.0
Created by Hashicorp (vagrant, consul, packer,
vault)
Started in 2014
Wri...
What is terraform?
Terraform original goal
Terraform is a tool to Build, Change, and Version
Control your infrastructure.
Building infrastructure
Talk to multiple cloud/infrasctucture providers
Ensure creation and consistency
Express in an API-...
Change infrastructure
Apply incremental changes
Destroy when needed
Preview changes
Scale easily
Version control
HCL language
State file (don't store it in your git repo)
Terraform concepts
Variables
Terraform takes variables as input
Typed variables
JSON, HCL or CLI
Output
Output specific text, ip addresses, ...
Console or JSON
Providers
Configuration of a resource provider
e.g.: cloud, dns provider, ...
Often require URL, API Key, ...
Modules
Group of resources
Takes parameters
Returns output
Plan
terraform plan
Creates a plan of changes required
Does nothing to the infra
Apply
terraform apply
Applies a plan, make all the changes
Can make the plan before if needed
Statefile
Current know state of the infra
Stored in file or externally
Locking
Destroy
terraform destroy
Delete all the resources
resources can be "protected" in config
Enough talking!
Demo!
More!
https://terraform.io
terraform's cousins: packer, consul, vagrant,
vault, ...
Julien Pivotto
roidelapluie
roidelapluie@inuits.eu
Inuits
https://inuits.eu
info@inuits.eu
Contact
Upcoming SlideShare
Loading in …5
×

An introduction to terraform

3,396 views

Published on

An inroduction to Terraform, a tool that helps you deploy and change your infrastructure as code. Given at Rencontres Mondiales du Logiciel libre (RMLL) 2017

Published in: Technology

An introduction to terraform

  1. 1. An introduction to Terraform Julien Pivotto (@roidelapluie) RMLL, Saint-Étienne July 4th, 2017
  2. 2. whoami Julien Pivotto @roidelapluie Sysadmin at inuits Automation, monitoring, HA RMLL 2013 org team
  3. 3. inuits
  4. 4. Building infrastructure Cloud age Baremtal: talking to your automation tool (cobbler, foreman) PaaS: Talking to your infrastructure provider Cloud: Talking to your cloud provider Talk = Use the WebUI / API
  5. 5. Challenges of current infra Planning changes Executing changes Working together Keeping up to date (usable) inventories
  6. 6. DevOps
  7. 7. The DevOps principles: CAMS (a definition of DevOps) Culture Automation Measurement Sharing (Damon Edwards and John Willis, 2010 http://devopsdictionary.com/wiki/CAMS)
  8. 8. Automation Automate all the things Version Control Continuous Integration and Deployment Infrastructure as Code
  9. 9. Terraform
  10. 10. Terraform Open Source Mozilla Public License 2.0 Created by Hashicorp (vagrant, consul, packer, vault) Started in 2014 Written in Go Pluggable
  11. 11. What is terraform?
  12. 12. Terraform original goal Terraform is a tool to Build, Change, and Version Control your infrastructure.
  13. 13. Building infrastructure Talk to multiple cloud/infrasctucture providers Ensure creation and consistency Express in an API-Agnostic DSL
  14. 14. Change infrastructure Apply incremental changes Destroy when needed Preview changes Scale easily
  15. 15. Version control HCL language State file (don't store it in your git repo)
  16. 16. Terraform concepts
  17. 17. Variables Terraform takes variables as input Typed variables JSON, HCL or CLI
  18. 18. Output Output specific text, ip addresses, ... Console or JSON
  19. 19. Providers Configuration of a resource provider e.g.: cloud, dns provider, ... Often require URL, API Key, ...
  20. 20. Modules Group of resources Takes parameters Returns output
  21. 21. Plan terraform plan Creates a plan of changes required Does nothing to the infra
  22. 22. Apply terraform apply Applies a plan, make all the changes Can make the plan before if needed
  23. 23. Statefile Current know state of the infra Stored in file or externally Locking
  24. 24. Destroy terraform destroy Delete all the resources resources can be "protected" in config
  25. 25. Enough talking! Demo!
  26. 26. More! https://terraform.io terraform's cousins: packer, consul, vagrant, vault, ...
  27. 27. Julien Pivotto roidelapluie roidelapluie@inuits.eu Inuits https://inuits.eu info@inuits.eu Contact

×