public class SSHInfrastructure extends HostsFileBasedInfrastructureManager
Assumes all necessary ProActive configuration has already been performed: ssh
username, key directory, etc. This class won't handle it, see
SSHClient
.
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
GCMInfrastructure
instead, which contains the functionalities of this
Infrastructure, but requires more configuration.
HostsFileBasedInfrastructureManager.NodeNameBuilder
InfrastructureManager.PersistedInfraVariablesHandler<T>, InfrastructureManager.RMDeployingNodeAccessor
Modifier and Type | Field and Description |
---|---|
protected String |
javaOptions
Additional java options to append to the command executed on the remote
host
|
protected String |
javaPath
Path to the Java executable on the remote hosts
|
protected File |
rmCredentialsPath
Path to the credentials file user for RM authentication
|
protected String |
schedulingPath
Path to the Scheduling installation on the remote hosts
|
protected String |
sshOptions
SshClient options (@see
SSHClient ) |
protected String |
targetOs
The type of the OS on the remote machine, 'Linux', 'Windows' or 'Cygwin'
|
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 |
---|
SSHInfrastructure() |
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.
|
protected 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
protected String sshOptions
SSHClient
)protected String javaPath
protected String schedulingPath
protected String targetOs
protected String javaOptions
protected File rmCredentialsPath
protected 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 Options, see SSHClient
parameters[5] : java path on the remote machines
parameters[6] : Scheduling path on remote machines
parameters[7] : target OS' type (Linux, Windows or Cygwin)
parameters[8] : extra java options
parameters[9] : rm credIllegalArgumentException
- 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