Development With CVS And Rsync

From KdjWiki

Jump to: navigation, search

Contents

Process Description

Development

Development is done locally and (where desired) Disconnected. Development machines should have a local copy of any supporting services (such as database servers, etc) which are periodically synced from Staging/Production to provide useful data.

Development source is retrieved from a central CVS repository. This should be performed prior to the commencement of work where possible to improve the curency of the code you are working on. Changes should be checked in to CVS upon completion (or as soon after as possible) in addition to at the completion of work each day (wherever possible). Code thought to be complete should be marked as such to distinguish potentially broken code and facilitate the smooth integration of updated source by fellow developers.

TODO: Further describe the marking/labeling/versioning procedure used in mid-cycle checkins


Development to Staging

Upon a successful development phase, where testing (system and user acceptance, not unit) is required, the code needs to be deployed to staging.

The code should be marked with the expected release version to allow the development to continue but the release be identified.

The specified version of code being escalated to staging should then be checked out to a deployment area via CVS. Rsync should then be used to update the actual staging server.


Staging

Testing should be performed on the staging code. The code should be utilising services (such as database server) specifically created for staging.


Staging to Production

Production

Setting Up and Running CVS

Setting Up The CVS Server

  • Create the repository directory structure:
 $ sudo mkdir -p /var/dev/cvsroot
 $ sudo chown cvsd:cvsd /var/dev/cvsroot
 $ sudo chmod 700 /var/dev/cvsroot

Configuring The CVS Client

  • Set the CVSROOT environment variable:
 $ gedit ~/.bashrc

add the line:

 export CVSROOT=:pserver:username@servername:/root


Creating A Project

  • Change to project working folder:
 $ cd /var/dev/myproject
  • Add project to CVS:
 $ cvs import -m "My Project Name" myproject mycompany start


Working With CVS

  • Add a file:
  • Get latest version:
  • Check In File:
  • Label Version:
Personal tools