STILL STUCK WITH FTP OR GIT PULL TO
DEPLOY?
IT'S HIGH TIME TO EMBRACE AUTOMATED
DEPLOYMENT WITH CAPISTRANO
Created by /Sumit Chhetri @shhetri
, Kumaripati, LalitpurYIPL
OUTLINE
Who Am I?
Deployment?
Deployment Goals
Bene ts of Automated
Deployment
Some Infographics and Stats
Capistrano
Requirements
Terminology
Demo
Future of Deployment
Any Questions?
Thank You
WHO AM I?
Sumit Chhetri
Software Engineer @ YIPL
DEPLOYMENT
?
DEPLOYMENT
is all of the activities that make a
software system available for use
Software deployment
copy/clone code base to server
run composer commands
migrate your database
reload the web server
notify about the deployment
and so on...
DEPLOYMENT GOALS
One-click / command deployment
Source: devopsreactions.tumblr.com
Anytime & Anywhere
Anyone (with permission) can deploy
Nominal/No downtime (ZDD - zero downtime deployment)
Reliable Rollbacks
Pushed code to production, recalled there was a critical bug
Source: devopsreactions.tumblr.com
Reusable and should be reproducible (repeatable)
Scalable
BENEFITS OF AUTOMATED DEPLOYMENT
Deployments become much less error-prone
compared to this...
This simulates a manual deployment
Source: devopsreactions.tumblr.com
Anyone in the team with permission can deploy software
Engineers will spend most of their time developing software
and not have to face this kind of situation...
Problematic deployment is over
Source: devopsreactions.tumblr.com
Deploying to somewhere new is not a headache
You can release features more frequently as its easy,
automated and reproducible
GOOD, BUT HOW DO DEVELOPERS DEPLOY?
Source: Geshan.com.np
DEPLOYING WITH FTP NOW IS LIKE...
Source: devopsreactions.tumblr.com
DEPLOYMENT TOOLS, WHAT ARE THE POPULAR
ONES
Tool Written In Github Stars Github Watchers
Ruby 329
Python 316
Ruby 90
PHP 81
PHP 85
Capistrano 7476
Fabric 5833
Mina 2701
Rocketeer 1731
Deployer 1334
Source: , data from 04-Sep-2015Github.com
CAPISTRANO
A remote server automation and deployment tool written in
Ruby
Originally a tool for deploying code
Evolved into remote multi-server automation tool
Uses SSH
Does everything in parallel
Support these VCS out of the box
1.8 or higherGit
Mercurial
SVN
Easy to integrate with Java projects
We @ chose capistrano because it is popular and most
importantly ts for our use-case
YIPL
REQUIREMENTS
Ruby >= 1.9.3
recommended with public keys (password less)
SSH access to all servers,
TERMINOLOGY
Task
Recipe
Namespace
Role
Stages
TASK
A concrete set of commands to execute.
RECIPE
A collection of tasks.
NAMESPACE
Organizes tasks within recipes and
avoids naming collisions
ROLE
Servers can have different roles like
app
demo
web
STAGES
Refers to each environment being a stage like dev, staging,
testing, production.
Usually means different set of servers.
Can also include con guration per stage.
Or even different tasks.
DEMO
0:00 / 1:33
FUTURE OF DEPLOYMENT
with deploying from Hipchat using HubotChat ops
deployment but looks like a problem in Internet
challenged Nepal :)
Docker
ANY QUESTIONS???
You can drop me a message via
Email :
Facebook :
Twitter :
Visit to read
more on this. And for more interesting
stuffs.
sumit.chhetri@yipl.com.np
er.sumit.chhetri@gmail.com
https://www.facebook.com/SHhetri
https://twitter.com/shhetri
http://blog.yipl.com.np/automated-deployment
http://blog.yipl.com.np
THANK YOU
Geshan Manandhar
All of you

Automated Deployment with Capistrano