2.98 KB
Newer Older
1 2
#Development workflow

All new code, etc. should be developed locally, commited to this repository, tested on, and the deployed on production. www-test should NOT be used for code based development.

5 6 7
It is good practice to use www-test to experiment with anything that does not happen at the code level (like configuration changes, creating views, permissions changes, etc.) but if you are making trivial changes, just adding content, etc., and you are confident of the results, please feel free to make the changes directly on the live site.

Note that many people have access to www-test, and it gets over written with data from www-prod on a regular basis, e.g. when testing upgrades of CiviCRM.  Therefore, you should let people on the infra list know about any changes you are making on www-test so they don't overwrite them, and NOT assume that your config changes will be on www-test next time you look.  Backup/Export any complex views, etc. to ensure they are there next time you look.
colemanw's avatar
colemanw committed
8 9

**Note:** Access with http username/password civicrm/civicrm.

Michael McAndrew's avatar
Michael McAndrew committed
11 12 13
## Development branches

www-prod should always be on the master branch.  Developments should happen on seperate branches and merged to master when ready to deploy.

15 16
## Custom modules

All custom modules should be added to the sites/all/modules/custom directory and follow the naming convention civicrm_org_module_name.

19 20 21 22 23 24 25 26
##Releases is served from www-prod.  All files are owned by the co user.  To release new code on the master branch, do something like this:

    user@www-prod~$ cd /var/www/civicrm-website-org
    user@www-prod/var/www/civicrm-website-org$ sudo -s -u co
    co@www-prod/var/www/civicrm-website-org$ git pull 

27 28
#Syncing to test and local environments

29 30 31 32 33
Syncing to www-test and local development environments is done in the standard way (mysqldump and restore the databases and rsync/copy the files).  You can then do a git pull (and so on) to check out appropriate code.

There is a script /home/michael/ on www-test that does this.  It needs to be run as michael at the moment, but we could generalising it should be trivial.

You should not need to worry about backing up the www-test database because no important data should be stored there (see development workflow above).

35 36 37 38 39 40
#Local development environments

You can develop locally as long as you are not storing any unencrypted personal data in your local development environment.

Drupal and CiviCRM databases can be encrypted on before being transferred to local development environments.

Michael McAndrew's avatar
Michael McAndrew committed

Michael McAndrew's avatar
Michael McAndrew committed
Upgrades (especially CiviCRM upgrades) should be tested locally and on the test infrastructure before being carried out on the production server.

Michael McAndrew's avatar
Michael McAndrew committed
45 46 47 48 49
Put the site into maintanence mode before upgrading

#CiviCRM customisations

Any CiviCRM customisations should be places in the php and templates directory rather than being directly overwritted in order to make it easy to keep track of customisations through upgrades.