Differences between revisions 1 and 2
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
This page describes how [[Capistrano|https://github.com/capistrano/capistrano]] is used for: This page describes how [[https://github.com/capistrano/capistrano|Capistrano]] is used for:
Line 11: Line 11:
 1. The V2 deployment git tree used to store and manage V2 and MAPS deployment configurations
 1. Capistrano customization
Line 13: Line 15:
 1. Example deployments
Line 14: Line 17:
= Capistrano Custom Command Line Parameters = = V2 Deployment Git Tree =

= Capistrano Customization =

=
= Capistrano Custom Command Line Parameters ==
Line 31: Line 38:
= Capistrano Custom Tasks =
== Capistrano Custom Tasks ==
Line 35: Line 41:
  ||<-2> '''Top-Level Tasks''' ||   ||<-2> '''Top-Level Tasks'''    ||
Line 40: Line 46:
  ||<-2> '''Deployment Tasks''' ||   ||<-2> '''Deployment Tasks'''   ||
Line 57: Line 63:
 * '''''to be completed'''''
Line 58: Line 66:

== Specific Instance Deployment ==



== Generic Instance Deployment ==

= Example Deployments =

== Example: Specific Development Instance ==

 1. Install git tree by hand
 1. Using webbrick as web server
 1. Capistrano to install site/instance specific files
 1. Can optionally run bundle and rake tasks

== Example: Specific Production Instance ==

 1. Install git tree by hand
 1. Using pre-configured APache virtual host as web server
 1. Capistrano to install everything
    1. Setup of target environment: Mix of hand and automated steps
    1. Local git checkout and installation on server
    1. RRun bindle and rake tasks

== Example: Generic Production Instance ==

 1. Creating VM on virtual host
 1. Provisioning VM on virtual host
    1. Including creation of Apache virtual host
 1. Application installation

Note that DMS (re-)configuration is not included, this must be prepared separately, typically using '''Puppet'''. See:

 * [[V2PuppetDeployment]]

Capistrano Deployment

V2Master - V2Deployment

Introduction

This page describes how Capistrano is used for:

  1. The V2 deployment git tree used to store and manage V2 and MAPS deployment configurations
  2. Capistrano customization
  3. VM setup and provisioning
  4. Application deployment
  5. Example deployments

V2 Deployment Git Tree

Capistrano Customization

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

  • to be completed

Application Deployment

Specific Instance Deployment

Generic Instance Deployment

Example Deployments

Example: Specific Development Instance

  1. Install git tree by hand
  2. Using webbrick as web server
  3. Capistrano to install site/instance specific files
  4. Can optionally run bundle and rake tasks

Example: Specific Production Instance

  1. Install git tree by hand
  2. Using pre-configured APache virtual host as web server
  3. Capistrano to install everything
    1. Setup of target environment: Mix of hand and automated steps
    2. Local git checkout and installation on server
    3. RRun bindle and rake tasks

Example: Generic Production Instance

  1. Creating VM on virtual host
  2. Provisioning VM on virtual host
    1. Including creation of Apache virtual host
  3. Application installation

Note that DMS (re-)configuration is not included, this must be prepared separately, typically using Puppet. See:

V2CapistranoDeployment (last edited 2016-01-15 10:16:57 by 172)

Copyright 2008-2014, SoftXS GmbH, Switzerland