Deployment Via Capistrano


Published on

Deployment via Capistrano and why...

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Deployment Via Capistrano

  2. 2. WHY DEPLOYMENT AGAIN? • Git method of deployment requires upfront investment in coding of hooks, which we have not have time for. • Finding the right pre-existing tool means we don't have to write the deployment code ourselves. • There are other existing tried and tested methods.
  3. 3. WHAT IS CAPISTRANO? Capistrano is a utility framework for executing commands in parallel on multiple remote machines, via SSH. It uses a simple DSL (borrowed in part from Rake) that allows you to define tasks, which may be applied to machines in certain roles. It also supports tunneling connections via some gateway machine to allow operations to be performed behind VPNs and firewalls. - Via SIMPLIFIED? It's a command line tool which runs via SSH that runs set tasks defined in a configuration file, these tasks defined are run when you want to deploy an application.
  4. 4. WHAT ARE THE APPLICATIONS? Using Capistrano, the code is uploaded to it's own folder, and your production website can be defined as a symbolic link to the latest release. ! This can be useful in that if you ever need to regress your website to a previous state it's just a matter of changing the symbolic link to that specific version stored on the server, this means you don't need to upload everything again. Which means quicker regressions. ! You can run pretty much any CLI task, for example run composer to install dependencies, run bower, set files to be executable, Change folder permissions...
  5. 5. HOW DIFFICULT IS IT TO SETUP? The answer is not very, just need to get SSH access on your machine that will be doing the deployment. ! Then you just define your deployment tasks and you're ready to go.
  6. 6. CAPISTRANO VS GIT DEPLOYMENT Git will replace all files on the production server during deploy directly to the production root, meaning some issues for users while the deployment process is on going. ! This problem is overcome by Capistrano by uploading everything then setting the latest deployment folder as the production code. ! Capistrano provides a precise syntax for defining deployment tasks Git does not, Capistrano was made specifically for deploying code. Git allows you to do this via hooks, however you have to code it all yourself.
  7. 7. WHY IS IT IMPORTANT TO HAVE A PROPER DEPLOYMENT PROCEDURE • Because it's the right way to work. • Having an automated release procedure means less error prone releases. • Less tedious procedure for deployment. • Less manual access to server via FTP means more control and documentation of production changes.
  8. 8. QUESTIONS?
  9. 9. SOURCES • • • •