public class SSHInfrastructureV2 extends HostsFileBasedInfrastructureManager
Also assumes JRE and Scheduling installation paths are the same on all hosts.
If you need more control over you deployment, you may consider using
CLIInfrastructure
instead.
HostsFileBasedInfrastructureManager.NodeNameBuilder
InfrastructureManager.PersistedInfraVariablesHandler<T>, InfrastructureManager.RMDeployingNodeAccessor
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_OUTPUT_BUFFER_LENGTH |
static int |
DEFAULT_SSH_PORT |
protected String |
deploymentMode |
protected String |
javaOptions |
protected String |
javaPath |
protected String |
nodeJarUrl |
protected String |
schedulingPath |
protected Properties |
sshOptions |
protected String |
sshPassword |
protected int |
sshPort |
protected byte[] |
sshPrivateKey |
protected String |
sshUsername |
protected String |
startupScriptStandard |
protected String |
startupScriptWithNodeJarDownload |
protected String |
targetOs |
DEFAULT_NODE_DEPLOYMENT_FAILURE_THRESHOLD, DEFAULT_NODE_TIMEOUT, DEFAULT_WAIT_TIME_BETWEEN_NODE_DEPLOYMENT_FAILURES, hostsList, maxDeploymentFailure, nodeNameBuilder, nodeTimeOut, waitBetweenDeploymentFailures
ELASTIC, nodeSource, persistedInfraVariables, readLock, RM_URL_KEY, writeLock
Constructor and Description |
---|
SSHInfrastructureV2() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Object... parameters)
Configures the Infrastructure
|
String |
getDescription() |
Map<Integer,String> |
getSectionDescriptions() |
protected void |
initializePersistedInfraVariables()
This method should initialize a value in the runtime variables map for all the runtime variables that will be
used in the class.
|
protected void |
killNodeImpl(org.objectweb.proactive.core.node.Node node,
InetAddress host)
Kills the node passed as parameter
|
void |
shutDown()
Notify this infrastructure it is going to be shut down along with its
nodesource.
|
void |
startNodeImpl(HostTracker hostTracker,
int nbNodes,
List<String> depNodeURLs)
Internal node acquisition method
|
String |
toString() |
acquireAllNodes, acquireNode, addTimeouts, anyTimedOut, notifyAcquiredNode, notifyDeployingNodeLost, notifyDownNode, onDownNodeReconnection, readHosts, removeNode, removeTimeouts, startNodeImplWithRetries
acquireAllNodes, acquireNodes, acquireNodes, addDeployingNode, addDeployingNodeWithLockAndPersist, addLostNodeWithLockAndPersist, addMultipleDeployingNodes, buildDeployingNodeURL, checkAllNodesAreAcquiredAndDo, checkNodeIsAcquiredAndDo, declareDeployingNodeLost, getDefaultCommandLineBuilder, getDeployingAndLostNodes, getDeployingNodesWithLock, getDeployingOrLostNode, getEmptyCommandLineBuilder, getLostNodesWithLock, getMeta, getPersistedDeployingNodesUrl, getPersistedInfraVariable, getPersistedLostNodesUrl, getRmUrl, internalConfigure, internalNotifyDownNode, internalRegisterAcquiredNode, internalRemoveDeployingNode, internalRemoveNode, internalShutDown, isShutDown, isUsingDeployingNode, multipleDeclareDeployingNodeLost, persistInfrastructureVariables, reconfigure, recoverPersistedInfraVariables, removeDownNodePriorToNotify, searchForNotAcquiredRmNode, setNodeSource, setPersistedInfraVariable, setPersistedNodeSourceData, setRmDbManager, setRmUrl, update, updateDeployingNodeDescription
public static final int DEFAULT_OUTPUT_BUFFER_LENGTH
public static final int DEFAULT_SSH_PORT
protected int sshPort
protected String sshUsername
protected String sshPassword
protected byte[] sshPrivateKey
protected Properties sshOptions
protected String javaPath
protected String schedulingPath
protected String targetOs
protected String javaOptions
protected String deploymentMode
protected String nodeJarUrl
protected String startupScriptStandard
protected String startupScriptWithNodeJarDownload
public void startNodeImpl(HostTracker hostTracker, int nbNodes, List<String> depNodeURLs) throws RMException
Starts a PA runtime on remote host using SSH, register it manually in the nodesource.
startNodeImpl
in class HostsFileBasedInfrastructureManager
hostTracker
- The host on which one the node will be startednbNodes
- number of nodes to deploydepNodeURLs
- list of deploying or lost nodes urls createdRMException
- acquisition failedpublic void configure(Object... parameters)
configure
in class HostsFileBasedInfrastructureManager
parameters
- parameters[4] : ssh server port
parameters[5] : ssh username
parameters[6] : ssh password
parameters[7] : ssh private key
parameters[8] : optional ssh options file
parameters[9] : java path on the remote machines
parameters[10] : Scheduling path on remote machines
parameters[11] : target OS' type (Linux, Windows or Cygwin)
parameters[12] : extra java options
parameters[13] : deployment mode
parameters[14] : node.jar URL
parameters[15] : the standard startupScript
parameters[16] : the node.jar startupScriptIllegalArgumentException
- configuration failedprotected void killNodeImpl(org.objectweb.proactive.core.node.Node node, InetAddress host)
HostsFileBasedInfrastructureManager
killNodeImpl
in class HostsFileBasedInfrastructureManager
node
- The node to killhost
- The host of the nodepublic String getDescription()
getDescription
in class InfrastructureManager
public String toString()
toString
in class HostsFileBasedInfrastructureManager
public void shutDown()
InfrastructureManager
shutDown
in class InfrastructureManager
protected void initializePersistedInfraVariables()
InfrastructureManager
InfrastructureManager.configure(Object...)
method.
This method runs with the write lock acquired.initializePersistedInfraVariables
in class HostsFileBasedInfrastructureManager
public Map<Integer,String> getSectionDescriptions()
getSectionDescriptions
in interface NodeSourcePlugin
getSectionDescriptions
in class HostsFileBasedInfrastructureManager