Search in sources :

Example 26 with RMAuthentication

use of org.ow2.proactive.resourcemanager.authentication.RMAuthentication in project scheduling by ow2-proactive.

the class SchedulerStarter method addLocalNodes.

private static void addLocalNodes(RMAuthentication rmAuth, int numberLocalNodes, int nodeTimeoutValue) throws LoginException, KeyException, IOException {
    // creating default node source
    ResourceManager rman = rmAuth.login(Credentials.getCredentials(PAResourceManagerProperties.getAbsolutePath(PAResourceManagerProperties.RM_CREDS.getValueAsString())));
    // first im parameter is default rm url
    byte[] creds = FileToBytesConverter.convertFileToByteArray(new File(PAResourceManagerProperties.getAbsolutePath(PAResourceManagerProperties.RM_CREDS.getValueAsString())));
    rman.createNodeSource(NodeSource.DEFAULT_LOCAL_NODES_NODE_SOURCE_NAME, LocalInfrastructure.class.getName(), new Object[] { creds, numberLocalNodes, nodeTimeoutValue, "" }, RestartDownNodesPolicy.class.getName(), new Object[] { "ALL", "ALL", "10000" }, NodeSource.DEFAULT_LOCAL_NODES_NODE_SOURCE_RECOVERABLE);
    credentials = creds;
}
Also used : RestartDownNodesPolicy(org.ow2.proactive.resourcemanager.nodesource.policy.RestartDownNodesPolicy) LocalInfrastructure(org.ow2.proactive.resourcemanager.nodesource.infrastructure.LocalInfrastructure) ResourceManager(org.ow2.proactive.resourcemanager.frontend.ResourceManager) File(java.io.File)

Example 27 with RMAuthentication

use of org.ow2.proactive.resourcemanager.authentication.RMAuthentication in project scheduling by ow2-proactive.

the class RMProxy method init.

public synchronized void init() throws RMException, RMProxyCreationException {
    RMAuthentication auth = RMConnection.join(rmURL.toString());
    proxyActiveObject = RMProxyActiveObject.createAOProxy(auth, creds);
    currentRMConnection = new RMProxiesManager.Connection(rmURL, auth);
}
Also used : RMAuthentication(org.ow2.proactive.resourcemanager.authentication.RMAuthentication)

Aggregations

RMAuthentication (org.ow2.proactive.resourcemanager.authentication.RMAuthentication)17 Credentials (org.ow2.proactive.authentication.crypto.Credentials)16 ResourceManager (org.ow2.proactive.resourcemanager.frontend.ResourceManager)14 CredData (org.ow2.proactive.authentication.crypto.CredData)13 RMFunctionalTest (functionaltests.utils.RMFunctionalTest)7 PublicKey (java.security.PublicKey)7 Test (org.junit.Test)7 Node (org.objectweb.proactive.core.node.Node)6 JMXServiceURL (javax.management.remote.JMXServiceURL)5 LoginException (javax.security.auth.login.LoginException)5 File (java.io.File)4 HashMap (java.util.HashMap)4 MBeanServerConnection (javax.management.MBeanServerConnection)4 ObjectName (javax.management.ObjectName)4 JMXConnector (javax.management.remote.JMXConnector)4 ParseException (org.apache.commons.cli.ParseException)3 IOException (java.io.IOException)2 KeyException (java.security.KeyException)2 AttributeList (javax.management.AttributeList)2 CommandLine (org.apache.commons.cli.CommandLine)2