wiki:development_workflow

Development Workflow

The ICT is responsible for many different web sites that support the organizing effort. This page is a general description of how to the ICT collaboratively develops these web sites and software used to power the US Social Forum.

You may also be interested in reviewing our toolset.

There are many sites in the ussf2010.org family, however, there are only three that are under active development by the ICT team:

We have three stages of workflow for our sites. Development environments are copies of the sites developers run on their own computers and are used for modifying and testing code, Sandbox sites are for trainings and for staging new changes prior to pushing them live, and live sites are the actual live versions of each site.

With a team of developers working on multiple sites it would be easy for one user to accidentally overwrite the changes of another user. To avoid this situation, we use a revision control system called git. Here's a helpful starter on learning git.

A revision control system allows multiple developers to check out a copy of the code to their development machine, make and test changes, and then check in their code for other people to see and review.

Developer sites

If you are interested in checking out and running a copy of the code used to develop the three USSF web sites, you are welcome to do so.

You must have:

  • A working Apache, MySQL, and PHP environment that has mod Rewrite enabled (See clean URLs. Depending on your operating system, you can find more information about setting up a development environment for Debian/Ubuntu, Windows, or Macintosh.
  • git installed and working on your computer
  • An installed copy of drush.
  • A MySQL database and database user for each site you want to use

Cloning the code

To work on the organize.ussf2010.org site, you would type the following command:

git clone git://git.ussf2010.org/organize.git

To work with the www.ussf2010.org site you would type:

git clone git://git.ussf2010.org/ussfhome.git

To work with the community.ussf2010.org site you would type:

git clone git://git.ussf2010.org/community.git

(Alternate command if you have write access to central repo: git clone gitosis@git.ussf2010.org:organize.git.)

First Time installation

These commands will create a directory called organize or ussfhome or community which contains a directory called web. This web directory should be configured as your document root (a.k.a DocumentRoot in Apache lingo).

Each new directory will also have a docs directory that contains a default.settings.php file. Copy this file to default/sites/settings.php and edit as needed (be sure to edit the sync values at the bottom).

The first time you are getting setup, you will need to run a special command to initialize your database.

To work with the organize.ussf2010.org site:

wget http://sandbox:sandbox@organize.sandbox.ussf2010.org/ussf2010.sql.txt
mysql -u <your-db-user-name> -p <your-db-name> < ussf2010.sql.txt

To work with the www.ussf2010.org site:

wget http://sandbox:sandbox@sandbox.ussf2010.org/ussf2010.sql.txt
mysql -u <your-db-user-name> -p <your-db-name> < ussf2010.sql.txt

Access to the data on community.ussf2010.org is restricted for privacy reasons.

Up keep

Once you are setup, you can keep up to date by updating the latest code from git with:

git fetch
git diff origin/master
git merge origin/master

In addition, you can get the latest (anonymized) data with:

cd web
drush ussf_sync

Special handling of Views

Please don't change views directly on the live sites!

Please see the directions for handling Drupal Views.

Contributing code and patches

There are several ways to contribute back code. For starters - please join the email list, a conference call, and/or find us on IRC to introduce yourself and let us know what you are working on.

Next - you can email patches to which ever developers is working in the area you would like to work on. Or you can let us know the address of your public git repository. Or - email online-support@ussf2010.org to request your own git public repository.

Sandbox sites

Every site managed by the ICT has a live version (e.g. organize.ussf2010.org) and a sandbox version (e.g. organize.sandbox.ussf2010.org).

The sandbox sites are provided to allow us to publish new functionality for feedback without making non-fully tested features available on the live sites. The sanbox sites are also available for training purposes.

The sanbox sites for sandbox.ussf2010.org and organize.sandbox.ussf2010.org are password protected (user: sandbox, pass: sandbox - password intended to keep our robots and accidental tourists). The community sandbox site, because it contains sensitive data, is not publicly available.

Using the sandbox sites

To use a sandbox site, simply go to one of the following URLs:

Once you enter the initial http-auth password (see above), you will be presented with the site as if it was the regular site with a few exceptions. To begin with, you may login to Drupal as any user you would like. From the Drupal login screen, enter the user name you want to login as and then enter, as the password:

password.

The second major change is that all private information has been anonymized. That means all email addresses are changed and all CiviCRM contact info has been changed.

Synchronizing the sandbox sites

Every morning at 3:00 am the sandbox sites are automatically synchronized. This process also creates the SQL dump files used by developers. You can sync the sandbox sites manually using the following methods - however, please do not do this since it creates a load on the database servers:

community.sandbox.ussf2010.org

To sync the community sandbox site with the live community site:

ssh ussf2010-sandbox@keller.mayfirst.org 
cd  community.sandbox.ussf2010.org 
git pull 
cd web 
drush ussf_sync

organize.sandbox.ussf2010.org

To sync the organize sandbox site with the live community site:

ssh ussf2010-sandbox@keller.mayfirst.org 
cd  organize.sandbox.ussf2010.org 
git pull 
cd web 
drush ussf_sync

sandbox.ussf2010.org (the main web site)

To sync the sandbox site for the main web site with the live www.ussf2010.org web site (NOTE: different server):

ssh ussf2010-sandbox@keller.mayfirst.org 
cd  sandbox.ussf2010.org 
git pull 
cd web 
drush ussf_sync

Live site

Revision Manager

We are currently simply pushing all changes to the head of the master repo and then:

For organize.ussf2010.org, ssh into keller.mayfirst.org as the ussf2010-organize user and then type:

cd organize.ussf2010.org/web
# fetch changes
git fetch
# view changes
git diff origin/master
# merge changes
git merge origin/master

For www.ussf2010.org, ssh into keller.mayfirst.org as the ussf2010 user and then type:

cd www.ussf2010.org/web
# fetch changes
git fetch
# view changes
git diff origin/master
# merge changes
git merge origin/master

For community.ussf2010.org, ssh into keller.mayfirst.org as the ussf2010-community user and then type:

cd community.ussf2010.org/web
# fetch changes
git fetch
# view changes
git diff origin/master
# merge changes
git merge origin/master

We should be using tags and have a more thought out process for pushing changes to the live site...

Testing

Because we want to ensure that our websites are cross-browser and accessibility compliant, a series of test must be passed before our sites can be launched.

web content accessibility guidelines (WCAG): http://www.etre.com/tools/accessibilitycheck/

multiple browser checking: http://browsershots.org/ or http://ipinfo.info/netrenderer/ (doesn't suport ssl)

Last modified 4 years ago Last modified on 07/25/10 22:25:50