wiki:Trac Repository
Last modified 11 years ago Last modified on 06/14/13 14:55:19

The raison d'etre of repository management is to keep all working copies of files used in a production system, without having multiple copies across several developer instances and without duplicating the file with references to dates or other clues as to version within the production directories themselves.

The Need for a Repository

The advantages of using a repository are:

  • Centralized store of all changes made to files
  • Log entries describing the purpose of the change
  • Identity of last person effecting a change to a file
  • By using ant, maven, or eclipse, an archive can be created from the most recent source and becomes the means to distribute the same working copy across multiple servers and instances
  • The primary and secondary servers remain free of clutter as developers experiment with versions

Preparing A Workspace for the Shibboleth IdP

First, create a directory, named of your choice on your local machine and download the most current version of the repository to that location.

  • <User Home Directory>$ mkdir <repository directory name>
  • <User Home Directory>$ cd <repository directory name>
  • <User Home Directory>$ svn co svn+ssh://<sxxxx>@iron.alaska.edu/usr/local/iam/shib-svn/

You will be prompted for your sxxxx OIT ID password. Once the correct password is entered, the most recent version of the following will be installed on your desktop or laptop:

  • /opt/shibboleth-idp
  • /opt/tomcat/webapps/idp
  • idp.war

Managing Updates Via the Repository

The followings steps outline how to modify a file, test it, and then submit it to the repository as the most recent version.

  • Be sure your repository copy is up to date
    1. <User Home Directory>/<respository directory>$ svn up
  • Make the changes to it and then copy it into heald
  • Test the change on the secondary IdP server.
  • If successful, then check in the change
    1. <User Home Directory>/<respository directory>$ svn ci [-m"description"]
    2. You will be prompted for a description if you do not enter it on the command line.
  • From the secondary IdP server, make a tar or jar file of what has changed ..
    1. For any file that has changed under /opt/shibboleth-idp, tar the directory that has the modifed file ( tar -cvf shib-<directory>.tar <directory>/ )
    2. For any file that has changed under /opt/tomcat/webapps/idp, jar the idp directory into idp.war ( jar cvf idp.war idp )
    3. Copy the tar/jar to hanin to be extracted when the machines have been switched.

NOTE: I will be creating ant files to create jars for both the shibboleth-idp and tomcat from the repository. This is necessary in order to avoid including the SVN repository directories in the jar. Both are governed /opt/shibboleth-idp files and /opt/tomcat files are managed by tomcat, include XML and JAR files and can be distributed using the jar extract command.