Swem's Deployment Architecture

Every running instance of VuFind is a git repository. By making everything a git repository we can rapidly deploy changes using git push/pull and we have the benefits of git merge as well.

Testserver

The testserver houses a git repository that is setup to track only the development branch of vufind and any branch of the theme (see below). The testserver is also setup with write access to the git server.

Production

The production server is set up with a clone of the git server with read-only access. The repository kept on the production server is set up to only track the production branch. The theme can track any branch, but also only has read only access.

Keeping everything on production as a cloned repository allows for passwords to be kept locally and retained when new code is pulled down (a pull is a fetch then merge).

Swem's Development Process of VuFind

Everything is kept in a Git repository with 3 main branches.

Master Branch

The master branch in Git is a clone of the SVN repository, complete with all of the back history of the project. This was all setup using the git-svn command. Routinely (daily, or whenever someone remembers) the repository should be updated to ensure it still matches the project SVN repository. To update, go to your repository, make sure you're on the master branch, and use the command "git svn rebase". There shouldn't be any merge errors since code should never be manually changed in the master branch.

The svn-remote for the master branch is https://vufind.svn.sourceforge.net/svnroot/vufind/trunk

Development Branch

The development branch is where all local development is done (excluding themes, see the theme section for why). Code should always be tested here first before being merged into production.

When new code has been added to the master branch that you want in your development branch, you'll need to merge the master branch into the development branch. First make sure that you're on the Development branch (git branch should tell you), then use the command "git merge master". If there are any conflicts in the merge there will be errors and you'll be prompted to fix them before the merge is committed to the repository. git-mergetool is helpful in fixing conflicts.

An instance of the development branch is running on the testserver (as a git repo) for code testing with a full Solr index. The easiest way we've found is to develop on the test server and when you're happy with what you've done, add and commit your change. After you've finished with commits for that session, or you finish a feature be sure to push your changes to the local git server if you have one.

Production Branch

The production branch should always be code that is ready for production. No development changes should ever be made to the production branch without first fully testing them (thats what the development branch is for).

After a set of changes are complete and have been tested (usually on the testserver) they should be pushed to a a git server (we use gitosis). After testing merge the development branch into production. With the production branch checked out, run "git merge development" and clean up any merge conflicts very carefully, remembering that you usually want your new production code to look like your tested development code at this point.

After a successful merge push the changes to any git server you run. On the production server, navigate to your running VuFind instance and run a "git pull". This will fetch changes and merge them into your running instance.

Themes

To keep theme development separate from backend development, and since most of our changes are made there, we have another git repo exclusively for base theme that we use. The theme based on the blueprint them is kept in its own, also with development, and production branches. To keep a git repository inside of another git repository we use the git-submodule feature.

One benefit of keeping the theme in its own repo is that we can quickly change themes without having to add "new" themes into the themes folder. One example is that on April Fools we changed themes by checking out the AprilFools branch on production, then checked out our normal production branch when we were ready to change back.

The svn remote for the master branch of vufind-theme is https://vufind.svn.sourceforge.net/svnroot/vufind/trunk/web/interface/themes/blueprint