Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Upgrading Roxy

David Cassel edited this page May 21, 2013 · 11 revisions

We continue to make improvements to Roxy. Every now and then, you may want to upgrade an existing Roxy-based project to the latest version of Roxy. This page is not intended to get you from any version of Roxy to any later version of Roxy, but should cover most cases.

Assumptions

You are ready to copy

I assume that you have

~/git/old-app/
~/git/roxy/

and both are up-to-date and have no local modifications. ~/git/roxy/ is a fresh copy of the version of Roxy you want to upgrade to -- this might be the latest on the master branch or you can go for the latest and get the dev branch. Note that you should not run "ml init" in the ~/git/roxy/ directory -- you want it just like it is here on GitHub.

You've only changed what you should

Under the deploy directory, you should be working with build.properties, environment-specific properties files, ml-config.xml, and app_specific.rb. Only app_specific.rb will get overwritten by the procedure below (we'll handle that). You should explicitly not have edited default.properties, as noted in the comment at the top of that file.

Likewise, you should not have edited anything under src/roxy/.

Git

Naturally, your application is under version control, so it will be easy to see what changed and revert any accidents.

Copy files

The copy commands below will overwrite your deploy/app_specific.rb. If you're using git (or something similar), it's easy enough to just do the copies and then "$ git checkout deploy/app_specific.rb" to restore it. Alternatively, make a copy of that file before you do the commands below.

$ cd ~/git/old-app/
$ cp -r ~/git/roxy/deploy/* deploy
$ cp -r ~/git/roxy/src/roxy/* src/roxy
$ cp ~/git/roxy/ml .
$ cp ~/git/roxy/ml.bat .
$ cp ~/git/roxy/version.txt .
$ cp ~/git/roxy/CHANGELOG.mdown .

Re-bootstrap

You'll want to make sure that your updated code and configuration work completely. You can test by doing the following steps (I'm using the local environment to test):

# THIS WILL FULLY REMOVE YOUR APP FROM MARKLOGIC -- SOURCE AND DATA
$ ml local wipe
# You will be told you need to restart MarkLogic. Assuming so:
$ ml local restart
$ ml local bootstrap

If the bootstrap doesn't result in the full setup that you expect, try it with the verbose flag:

$ ml local bootstrap -v

Once that works, deploy your modules, cpf (if necessary), content and test your app.

Troubleshooting

  • Verify that your configuration files didn't get stomped.
  • The old version of the app might not have had the src/roxy/config/defaults.xqy, which is where some of the default configuration is now set up. Compare ~/git/roxy/src/app/config/config.xqy to your src/app/config/config.xqy. If your old version is old enough, you may need to manually revise your config.xqy to be like what's now distributed.