Groovy Documentation

org.linkedin.glu.agent.impl.script
[Groovy] Class AutoUpgradeScript

java.lang.Object
  org.linkedin.glu.agent.impl.script.AutoUpgradeScript

class AutoUpgradeScript

This is the script that will auto upgrade the agent. Here is an example of how to run the script using the agent main:

 gluc.sh -c org.linkedin.glu.agent.impl.script.AutoUpgradeScript -m /upgrade -a "[newVersion:'2.0.0',agentTar:'file:/tmp/agent-2.0.0.tgz']"
 gluc.sh -m /upgrade -e install
 gluc.sh -m /upgrade -e prepare
 gluc.sh -m /upgrade -e commit
 gluc.sh -m /upgrade -e uninstall
 gluc.sh -m /upgrade -u
 
Authors:
ypujante@linkedin.com


Property Summary
java.io.File agentRootDir

java.lang.Object commit

Committing

java.lang.Object currentVersion

java.lang.Object install

Fetches the new agent tarball, untar it in its final destination (/export/content/glu/agent/${params.newVersion}).

java.lang.Object obsoleteVersion

java.lang.Object prepare

Move the file in its proper location: (/export/content/glu/agent/${params.newVersion}) Runs the shell script (/export/content/glu/agent/bin/async_upgradectl.sh).

java.lang.Object rollback

Rolling back: reverting to the previous version

static java.lang.Object stateMachine

java.lang.Object uninstall

In the uninstall phase we delete either the new or old directory depending on commit/rollback

java.lang.Object untarredAgent

 
Method Summary
java.lang.String getUpgradeLog()

Returns the upgrade log // TODO MED YP: need to stream instead

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Property Detail

agentRootDir

java.io.File agentRootDir


commit

java.lang.Object commit
Committing


currentVersion

java.lang.Object currentVersion


install

java.lang.Object install
Fetches the new agent tarball, untar it in its final destination (/export/content/glu/agent/${params.newVersion}).


obsoleteVersion

java.lang.Object obsoleteVersion


prepare

java.lang.Object prepare
Move the file in its proper location: (/export/content/glu/agent/${params.newVersion}) Runs the shell script (/export/content/glu/agent/bin/async_upgradectl.sh). The effect of running this command will be to stop the current agent and start the new one.


rollback

java.lang.Object rollback
Rolling back: reverting to the previous version


stateMachine

static java.lang.Object stateMachine


uninstall

java.lang.Object uninstall
In the uninstall phase we delete either the new or old directory depending on commit/rollback


untarredAgent

java.lang.Object untarredAgent


 
Method Detail

getUpgradeLog

java.lang.String getUpgradeLog()
Returns the upgrade log // TODO MED YP: need to stream instead


 

Groovy Documentation