This document discusses the benefits of implementing infrastructure, pipelines, images, servers, orchestration, and chat operations as code. Key benefits include being reproducible, saving time, avoiding human error, and not becoming outdated. It outlines tools like Terraform, Jenkins, Packer, Kubernetes, Docker, configuration management, and Hubot. Code samples and demos are provided to define infrastructure with Terraform, transform jobs into pipelines with Jenkins, build images with Packer, define containers in Kubernetes, build servers with Docker, and interact with services through Hubot chat. A link is provided to access additional sample code.
9. 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
12. 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
18. CM: Provision AS Code
✖ Record Your Provision Procedure
with CM Tool, Not Document
Document:
- Easy Out of Date
- Hard to Maintain
19. CM: Provision AS Code
✖ Put CM Script Together With
Application Repository
App Repo/
├── CHANGELOG.md
├── Of Course Your Code
├── Provision Script
├── ...
└── README.md
24. Docker: Server AS code
✖ Build, Ship, Run Every Environment
✖ Immutable Infrastructure
25. 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