|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectbrooklyn.entity.basic.AbstractSoftwareProcessDriver
brooklyn.entity.basic.AbstractSoftwareProcessSshDriver
brooklyn.entity.basic.lifecycle.legacy.SshBasedAppSetup
@Deprecated abstract class SshBasedAppSetup extends AbstractSoftwareProcessSshDriver
Application installation, configuration and startup using ssh. TODO complete documentation
Field Summary | |
---|---|
protected static Logger |
log
|
Fields inherited from class AbstractSoftwareProcessSshDriver | |
---|---|
BROOKLYN_HOME_DIR, CHECK_RUNNING, CUSTOMIZING, DEFAULT_INSTALL_BASEDIR, DEFAULT_RUN_BASEDIR, INSTALLING, KILLING, LAUNCHING, NO_VERSION_INFO, PID_FILENAME, RESTARTING, STOPPING, log, logSsh |
Fields inherited from class AbstractSoftwareProcessDriver | |
---|---|
entity |
Property Summary | |
---|---|
java.lang.String |
deployDir
|
java.lang.String |
manualInstallDir
|
Constructor Summary | |
SshBasedAppSetup(EntityLocal entity, SshMachineLocation machine)
|
Method Summary | |
---|---|
void
|
config()
Configure the application on this machine, or no-op if no config-script defined. |
java.io.File
|
copy(java.io.File file)
Copy a file to the runDir on the server. |
void
|
customize()
|
void
|
deploy(java.io.File local, java.io.File remote = null)
Copies a file to the server and invokes getDeployScript(String) for further processing. |
protected int
|
exec(java.util.List script, java.lang.String summaryForLogging = "execute for", boolean terminateOnExit)
|
java.util.List
|
getCheckRunningScript()
The script to run to on a remote machine to determine whether the application is running. |
java.util.List
|
getConfigScript()
The script to run to on a remote machine to configure the application. |
protected java.lang.String
|
getDefaultVersion()
|
java.util.List
|
getDeployScript(java.io.File server, java.io.File target = null)
Deploy the file found at the specified location on the server. |
java.lang.String
|
getInstallDir()
|
java.util.List
|
getInstallScript()
The script to run to on a remote machine to install the application. |
java.util.List
|
getRestartScript()
The script to run to on a remote machine to restart the application. |
java.util.List
|
getRunScript()
The script to run to on a remote machine to run the application. |
java.util.List
|
getShutdownScript()
The script to run to on a remote machine to shutdown the application. |
void
|
install()
Installs the application on this machine, or no-op if no install-script defined. |
boolean
|
isRunning()
Test whether the application is running. |
void
|
kill()
|
void
|
launch()
|
protected java.util.List
|
makeCheckPortOpenScript(int port)
|
protected java.util.List
|
makeCheckRunningScript(java.lang.String service = null, java.lang.String pidFile = "pid.txt")
Default commands for getCheckRunningScript(). |
protected java.util.List
|
makeInstallScript(java.util.List lines)
Add generic commands to an application specific installation script. |
protected java.util.List
|
makeRestartScript(java.lang.String service = null, java.lang.String pidFile = "pid.txt")
@see SshBasedJavaSetup#getRestartScript() |
protected java.util.List
|
makeShutdownScript(java.lang.String service = null, java.lang.String pidFile = "pid.txt")
@see SshBasedJavaSetup#getShutdownScript() |
protected ScriptHelper
|
newScript(java.util.Map flags = [:], java.lang.String phase)
|
protected int
|
obtainPort(int suggested, int defaultPort, boolean canIncrement)
Reserves a port. |
protected int
|
obtainPort(int suggested, boolean canIncrement)
|
protected void
|
postShutdown()
Called when stopping the application, if the shutdown step completes without an exception. |
void
|
restart()
Restart the application. |
void
|
runApp()
Run the application on this machine. |
protected void
|
setEntityAttributes()
|
protected java.lang.String
|
setInstallDir(java.lang.String val)
|
void
|
setRunDir(java.lang.String s)
|
void
|
setVersion(java.lang.String s)
|
void
|
shutdown()
Shut down the application process. |
void
|
stop()
Stop the application. |
static PortRange
|
toDesiredPortRange(java.lang.Integer desired, java.lang.Integer defaultFirst = desired)
Generates a valid range of possible ports. |
Methods inherited from class AbstractSoftwareProcessSshDriver | |
---|---|
copyFile, copyFile, execute, execute, getDefaultVersion, getEntityVersionLabel, getEntityVersionLabel, getHostname, getInstallDir, getLocation, getMachine, getPortsUsed, getRunDir, getShellEnvironment, getVersion, newScript, newScript |
Methods inherited from class AbstractSoftwareProcessDriver | |
---|---|
customize, getEntity, getLocation, getResource, install, kill, launch, postLaunch, restart, start, stop, waitForConfigKey |
Field Detail |
---|
protected static final Logger log
Property Detail |
---|
java.lang.String deployDir
java.lang.String manualInstallDir
Constructor Detail |
---|
SshBasedAppSetup(EntityLocal entity, SshMachineLocation machine)
Method Detail |
---|
void config()
java.io.File copy(java.io.File file)
void customize()
void deploy(java.io.File local, java.io.File remote = null)
protected int exec(java.util.List script, java.lang.String summaryForLogging = "execute for", boolean terminateOnExit)
java.util.List getCheckRunningScript()
java.util.List getConfigScript()
protected java.lang.String getDefaultVersion()
java.util.List getDeployScript(java.io.File server, java.io.File target = null)
@Override java.lang.String getInstallDir()
java.util.List getInstallScript()
java.util.List getRestartScript()
java.util.List getRunScript()
java.util.List getShutdownScript()
void install()
boolean isRunning()
@Override void kill()
void launch()
protected java.util.List makeCheckPortOpenScript(int port)
protected java.util.List makeCheckRunningScript(java.lang.String service = null, java.lang.String pidFile = "pid.txt")
protected java.util.List makeInstallScript(java.util.List lines)
The script will exit with status 0 on success and 1 on failure.
protected java.util.List makeRestartScript(java.lang.String service = null, java.lang.String pidFile = "pid.txt")
protected java.util.List makeShutdownScript(java.lang.String service = null, java.lang.String pidFile = "pid.txt")
protected ScriptHelper newScript(java.util.Map flags = [:], java.lang.String phase)
@Deprecated protected int obtainPort(int suggested, int defaultPort, boolean canIncrement)
@Deprecated protected int obtainPort(int suggested, boolean canIncrement)
protected void postShutdown()
void restart()
void runApp()
protected void setEntityAttributes()
protected java.lang.String setInstallDir(java.lang.String val)
void setRunDir(java.lang.String s)
void setVersion(java.lang.String s)
void shutdown()
@Override void stop()
@Deprecated static PortRange toDesiredPortRange(java.lang.Integer desired, java.lang.Integer defaultFirst = desired)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.