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 does one deploy custom field sets and other changes to production?
Pages: [1]

Author Topic: How does one deploy custom field sets and other changes to production?  (Read 1437 times)

bickingd

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Joomla 1.6
  • MySQL version: 5.1
  • PHP version: 5.3.3
How does one deploy custom field sets and other changes to production?
May 05, 2011, 07:51:51 pm
Hello,

I am at the point where I would like to migrate the work I did on localhost to a public server.  I just finished getting one configured with SSH access and a public, stock Joomla! 1.6 installation.  Now I need to install CiviCRM (I presume I do the same thing I did on localhost), then migrate all my work to the new installation.

I created custom field groups, added groups, tags, field lists of values.  I also copied and modified a template, created profiles and custom searches.  Can someone point me to instructions on how to script all that so I can deploy it? 

It would be nice if the import/export feature would allow me to do some of this, but I don't expect that.  I imagine it will be similar to what I do in my day job: build sql scripts for the DB and build site packages for the code and UI changes.  I googled around and apparently don't have the right search keys as anything resembling "CiviCRM how to deploy to production" comes up with weirdness.

Thanks,
David

Edit: I just found a blog entry that should be useful (http://civicrm.org/blogs/xavier/api_batch_tools).  If anybody has any other suggestions, please reply - thanks!
« Last Edit: May 05, 2011, 08:01:26 pm by bickingd »

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 does one deploy custom field sets and other changes to production?
May 05, 2011, 10:16:00 pm

I've written a couple of scripts that are shipped with the package

bin/migrate/{import,export}.php

they export/import some parts of the DB in xml format (custom, profile groups & fields, activity and relationship types, some option groups). I enhance those scripts when i have the need for it for my school project. Ideally i would like to see someone else help take it to the next level and add:

1. Ability to extend and add more tables easily

2. Ability to parse the DB (or xml) and allow selective import/export

any takers

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

bickingd

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Joomla 1.6
  • MySQL version: 5.1
  • PHP version: 5.3.3
Re: How does one deploy custom field sets and other changes to production?
May 09, 2011, 06:21:59 pm
Well, I tried to use the scripts from the blog I referenced, and I get:

Usage: Please define CIVICRM_CONFDIR in settings_location.php at the top level civicrm directory

no matter what I try.  Since there's no documentation, and both this site and Google come up with nothing when I search the topic, I'm dead in the water.  Which folder counts as "the top level civicrm directory", and what am I supposed to define CIVICRM_CONFDIR as????

Since I'm a complete n00b at this environment, I'm going to refrain from judgement, but it's getting difficult to remain positive.  It is not a good sign when there's no information about requirements and setup before using these tools, and then diligent research comes up with nothing.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: How does one deploy custom field sets and other changes to production?
May 10, 2011, 01:58:50 am
If your new environment doesn't yet have CiviCRM, then all you need to do is migrate your existing database from your localhost to the server as per http://wiki.civicrm.org/confluence/display/CRMDOC40/Moving+an+Existing+Installation+to+a+New+Server+or+Location

May be easiest to first install CiviCRM on the new server and then just copy your database over and then proceed with the other steps on that wiki page.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How does one deploy custom field sets and other changes to production?
May 10, 2011, 02:59:07 am
Hi,

I've written a tool to export and import to csv from the command line.

http://civicrm.org/blogs/xavier/new-tools-automate-configuration-and-stagingproduction-migration

Tend to use them to backup/restore anything that you can manipulated from the API. eg I export all the OptionValues from group 2 (activity type), delete the id column and all the activities that are already on production (I use diff to spot the differences, but still manual), copy the result on prod and run an import.

X+

P.S. bonus point, you are learning the api entities and field names ;)
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

bickingd

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Joomla 1.6
  • MySQL version: 5.1
  • PHP version: 5.3.3
Re: How does one deploy custom field sets and other changes to production?
May 11, 2011, 05:50:16 pm
Hershel, thanks for the link, I'll take a look.

Xavier, I'll examine your script.

This is my plan at the moment:  First, I used MySqlWorkbench to create insert scripts for the custom fields, field groups, custom option groups, and custom option values.  I plan to run these scripts on the server.  I'll do the same with the menus and other Joomla artifacts I created.  Next, I modified an existing template so I will copy it up.  I'll probably figure out how to copy templates rather than overwrite them so I don't mess with anything unnecessarily.  Finally, the actual contact data will go in via imports.

Anything I learn here will likely alter my plan :)

Edit: Xavier, your scripts are the ones I tried to use but receive the error described in my prior message.  If you have any insight into that, I'd appreciate the help.
« Last Edit: May 11, 2011, 05:55:07 pm by bickingd »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • How does one deploy custom field sets and other changes to production?

This forum was archived on 2017-11-26.