*Deprecated* See https://wiki.duraspace.org/display/VIVODOC/All+Documentation for current documentation

A Single VIVO Site

Deploying VIVO through git is a simple process.  The items you need are

  • A server to deploy VIVO on
  • A bare git repository on that server to push VIVO to
  • A post receive hook to process VIVO for deployment

Once you have a VIVO server setup (Tomcat, Apache Ant, Mysql) you can begin to setup that server to accept changes through git.  The first step is to create a bare repository.  My location of choice is a user or group folder in the home space called deploy (Some Linux operators do all the users in home '/home/svwilliams', some group them by thier security group '/home/vivopeople/svwilliams').

mkdir /home/deploy

mkdir /home/deploy/vivo.git

cd /home/deploy/vivo.git

git init --bare

Now that your bare repository is setup you can create a link to it on your machine

git remote add vivo-prod username@vivo.institution.edu:/home/deploy/vivo.git

You could push to this machine right away, but without the post-receive hook the repository will accept your changes and that's it.  What is a hook?  Its a script file that is run whenever a specific action occurs.  In the case of our deployment we run the script after the changes are received.  Git automatically comes with example hooks and you can start with the example post-receive hook or you can modify this one.  This script checkout the latest changes to /tmp and then saves the old files that were used to build vivo from a build directory (I use /usr/local/vivo/mysitename) and copies over them with the new.  This allows you to bo back to those old files and redeploy VIVO incase the latest release broke something and you wanted to restore.

Once your post receive hook is in the bare repositories hooks folder (and is executable) you are all ready to go. 

git push vivo-prod master+:master

This is your first push of your master branch to the production server.  For a test server you might want to use another branch (like develop if you are following git-flow)

git push vivo-test develop:master

After your initial push of master to vivo-prod you will only need to specify the branch to be pushed with each new release

git push vivo-prod master

A multiple VIVO Site Shop

Deploying VIVO through git with multiple sites is a multi-step process. For example at the University of Colorado Boulder's Faculty Information Systems we maintain two seperate VIVO's. One for the boulder campus and one for the in review colorado springs campus. In our VIVO source we have a directory called fis. This holds all scripts and code that are not apart of the VIVO site but are essential for building and populating VIVO. We have three deployment folders inside FIS

  • deploy-general
  • deploy-cuboulder
  • deploy-uccs

Deploy-general has the post-receive hooks necessary to check VIVO out of fis and initiate the build. There is one for each campus that basically checkout the code and calls the setup command inside the campus' own deploy folder.  The setup.sh script moves the necessary files into position for building VIVO (usually deploy.properties and initialSiteConfig.rdf) and then copies the entire directory to a campus location inside usr/local/vivo directory and calls the ant all.