CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • How to set up deployment from staging to production server
Pages: [1]

Author Topic: How to set up deployment from staging to production server  (Read 1471 times)

Thinkling

  • I’m new here
  • *
  • Posts: 18
  • Karma: 0
How to set up deployment from staging to production server
July 08, 2008, 04:11:32 pm
In the Drupal community there's a fair bit of discussion on how to make it easy to develop updates of your site on a development or staging server, and move those changes forward to a production server.  As I was thinking about this for the Drupal part of our site, it occurred to me that I'll have to manage it for CiviCRM as well.

Here's a sketch of the problem: if all functionality of your site is defined in code, deploying a new version is easy: you check it into source control, and check out the changes on the production server. But in practice, much of the site's setup is stored in the database--the database contains both "configuration" (setup of contribution forms, custom data fields, etc.) and "content" (actual contact and contribution data).  So if you start site revision work from a copy of the main site and make configuration changes, you then want to copy the database forward to the production server. But the DB on the production server has accumulated new changes to contacts, contributions, etc that you don't want to lose.

In the Drupal world, the "default" way to deal with this is to carefully record all your config actions as you do them on the staging server, then do all the same things again (by hand) on the production server. This is tedious and error-prone, and means you should really test everything all over again to make sure you got it right.

A handful of proposals have popped up to deal with this--e.g. segmenting the space of primary keys so that each server can make changes in its own "key space" and records can be copied without clobbering anything.

Is there any thinking already about this problem in the CiviCRM world?

Thanks.

Maarten.

PS: links to some Drupal discussions, blog posts, etc. are here:
http://del.icio.us/thinkling/drupal+deployment
 

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How to set up deployment from staging to production server
July 09, 2008, 03:22:47 am

The dev team is not / has not been thinking about this issue. Would be a good project for the community to spearhead and help figure out what the options are and what can/should be done.

One potential solution is to sync configuration data between production and test databases and keep content data separate. I suspect this approach should work for most folks most of the time :)

In some of our prior consulting projects, we've done the above on a adhoc basis. We typically try to keep and maintain all config data in sql files (which in turn is controlled via svn) (similar to civicrm_data.mysql). This is fairly primitive (and time consuming), so having scripts to take a snapshot of config data and update another db with the new config data would be quite helpful

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • How to set up deployment from staging to production server

This forum was archived on 2017-11-26.