![Page 1: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/1.jpg)
Get back to sleepwith Infrastructure as Code
![Page 2: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/2.jpg)
Once upon a time...
![Page 3: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/3.jpg)
Two innocent kids decided to organizea workshop on Docker Swarm...
![Page 4: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/4.jpg)
...and they had to create tens of VMsby hand for the attendees to use.
![Page 5: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/5.jpg)
It took them one full-time day to do so, ...
LIMB
![Page 6: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/6.jpg)
...but it was totally worth it.
![Page 7: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/7.jpg)
It was the necessary pain,for the enormous gain; ...
![Page 8: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/8.jpg)
a stellar workshop!
**
*
y .
![Page 9: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/9.jpg)
And the day of the 6-hour workshop came.
![Page 10: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/10.jpg)
They were super excited.
![Page 11: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/11.jpg)
But at the middle of the workshop...
![Page 12: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/12.jpg)
...they realised they had misconfigured their VMs.
nl
- Engon
![Page 13: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/13.jpg)
Nothing would work!
![Page 14: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/14.jpg)
And that was it...
![Page 15: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/15.jpg)
...they didn’t have enough time to fix the misconfigured VMs.
![Page 16: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/16.jpg)
The workshop sunk.
![Page 17: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/17.jpg)
Attendees left — rightfully — furious.
![Page 18: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/18.jpg)
The company refunded all tickets.
![Page 19: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/19.jpg)
The reputation of the company got obliterated.
![Page 20: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/20.jpg)
Finally, it shut operations down in just a month.
Company Blog
- shutting n
H was awonderful journey
etc .. .
![Page 21: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/21.jpg)
That’s sad.
![Page 22: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/22.jpg)
Also that never happened.
phew . . .
![Page 23: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/23.jpg)
Because we did nothing by hand.
![Page 24: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/24.jpg)
We used Terraform.
![Page 25: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/25.jpg)
It’s good. You should use it too.
![Page 26: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/26.jpg)
Thanks for your time!
![Page 27: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/27.jpg)
loljk
![Page 28: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/28.jpg)
</bad-joke>
![Page 29: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/29.jpg)
Hi, I am Paris Kasidiaris
...and I desperately beg you to follow me on Twitter (@pariskasid)
T
![Page 30: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/30.jpg)
Paris Kasidiaris
I co-founded SourceLair (sourcelair.com).
I co-organize the Docker Athens User Group (docker.gr).
I HATE TOUCHING OUR PRODUCTION INFRASTRUCTURE.
![Page 31: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/31.jpg)
Let’s talk about infrastructure
![Page 32: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/32.jpg)
What is infrastructure?
![Page 33: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/33.jpg)
It’s all resources neededfor running our applications.
![Page 34: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/34.jpg)
Computers
From VMs in the cloud to bare metal
![Page 35: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/35.jpg)
Network interfaces
From floating IPs, SDN interfaces etc.
![Page 36: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/36.jpg)
Storage
Block storage, object storage etc.
![Page 37: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/37.jpg)
Let’s talk about code
![Page 38: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/38.jpg)
What is code?
![Page 39: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/39.jpg)
Machine readable text.
![Page 40: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/40.jpg)
What is Infrastructure as Code?
![Page 41: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/41.jpg)
Resources described asmachine readable text.
![Page 42: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/42.jpg)
![Page 43: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/43.jpg)
Infrastructure as Code building blocks
![Page 44: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/44.jpg)
Declarations
![Page 45: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/45.jpg)
![Page 46: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/46.jpg)
State
![Page 47: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/47.jpg)
![Page 48: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/48.jpg)
Operator
![Page 49: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/49.jpg)
The operator is the program thatwill give flesh and bones to
machine readable text
![Page 50: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/50.jpg)
Example
![Page 51: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/51.jpg)
![Page 52: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/52.jpg)
$ terraform planRefreshing Terraform state in-memory prior to plan...
------------------------------------------------------------------------
An execution plan has been generated and is shown below.Resource actions are indicated with the following symbols: + create
Terraform will perform the following actions:
+ digitalocean_droplet.workshop_node_vm[0] id: <computed> backups: "false" disk: <computed> image: "ubuntu-18-04-x64"
[Truncated]
Plan: 3 to add, 0 to change, 0 to destroy.
![Page 53: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/53.jpg)
$ terraform apply
digitalocean_droplet.workshop_node_vm.0: Still creating... (10s elapsed)digitalocean_droplet.workshop_node_vm.2: Still creating... (10s elapsed)digitalocean_droplet.workshop_node_vm.1: Still creating... (10s elapsed)digitalocean_droplet.workshop_node_vm.0: Still creating... (20s elapsed)digitalocean_droplet.workshop_node_vm.1: Still creating... (20s elapsed)digitalocean_droplet.workshop_node_vm.2: Still creating... (20s elapsed)digitalocean_droplet.workshop_node_vm.2: Still creating... (30s elapsed)digitalocean_droplet.workshop_node_vm.0: Still creating... (30s elapsed)digitalocean_droplet.workshop_node_vm.1: Still creating... (30s elapsed)digitalocean_droplet.workshop_node_vm[1]: Complete after 36s (ID: 1380764)digitalocean_droplet.workshop_node_vm[0]: Complete after 36s (ID: 1380765)digitalocean_droplet.workshop_node_vm[2]: Complete after 37s (ID: 1380770)
Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
![Page 54: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/54.jpg)
$ terraform destroy
An execution plan has been generated and is shown below.Resource actions are indicated with the following symbols: - destroy
Terraform will perform the following actions:
- digitalocean_droplet.workshop_node_vm[0]
- digitalocean_droplet.workshop_node_vm[1]
- digitalocean_droplet.workshop_node_vm[2]
Plan: 0 to add, 0 to change, 3 to destroy.
[Truncated]
Destroy complete! Resources: 3 destroyed.
![Page 55: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/55.jpg)
There are plenty of tools to choose
![Page 56: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/56.jpg)
AWS CloudFormation
Azure ARM templates
Openstack Heat
Ansible
![Page 57: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/57.jpg)
Why Infrastructure as Code?
![Page 58: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/58.jpg)
Reason #1: Control risk
![Page 59: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/59.jpg)
Oh shit. I think I just nuked a production server by mistake.
| Paris Kasidiaris, circa 2017
Amx
![Page 60: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/60.jpg)
We cannot afford mistakes in production infrastructure.
![Page 61: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/61.jpg)
People were, are and will always be doing mistakes though.
![Page 62: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/62.jpg)
Instead of trying to change human nature,we should use systems
to save us from ourselves.
![Page 63: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/63.jpg)
Reason #2: Save time
![Page 64: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/64.jpg)
For automation to make sense,we need volume.
![Page 65: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/65.jpg)
Updating 4 VMs by hand vs Terraformdoesn’t say much.
![Page 66: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/66.jpg)
Updating 40 VMs though...
![Page 67: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/67.jpg)
...or even 4 VMs, but 10 times in a day
![Page 68: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/68.jpg)
Now we are talking...
![Page 69: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/69.jpg)
Reason #3: Auditing
![Page 70: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/70.jpg)
Do you remember what is the last tuning you performed on your app servers?
![Page 71: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/71.jpg)
Or when or why you did it at all?
![Page 72: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/72.jpg)
I guess not.
![Page 73: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/73.jpg)
Me neither (I am not a freak).
![Page 74: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/74.jpg)
Can you look for it though?
![Page 75: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/75.jpg)
We can.
![Page 76: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/76.jpg)
Still looking for a RealWorld™ use case?
![Page 77: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/77.jpg)
True Story™ ahead
![Page 78: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/78.jpg)
Last month we migrated all of SourceLair’s infrastructure
![Page 79: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/79.jpg)
Our infrastructure
1. 5 VM types (Load Balancer, App VMs, Database VMs, Swarm Managers)
2. Multiple block storage devices
3. Multiple terabytes of customer data
4. 30 Docker Swarm Services
![Page 80: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/80.jpg)
One does not simply migrate such a payload by crossing their fingers.
![Page 81: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/81.jpg)
We had to iterate on provisioning, testing and destroying infra.
![Page 82: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/82.jpg)
This is not fast, or cheap.
![Page 83: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/83.jpg)
If we did such all of these by hand, we would still be testing things.
![Page 84: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/84.jpg)
And we would still be payingmore than ⨉2 for infrastructure.
![Page 85: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/85.jpg)
Instead, we used Terraform.
![Page 86: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/86.jpg)
We provisioned, tested and destroyed multiple clusters in minutes.
![Page 87: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/87.jpg)
This gave us the confidence to perform such a migration in a fraction of time.
![Page 88: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/88.jpg)
So, the day we migrated all of our infrastructure...
![Page 89: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/89.jpg)
We went back to sleep.
![Page 90: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/90.jpg)
And slept tight — really, really tight!
![Page 91: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/91.jpg)
One more thing...
![Page 92: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/92.jpg)
How does one convert a pseudocode file to Python?
![Page 93: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/93.jpg)
Just add the “.py” extension to the file name.
![Page 94: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/94.jpg)
</worse-joke>
![Page 95: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/95.jpg)
Learn more about how we mess with infrastructure!
![Page 96: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/96.jpg)
https://2hog.codes
![Page 98: with Infrastructure as Code - open-conf.gr€¦ · Paris Kasidiaris I co-founded SourceLair (sourcelair.com). I co-organize the Docker Athens User Group (docker.gr). I HATE TOUCHING](https://reader034.vdocuments.net/reader034/viewer/2022042218/5ec45d0f2e674518d252600b/html5/thumbnails/98.jpg)
Questions?