Capistrano Deployment
Introduction
This page describes how https://github.com/capistrano/capistrano is used for:
- VM setup and provisioning
- Application deployment
Capistrano Custom Command Line Parameters
Parameter Name
Example Value
Description
app
maps
MAPS application
v2p0
V2 application
vagrant
Virtual machine setup/provisioning
site
proto
Prototype instance of V2 and MAPS
v2
V2 virtual machine for vagrant provision
instance
zg-3.softxs.ch
Example MAPS instance: v2.softxs.ch/maps
zg-3.softxs.ch
Example v2p0 instance: v2.softxs.ch/v2p0
zg-3.softxs.ch-tn
Example v2p0 instance: v2.softxs.ch/v2p0-tn
vor.softxs.ch-4010
Example v2p0 instance: localhost:4010 on AH laptop
generic
Generic instance, must set vh and vm
vh
1
Virtual host specified
vm
192.168.4.9
Internal IP address of virtual host
Capistrano Custom Tasks
Task Name
Description
Top-Level Tasks
setup_env
Setup the application, site and instance settings for the installation
show_env
Display installation settings
setup_app_symlink
Setup application symlink, automatically called after deploy:setup
upload_database_yml
Install database.yml file
Deployment Tasks
deploy:populate
Pupulate application database (rake db:populate)
deploy:provision
Provision VM for application.
deploy:restart
Restart application (by touching tmp/restart.txt)
deploy:seed_fu
Seed the application database (rake db:seed_fu)
deploy:seed_fu_without_access_control
Seed V2 application database (rake db:seed_fu_without_access_control...
VM Provisioning Tasks
vagrant:setup
Setup Vagrant VM (create VM home dir and install Vagrant file)
vagrant:start
Start Vagrant VM (vagrant up)
vagrant:status
Display status of Vagrant VM
vagrant:stop
Stop Vagrant VM (vagrant halt)
VM Setup and Provisioning