Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version upgrade support #25

Open
janhoy opened this issue Apr 4, 2013 · 2 comments
Open

Version upgrade support #25

janhoy opened this issue Apr 4, 2013 · 2 comments
Milestone

Comments

@janhoy
Copy link
Member

janhoy commented Apr 4, 2013

Should be possible to detect earlier version of OpenESP and upgrade all software, without overwriting config.

Ideally it should be possible to upgrade Solr war and Tomcat individually.

The upgrader should be designed as part of openespctl

openespctl upgrade [options] new-openesp-x.y.zip

The upgrader will have custom logic knowing what to do between two versions. If the upgrade is skipping several versions, the upgrader should still do all necessary migrations and stuff to bring the version up to date, without losing custom config.

@janhoy
Copy link
Member Author

janhoy commented Apr 4, 2013

The upgrade logic should be modularized so it really consists of a set of consecutive commands which could be run from command-line

Example

  1. Place the needed files in OPENESP_HOME/.temp (e.g. grails.jar and openespctl.bat)
  2. Detect whether an old version is installed, and give the choice of exit or upgrade, e.g. openespctl check isinstalled
  3. Detect whether OpenESP is running, and tell user to stop it before continuing e.g. openespctl check isrunning
    4 . Do a full backup of $OPENESP_HOME (excluding data/solr/index and .temp) e.g. openespctl backup <openesp-home> [destination-zipfile] where destination-zipfile defaults to $OPENESP_HOME/../backups/openesp-YYYYMMDDhhmmss.zip
  4. Place openesp-x.y.zip in $OPENESP_HOME/.temp
  5. Upgrade openesp e.g. openespctl upgrade <openesp-zipfile-location> [openesp-home] where openesp-home defaults to ".."
  6. Upgrade service if necessary e.g. openespctl windowsservice uninstall - then install again

I would like all of this logic to be written in groovy and thus also possible to use for those who want to install manually and script upgrades.

The upgrade itself can probably be as simple as unzipping most of the zip-file, but excluding some parts. Unzipping can be done really easy from Groovy through AntBuilder: https://gist.github.com/tamirko/3237336

In $OPENESP_HOME there is now a file called version.properties. So if we later down the road needs to do some custom actions during an upgrade between two versions, the groovy script can do such choices based on the versions read from this file. The upgrade process will also upgrade this file of course.

@janhoy
Copy link
Member Author

janhoy commented May 7, 2013

This will probably not be fully supported before v1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant