Prepare the site for deployment

The deployment is based on the git repository for this site stored on git.library.cornell.edu. You have to make sure the repository accurately reflects your development environment before deploy.

  1. Update the drush make file.
    cd mysite
    cul_capistrano/update_enabled_modules_list.sh
    

    This script ends showing the differences between an automatically generated drush make file and your local.make.
    Be sure the versions of contributed modules match between these two files. Edit the versions in drupal_config/local.make to make them match.
    (The generated make use * for the drupal core version. You should use a specific core version in your local.make)

  2. Run the make file to be sure all changes are in your dev site.
    cd mysite
    cul_capistrano/do_make.sh
    
  3. Commit all changes to your local git repo
    git status
    git add --all
    git commit drupal_config/ -m 'my enabled modules, themes and make files'
    git commit public/ -m 'my new drupal core, module, and theme changes'
    git commit --all -m 'anything else, like maybe config/ changes'
    

    In real life you'll be committing each change as you go with an informative message attached to each commit, right?

  4. Push the local git repo to it's origin
    git status
    git push
    

    git status should return something like:
    # On branch master
    nothing to commit, working directory clean

Deploy a site

You can specify as many target remote machines as you like in your cinfig/deploy.rb set :stages directive, but normally there'll be staging (victoria02) and production (victoria01). Normally staging is set as the :default_stage so you don't have to specify anything on the cap command to target the staging server.

  1. follow the steps in "Prepare the site for deployment"
  2. deploy to the staging server (victoria02), or
    cap deploy
    
  3. deploy to the production server (victoria01 or victoria03)
    cap production deploy
    

Update Drupal modules

Update Drupal core & modules

Apply patches

Copy a remote database to the dev machine

Install a database dump on remote machine

Install a database dump on the dev machine

Create a development branch

Merge a development branch

Prepare a new site on the dev machine

Prepare a new site on a remote machine

Update cul_capistrano