Getting Started with Capistrano and Ruby on Rails Slides taken from

Slides:



Advertisements
Similar presentations
Agile Software Distribution
Advertisements

Jenkins User Conference San Francisco, Sept #jenkinsconf Business Process Model & Notation (BPMN) Workflows in Jenkins Max Spring Cisco
Module 12 Upgrading from Exchange Server 2003 or Exchange Server 2007 to Exchange Server 2010.
Creating Web Services with Ruby on Rails Robert Thew Internet and Web Systems II.
ONE YEAR WITH HYDRA WHAT WE KNOW NOW WHAT WE WISH WE KNEW EARLIER THOMAS SCHERZ & GLEN HORTON UNIVERSITY OF CINCINNATI.
Cisco Confidential © 2013 Cisco and/or its affiliates. All rights reserved. 1 Unity Connection Qualification for Prime Collaboration Development Release.
Visual Studio Online. What it Provides Visual Studio Online, based on the capabilities of Team Foundation Server with additional cloud services, is the.
Installation and Deployment in Microsoft Dynamics CRM 4.0
CS 683 Emerging Technologies Fall Semester, 2005 Doc 21 Rails Intro Nov 10, 2005 Copyright ©, All rights reserved SDSU & Roger Whitney, 5500 Campanile.
27-Jun-15 Rails. What is Rails? Rails is a framework for building web applications This involves: Getting information from the user (client), using HTML.
USING CI & CD WITH MICROSOFT SQL SERVER Tim Giorgi Senior Software Developer Northwest Evaluation
Rails Hosting and Deployment. sudo apt-get install build-essential sudo apt-get install ruby ri rdoc ruby1.8-dev irb1.8 libnet-daemon-perl libplrpc-perl.
Ruby on Rails (Slides modified by ements-2ed.shtml)
Automating Drupal Deployment Dominique De Cooman.
Capistrano for System Administrators (not rails developers) Bryan McLellan Senior Systems Administrator Widemile.
RUBY ON RAILS Mark Zhang. In this talk  Overview of Ruby on Rails  Core ideas  Show a tiny bit of example code  Touch on several general web development/
RUBY ON RAILS It’s so rad. What we’ll cover  What is Ruby?  What is RoR?  Why RoR?  Developing with RoR  Deployment  Demo  Questions.
Ruby on Rails. What is Ruby on Rails? Ruby on Rails is an open source full-stack web framework. It is an alternative to PHP/MySQL. It can render templates,
AppCMD Quick Reference Guide for IIS 7 installed on Win2k8 Servers.
AUTO- CONFIGURATION IN CLOUD 1. Why we need automate something? What we need to automate? How we can do that? Scripting languages vs Frameworks Most popular.
Getting to Push Button Deploys Moovweb January 19, 2012.
Managing Drupal with Aegir Chris Burge Burge Consulting, LLC 30 June 2013 Dublin, Ireland Drupal Dev Days.
Puppet with vSphere Workshop Install, configure and use Puppet on your laptop for vSphere DevOps Billy Lieberman August 1, 2015.
Lecture 11 Rails Topics SaaSSaaS Readings: SaaS book Ch February CSCE 740 Software Engineering.
Phone: Mega AS Consulting Ltd © 2007  CAT – the problem & the solution  Using the CAT - Administrator  Mega.
Vagrant workflow Jul. 15, 2014.
Source: walkaboutbydesign.blogspot.co.uk Source: tumblr.com.
Deploy a Microsoft Image RHONDA LAYFIELD SR. DEPLOYMENT ARCHITECT DMVMUG User Conference 2014 – Reston, VA.
Ruby and Rails James Crisp.NET Practice Lead ThoughtWorks Australia From aperspective.
Source: walkaboutbydesign.blogspot.co.uk Source: tumblr.com.
Ruby on Rails (Slides modified by ements-2ed.shtml)
A Networked Machine Management System 16, 1999.
Ruby on Rails on Ubuntu Bradley Taylor Rails Machine, LLC
1 PUPPET AND DSC. INTRODUCTION AND USAGE IN CONTINUOUS DELIVERY PROCESS. VIKTAR VEDMICH PAVEL PESETSKIY AUGUST 1, 2015.
Wordpress with Mina Automated Deployment Solution Jonathan Gravato DIG 4104c.
Linux Services Configuration
Jodie Gaver Jodie Gaver Working with Configuration Manager since Working with Configuration Manager since MCTS: Administering and Deploying.
Infrastructure as code. “Enable the reconstruction of the business from nothing but a source code repository, an application data backup, and bare metal.
Build and Deployment Process Understand NCI’s DevOps and continuous integration requirements Understand NCI’s build and distribution requirements.
INFSO-RI ETICS Local Setup Experiences A Case Study for Installation at Customers Location 4th. All Hands MeetingUwe Müller-Wilm VEGA Bologna, Nov.
IBM Express Runtime Quick Start Workshop © 2007 IBM Corporation Deploying a Solution.
JRA1 Meeting – 09/02/ Software Configuration Management and Integration EGEE is proposed as a project funded by the European Union under contract.
VMware Certified Professional 6-Data Center Virtualization Beta 2V0-621Exam.
1 Rails for the Ruby-Impaired John Paul Ashenfelter CTO/Transitionpoint.
E2G Web Services E2G Scripts and Methods E2G Domain Logic E2G Domain Logic Client Custom Scripts and Methods Client Custom Scripts and Methods E2G Rules.
Cloud Installation & Configuration Management. Outline  Definitions  Tools, “Comparison”  References.
Rails Deployment in the Enterprise: Transmitting a Little Experience Robert Postill.
Devops Kris Buytaert. ● I used to be a Dev, ● Then Became an Op ● Senior Linux and Open Source ● „Infrastructure Architect“ ● Building.
Know Your GlassFish Gem Jacob Kessler. Overview ● Fast, simple, easy – gem install glassfish – glassfish. ● Everything from GlassFish to serve a Ruby.
GlassFish Gem Vivek Pandey Sun Microsystems, Inc.
Using Capistrano Chirb — February 5, 2007 Presentation by Michael H. Buselli
Introduction to Ansible
Joonas Sirén, Technology Architect, Emerging Technologies Accenture
Agenda:- DevOps Tools Chef Jenkins Puppet Apache Ant Apache Maven Logstash Docker New Relic Gradle Git.
Stress Free Deployments with Octopus Deploy
@ Bucharest DevOps Hacker Meetup
Site Administration Tools: Ansible
Efficient development and deployment of Hydra projects using Vagrant
CReSIS Git Tutorial.
External Web Services Quick Start Guide
Rhonda Layfield Sr. Deployment Architect
IT Atoumation / Conf. Mgmt...
App deployment in Cloud
Capistrano David Grayson Las Vegas Ruby Meetup
Acutelearn App V Training in Hyderabad Classroom Training Instructer led trainings at Acutelearn premises Corporate Training Custom tailored trainings.
Ansible for Easy Provisioning and Application Deployment
Software Configuration Management.
Git GitHub.
Presentation transcript:

