Continuous deployment with Jenkins and Salt
LinuxCon CloudOpen ContainerCon North America 2015, Seattle Anirban Saha
Continuous deployment with Jenkins and Salt LinuxCon CloudOpen - - PowerPoint PPT Presentation
Continuous deployment with Jenkins and Salt LinuxCon CloudOpen ContainerCon North America 2015, Seattle Anirban Saha About me Techie Traveller Thinker Author of Salt Cookbook Deployment Should be Simple Stable
Continuous deployment with Jenkins and Salt
LinuxCon CloudOpen ContainerCon North America 2015, Seattle Anirban Saha
Techie… Traveller… Thinker… Author of ‘Salt Cookbook’
Should be…
Deployment
Configuration management tools :
Remote execution tools:
Packages:
Deployment:
Code storage:
Rollback:
management and remote execution tools
Provides…
services
Targeting deployment nodes :
Task dependencies :
get_archive: module.run: . . deploy_app: module.run: . .
Orchestration : webgrp2_deploy: salt.state:
webgrp1_deploy: salt.state:
Batch Execution :
hosts at a time
Salt API:
# curl -H "Accept: application/json"
{"success": true}
To be used…
additional tasks
Jenkins calls Salt binary
Jenkins calls Salt via SSH
perform deployment and register with load balancer
and push new deployment ready archive to Amazon S3
and deploy code on target servers
following module definition, register: module.run:
Fetching archive: Salt s3 execution module used to get code archive from Amazon S3 fetch_app_archive: module.run:
Setting App version grain: After every deploy, a grain is set to record the app version deployed for tracking, app_version: grains.present:
Deployment based on App version: At every deploy, it is checked if the version to be deployed is already on the node using the app_version grain, {% if grains['app_version'] != app_version %} deregister: fetch_app_archive: deploy_app: register: {% endif %}
Get the demo repository at the following location, https://github.com/rosesnthornz/ cloudopen-na-2015