Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

The development server is capdev.library.cornell.edu (aka sf-lib-web-006.serverfarm.cornell.edu). Each developer maintains a site, [netid].capdev.library.cornell.edu, on capdev. Look in /libweb/sites/ for your site.

Prepare the site for deployment

...

Prepare a new site on the dev machine

Make a git repo for the site on git.library.cornell.edu. Use the test site name, e.g. seadina.test.library.cornell.edu.

Run the script to create the initial site directory.

Code Block

cd my_cap_dev_area
setup_cap_dev_site.sh seadina_test_library_cornell_edu.git

Create the database, make a symbolic link from htdocs to the public directory (where Drupal is), install Drupal.

Then add everything to git, commit, and push.

Prepare a new site on a remote machine

Code Block

cd mysite
cap staging deploy:setup
cap staging drupal:site_setup_permissions
cap staging drupal:install -s db=databasename -s dbu=databaseuser -s dbpw=databasepassword \
	-s d_user=Drupal_user#1 -s d_pw=Drupal_user#1_password -s d_email=Drupal_user#1_email

Update cul_capistrano

The cul_capistrano directory is a 'git subtree'. If the separate git repo cul_capistrano comes from has been updated you can update your copy:

Code Block

cd mysite
git subtree pull --prefix cul_capistrano git@git.library.cornell.edu:cul_capistrano.git master --squash -m 'merge cul_capistrano updates'

Undo a site deploy

Code Block

cd mysite
cap staging deploy:rollback

Note: this also restores the database to the state it was at before the previous deploy.

List all the capistrano commands

Code Block

cd mysite
cap -T

Enable passwordless login to remote machines

Code Block

drush dl drush_extras
drush pushkey victoria02.library.cornell.edu
drush pushkey victoria01.library.cornell.edu
drush pushkey victoria03.library.cornell.edu