Getting Started with Capistrano and Ruby on Rails Slides taken from

Automated App Deployment using ssh

Not for server configuration Use Chef or Puppet for that

Installation $ gem install capistrano Bundler: gem ‘capistrano’

Capify your application $ capify.

Rails Directory Structure / |- public/ |- public/ |- config/ |- config/ - deploy.rb <--- Capistrano - deploy.rb <--- Capistrano |- application/ |- application/

Example Script set :application, "set your application name here” role :app, "your app-server here” role :web, "your web-server here” role :db, "your db-server here", :primary => true

Example Script (git) set, set, “ set, set, set :scm, :git set :repository, set :branch, “master” set :deploy_via, :remote_cache

Example Script (Passenger) namespace :deploy do desc "Restarting mod_rails with restart.txt” task :restart, :roles => :app, :except => { :no_release => true } do run "touch #{current_path}/tmp/restart.txt” end [:start, :stop].each do |t| desc "#{t} task is a no-op with mod_rails” task t, :roles => :app do ; end end [:start, :stop].each do |t| desc "#{t} task is a no-op with mod_rails” task t, :roles => :app do ; end endend

Example Script (mongrel) require 'mongrel_cluster/recipes' namespace :deploy do task :restart do restart_mongrel_cluster end end

First-time server setup $ cap deploy:setup

:deploy_to/ |- releases/ |- releases/ |- current/ --> |- current/ -->

Deploy the app $ cap deploy

Deploy and run migrations cap deploy:migrations

Rollback to the last version $ cap rollback

Capistrano Best Practices

1. Create Deploy User $ sudo useradd deploy (helps scope gems, config, logs, etc.)

2. Cleanup Old Deploys $ cap cleanup (leaves last 5 deploys, removes the rest)

3. Disable sudo config/deploy.rb: :use_sudo false

4. Colorize Capistrano $ gem install capistrano_colors In config/deploy.rb: require 'capistrano_colors'

Thank you