Picture of David Campbell
Pros & Cons of using CVS
by David Campbell - Thursday, 2 April 2009, 02:12 PM
 
Is it a good idea to use CVS updating method for a production site? Are there any special risks to consider? Is that how you administer your moodle installs?

Any tips would be appreciated.
Picture of Eric Hagley
Re: Pros & Cons of using CVS
by Eric Hagley - Thursday, 2 April 2009, 02:51 PM
 
I don't, basically because I'm not familiar enough with it. Perhaps Don or someone else could give us a "how to" as well as their opinion?
Picture of David Campbell
Re: Pros & Cons of using CVS
by David Campbell - Thursday, 2 April 2009, 03:39 PM
 
One the reasons that prompted me to ask has been the problem I have been having with the quiz module. I decided to reinstall using the newest 1.9.4 weekly build and it turns out the newest build had a problem in the Quiz module working with php ver. 4. I guess it is fixed now, but what would happen if you are using CVS to keep things up to date, are you at riski of getting new bugs in your already stable install?
Picture of Eric Hagley
Re: Pros & Cons of using CVS
by Eric Hagley - Thursday, 2 April 2009, 04:24 PM
 
If you are using CVS it is my understanding that you would only get the latest updates of the version you are using which means only bug fixes. You would not get the new version hence the possibility of bugs. Perhaps I'm wrong....
Picture of Peter Ruthven-Stuart
Re: Pros & Cons of using CVS
by Peter Ruthven-Stuart - Thursday, 2 April 2009, 04:55 PM
 
Hello David,

The simple answer to your question (Is it a good idea to use CVS updating method for a production site? ) is, "yes".

My FUN Moodle system is running on a Mac Pro, and I use CVS to keep my Moodle system and third party modules up to date.

It's much easier and quicker than the alternative: downloading a new moodle package when ever you want to update/upgrade, and then replacing your now old moodle directory with the new one, remembering to copy over any third party modules/themes/blocks to the new moodle directory.

Once you have made your initial download via CVS, subsequent updates involve just three steps on my Mac Pro:
  1. start the Terminal app
  2. in Terminal change directory to your moodle directory, e.g.:
    • cd /library/webserver/documents/moodle/
  3. in Terminal type: cvs update -dP
I believe a Windows server is equally easy since there are CVS specific apps: see link below.

Before using CVS with a production site, read through this page:
http://docs.moodle.org/en/CVS_for_Administrators
then practice installing and updating via CVS using a test site.


Yes, there is the danger of introducing new bugs to your site, but then that's the same with the other method, i.e. downloading the moodle package, or parts of it.
Picture of David Campbell
Re: Pros & Cons of using CVS
by David Campbell - Friday, 3 April 2009, 08:10 AM
 
Peter,
Thanks for the information. I will give it a try and I like the idea of not having to do it the way I have been.

Picture of Eric Hagley
Re: Pros & Cons of using CVS
by Eric Hagley - Friday, 3 April 2009, 12:16 PM
 
Looking at the docs, it seems you don't have to set it so that you automatically receive the latest version. You can set it so you only get updates that include bug fixes. On a production site, that is the choice I would go with.

Installing and maintaining Moodle via CVS

From a Unix computer

To connect and login for the first time to the CVS server, you can use this command (remember to replace SERVER.cvs.moodle.org in the instructions below with the mirror server you chose above):

cvs -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle login

There is no password - when asked for one, just hit Enter.

To checkout (download) the entire Moodle code for the first time, use this command to get the latest WEEKLY version (generally the latest, most bug free version):

cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle

Or the latest development version (not for production use):

cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P moodle

Or the modules in Contrib

cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co contrib

Later, to update your local copy of Moodle to the current version in CVS you just need to go into your local Moodle directory and type:

cvs update -dP

To update your local copy of Moodle to a new version (e.g. from 1.8+ to 1.9), go into your local Moodle directory and type:

cvs update -dP -r MOODLE_19_STABLE

To update your local copy of Moodle to a version from a specific date (e.g. 4th February 2009), go into your local Moodle directory and type:

 cvs -q update -dP -r MOODLE_19_STABLE -D "4 Feb 2009"

To update your local copy and to save the log of the process, use the following command instead the previous one:

cvs update -dP -r MOODLE_19_STABLE | tee upgrade.log

Then look at the upgrade.log, notably look for lines starting with "C" (conflict):

grep '^C' upgrade.log

Conflicts may appear in case you have manually modified your source files. You have to resolve conflicts before using the site. See CVS for Developers for more details.