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.
Infrastructure
As Code
Hello!
I am Tom Tsai (smalltown)
I am here because I want share
something with you
You can find me at:
smalltown@awsug.tw
Why Coding?
hipster?
Benefits!!
✖ Reproducible
✖ Save Your Valuable Time
✖ Avoid Human Error
✖ Not Out of Date Like Document
✖ ...
Outline
Terraform
Jenkins
Packer
Kubernetes
Docker
CM
ChatOps
Git
Public Cloud
All Demo Sample Code
✖ https://goo.gl/wnU8M
n
Before Start...
✖ Meet Requirement
✖ Well documentation, high popularity
✖ CLI + Code/Configuration, avoid to
manage manua...
Outline
Terraform
Jenkins
Packer
Kubernetes
Docker
CM
ChatOps
Git
Public Cloud
Jenkins: Pipeline AS Code
✖ CI/CD Framework with Rich Plugins
Jenkins: Pipeline AS Code
✖ Use Job DSL & Pipeline Plugin
Transform General Job Into Code
Seed Job
Job A
DSL
Job B
DSL
Job...
Demo
Outline
Terraform
Jenkins
Packer
Kubernetes
Docker
CM
ChatOps
Git
Public Cloud
Terraform: Infrastructure AS Code
✖ Avoid to Manage Your Public Cloud
Resources Manually
Terraform: Infrastructure AS Code
✖ Define Public Cloud Resources with
Terraform Provider
resource "aws_s3_bucket" "b" {
b...
Outline
Terraform
Jenkins
Packer
Kubernetes
Docker
CM
ChatOps
Git
Public Cloud
CM: Provision AS Code
✖ Record Your Provision Procedure
with CM Tool, Not Document
Document:
- Easy Out of Date
- Hard to ...
CM: Provision AS Code
✖ Put CM Script Together With
Application Repository
App Repo/
├── CHANGELOG.md
├── Of Course Your C...
Outline
Terraform
Jenkins
Packer
Kubernetes
Docker
CM
ChatOps
Git
Public Cloud
Packer: Image AS Code
✖ Handle All The Image Building Flow
Packer: Image AS Code
✖ Integrate With CM Tools
+
Outline
Terraform
Jenkins
Packer
Kubernetes
Docker
CM
ChatOps
Git
Public Cloud
Docker: Server AS code
✖ Build, Ship, Run Every Environment
✖ Immutable Infrastructure
Docker: Server AS code
✖ Build, Ship, Run Every Environment
✖ Immutable Infrastructure
1. Push tag to
trigger webhook
2. E...
Demo
Outline
Terraform
Jenkins
Packer
Kubernetes
Docker
CM
ChatOps
Git
Public Cloud
Kubernetes: Orchestration AS Code
✖ Automating Deployment, Scaling and
Management of Containerized
Applications
Kubernetes
Kubernetes: Orchestration AS Code
✖ Kubernetes Use YAML File to Define
How Container Lives in the Cluster
Demo
Outline
Terraform
Jenkins
Packer
Kubernetes
Docker
CM
ChatOps
Git
Public Cloud
Hubot: Chat As Code
✖ Hubot is a Robot Sidekick, Ami to
Improve Employee Efficiency
✖ Don’t be Interrupted Anymore
Hubot: Chat As Code
✖ Hubot Use CoffeeScript to Let Human
Interact With Service Easily
...
Demo
works like a charm !!
Thanks!
Any questions?
http://s.drx.tw/iac
COSCUP 2017 - infrastructure As Code
Upcoming SlideShare
Loading in …5
×

COSCUP 2017 - infrastructure As Code

1,356 views

Published on

How to Transfer You Infrastructure Into Code

Published in: Software
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website! https://vk.cc/818RFv
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

COSCUP 2017 - infrastructure As Code

  1. 1. Infrastructure As Code
  2. 2. Hello! I am Tom Tsai (smalltown) I am here because I want share something with you You can find me at: smalltown@awsug.tw
  3. 3. Why Coding?
  4. 4. hipster?
  5. 5. Benefits!! ✖ Reproducible ✖ Save Your Valuable Time ✖ Avoid Human Error ✖ Not Out of Date Like Document ✖ ...
  6. 6. Outline Terraform Jenkins Packer Kubernetes Docker CM ChatOps Git Public Cloud
  7. 7. All Demo Sample Code ✖ https://goo.gl/wnU8M n
  8. 8. Before Start... ✖ Meet Requirement ✖ Well documentation, high popularity ✖ CLI + Code/Configuration, avoid to manage manually ✖ How to manage configuration ○ From CLI ○ Define in the configuration file ○ Define in the code
  9. 9. Outline Terraform Jenkins Packer Kubernetes Docker CM ChatOps Git Public Cloud
  10. 10. Jenkins: Pipeline AS Code ✖ CI/CD Framework with Rich Plugins
  11. 11. Jenkins: Pipeline AS Code ✖ Use Job DSL & Pipeline Plugin Transform General Job Into Code Seed Job Job A DSL Job B DSL Job A Pipeline Job B Pipeline + + Job A Job B
  12. 12. Demo
  13. 13. Outline Terraform Jenkins Packer Kubernetes Docker CM ChatOps Git Public Cloud
  14. 14. Terraform: Infrastructure AS Code ✖ Avoid to Manage Your Public Cloud Resources Manually
  15. 15. Terraform: Infrastructure AS Code ✖ Define Public Cloud Resources with Terraform Provider resource "aws_s3_bucket" "b" { bucket = "my_tf_test_bucket" acl = "private" tags { Name = "My bucket" } }
  16. 16. Outline Terraform Jenkins Packer Kubernetes Docker CM ChatOps Git Public Cloud
  17. 17. CM: Provision AS Code ✖ Record Your Provision Procedure with CM Tool, Not Document Document: - Easy Out of Date - Hard to Maintain
  18. 18. CM: Provision AS Code ✖ Put CM Script Together With Application Repository App Repo/ ├── CHANGELOG.md ├── Of Course Your Code ├── Provision Script ├── ... └── README.md
  19. 19. Outline Terraform Jenkins Packer Kubernetes Docker CM ChatOps Git Public Cloud
  20. 20. Packer: Image AS Code ✖ Handle All The Image Building Flow
  21. 21. Packer: Image AS Code ✖ Integrate With CM Tools +
  22. 22. Outline Terraform Jenkins Packer Kubernetes Docker CM ChatOps Git Public Cloud
  23. 23. Docker: Server AS code ✖ Build, Ship, Run Every Environment ✖ Immutable Infrastructure
  24. 24. Docker: Server AS code ✖ Build, Ship, Run Every Environment ✖ Immutable Infrastructure 1. Push tag to trigger webhook 2. Execute Packer to provision image 3. Get Provision script from Ansible 4. Push Image to docker Registry, image tag equal to git tag
  25. 25. Demo
  26. 26. Outline Terraform Jenkins Packer Kubernetes Docker CM ChatOps Git Public Cloud
  27. 27. Kubernetes: Orchestration AS Code ✖ Automating Deployment, Scaling and Management of Containerized Applications Kubernetes
  28. 28. Kubernetes: Orchestration AS Code ✖ Kubernetes Use YAML File to Define How Container Lives in the Cluster
  29. 29. Demo
  30. 30. Outline Terraform Jenkins Packer Kubernetes Docker CM ChatOps Git Public Cloud
  31. 31. Hubot: Chat As Code ✖ Hubot is a Robot Sidekick, Ami to Improve Employee Efficiency ✖ Don’t be Interrupted Anymore
  32. 32. Hubot: Chat As Code ✖ Hubot Use CoffeeScript to Let Human Interact With Service Easily ...
  33. 33. Demo
  34. 34. works like a charm !!
  35. 35. Thanks! Any questions? http://s.drx.tw/iac

×