Jenkins-CI

39
Jenkins-CI @dylanninin

Transcript of Jenkins-CI

Page 1: Jenkins-CI

Jenkins-CI

@dylanninin

Page 2: Jenkins-CI

What is Software Deployment ?

Page 3: Jenkins-CI

Software Development Life Cycle

Page 4: Jenkins-CI

How to Deployment Software?

Page 5: Jenkins-CI

A Minimum Python Web Application

Deployment

Page 6: Jenkins-CI

Deployment of An Application

• cli: scp, ssh, …

• scripts: shell scripts, Fabric, Ansible…

• CI: Jenkins-CI, Travis-CI…

• DIY: …

Page 7: Jenkins-CI

How much time you have spent …

openplay_backend deployment

Page 8: Jenkins-CI

How much time you have spent …

openplay_frontend deployment

Page 9: Jenkins-CI

How much time you have spent …

ycq iOS build

Page 10: Jenkins-CI

Then if it’s in the real world?

Page 11: Jenkins-CI

How much time should you spend ?

Page 12: Jenkins-CI

Jenkins-CI

Page 13: Jenkins-CI
Page 14: Jenkins-CI

Jenkins is an award-winning, cross-platform, continuous integration and continuous delivery application that increases your productivity.

Use Jenkins to build and test your software projects continuously making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build.

It also allows you to continuously deliver your software by providing powerful ways to define your build pipelines and integrating with a large number of testing and deployment technologies.

Jenkins-CI

Page 15: Jenkins-CI

Jenkins-CI in Action

Page 16: Jenkins-CI

Live Demo

Page 17: Jenkins-CI

https://jenkins.sponia.com/

Page 18: Jenkins-CI

• Build immediately when push commits

Goals

• Build each branch when necessarily• branches: test/staging/product • jobs: naming convention

• github Webhooks/services

Page 19: Jenkins-CI

Jenkins-CI

Page 20: Jenkins-CI

Github Webhooks

Github / Repository / Settings / Webhooks & services

Page 21: Jenkins-CI

Github Webhooks

Page 22: Jenkins-CI

Github Webhooks

Page 23: Jenkins-CI

Jenkins-CI API

• Jenkins-CI API

e.g.: https://jenkins.sponia.com/job/bacchus_demo/build

Path: Jenkins-CI / Job / REST API

Page 24: Jenkins-CI

Jenkins-CI API

• Curl Example

Page 25: Jenkins-CI

Ruby API

• Ruby API

e.g.: GitHub WebHook.rb

Sinatra API

CURL

Page 26: Jenkins-CI

Jenkins Job Configure

Page 27: Jenkins-CI

Jenkins Job Configure

Page 28: Jenkins-CI

Jenkins Job Configure

Page 29: Jenkins-CI

Jenkins Job Configure

Page 30: Jenkins-CI

Recap

Deploy with Jenkins-CI

Page 31: Jenkins-CI

Manage Jenkins-CI

• Configure System • Configure Global Security • Manage Plugins • System Informations • System Log • Load Statistics • Jenkins CLI

• Script Console • Manage Node • Manage Credentials • Manage Old Data • Manage Users • Monitoring • Prepare for Shutdown

Path: Jenkins-CI / Manage

Page 32: Jenkins-CI

Data of Jenkins-CI

Path: Jenkins-CI / Configure

Page 33: Jenkins-CI

The Requirements Beyond Jenkins-CI

Page 34: Jenkins-CI

Standardisation

The Twelve Factors

• Codebase • Dependencies • Config • Backing services • Build, release, run • Processes

• Port binding • Concurrency • Disposability • Dev/prod parity • Logs • Admin processes

Page 35: Jenkins-CI

Workflow

Systems Workflow

Page 36: Jenkins-CI

Monitoring

Aware of Your Application• Console• Utilities• Services

Page 37: Jenkins-CI

Availability

Max Availability• Max Mean Time between Failures• Min Mean Time to Recover• >= 99.9%

Page 38: Jenkins-CI

Q & A

Page 39: Jenkins-CI

Reference

• https://jenkins.io/ • http://12factor.net/ • https://hub.docker.com/_/jenkins/ • https://developer.github.com/webhooks/securing/