Jenkins-CI

Preview:

Citation preview

Jenkins-CI

@dylanninin

What is Software Deployment ?

Software Development Life Cycle

How to Deployment Software?

A Minimum Python Web Application

Deployment

Deployment of An Application

• cli: scp, ssh, …

• scripts: shell scripts, Fabric, Ansible…

• CI: Jenkins-CI, Travis-CI…

• DIY: …

How much time you have spent …

openplay_backend deployment

How much time you have spent …

openplay_frontend deployment

How much time you have spent …

ycq iOS build

Then if it’s in the real world?

How much time should you spend ?

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

Jenkins-CI in Action

Live Demo

https://jenkins.sponia.com/

• Build immediately when push commits

Goals

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

• github Webhooks/services

Jenkins-CI

Github Webhooks

Github / Repository / Settings / Webhooks & services

Github Webhooks

Github Webhooks

Jenkins-CI API

• Jenkins-CI API

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

Path: Jenkins-CI / Job / REST API

Jenkins-CI API

• Curl Example

Ruby API

• Ruby API

e.g.: GitHub WebHook.rb

Sinatra API

CURL

Jenkins Job Configure

Jenkins Job Configure

Jenkins Job Configure

Jenkins Job Configure

Recap

Deploy with 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

Data of Jenkins-CI

Path: Jenkins-CI / Configure

The Requirements Beyond 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

Workflow

Systems Workflow

Monitoring

Aware of Your Application• Console• Utilities• Services

Availability

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

Q & A

Reference

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