6. Build
A stack that you build once (be it a virtual machine
image, container image, or something else), run one
or many instances of, and never change again. Ref
V0.0.1
7. Deploy
The deployment model is to terminate the
instance/container and start over from a new one Ref
V0.0.2
V0.0.1
8. What is the Benefit
Simplifying operations
Continuous deployments, fewer failures
Reduces errors and threats
Ref
9. Yes ! Docker is Immutable Infrastructure
Docker containers wrap a
piece of software in a
complete filesystem that
contains everything needed
to run: code, runtime, system
tools, system libraries
10. Golden Image
Is there a image to execute all kind
of application ?
Ruby Python
C#
PHP
Javascript
Perl
R
Java
Groovy
Clojure
GoF# Pig
11. Image Layer
How to prepare the image for all kind of application
in alpha, beta, production phase using?
OS
Environment
Application
Change Seldomly
Change Frequently
16. Dockerfile
Easy to use, hard to
maintain, extend
configuration management should Be Die !?
Configuration Management
Steep Learning Curve, easy
to maintain, extend
17. Using Cm to provision Image
Packer is a tool for creating
machine and container
images for multiple platforms
from a single source
configuration.
18. Packer Template
Builders: Base image
Provisioners: Select
prepare tool (e.g. Chef)
Post-Processors:
store image (e.g.
dockerhub, aws ecr)
19. Image Layer
Separate Image to two part, OS+Environment &
Application
OS
Environment
Application
Change Seldomly
Change Frequently
20. Chef X Docker X Packer
1. Push tag to
trigger webhook
2. Execute Packer
to provision image
3. Get Provision
script from Chef
4. Push Image to
dockerhub, image
tag equal to git
tag
Ref
22. All PhaSe Image
Get $PHASE from environment variable.
Get different phase configuration in one image.
app/start.sh
/binary
/conf/alpha.yml
/beta.yml
/prod.yml
Build Structure
ln -s /app/conf/$PHASE.yml
/app/conf/current.yml
binary -conf /app/conf/current.yml
start.sh
27. K8S Terminology
Pod
A group of one or
more containers
Replica Set
Ensures that a
specified number of
pod “replicas” are
running
Deployment
Provides declarative
updates for Pods and
Replica Sets
Service
a logical set of
Pods and a policy
by which to access
them
28. K8S Deployment
Create a Deployment to bring
up a Replica Set and Pods.
Update Deployment (e.g. rolling
update Pods)
Rollback to an earlier
Deployment revision
Pause and resume a
Deployment.
35. Place your screenshot here
Jenkins 2.0 Pipeline is Good
Leverage Groovy DSL to
achieve pipeline as code
Loading Script Text from
Version Control
Retaining Global
Libraries
Everything is done, take a
break ?!
36. More and More Job
Using Jenkins Pipeline Plugin after one month, I feel
there is still room for improvement...
37. insufficient
Pipeline Job: Still need to
maintain Manually
Develop: Inside Jenkins
website
Groovy: Cannot include
third-party library
38. Jenkins Job DSL
Trigger Seed Job just like compile your
General Jenkins job
Seed Job
Job A
DSL
Job B
DSL
Job A Pipeline
Job B Pipeline
39. After Using ...
Pipeline Job: Generate
automatically
Develop: everywhere
Groovy: embed other
language