OW2 Consortium elastic-grid

Rev

Rev 498 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 498 Rev 501
Line 48... Line 48...
48
import java.util.concurrent.TimeoutException;
48
import java.util.concurrent.TimeoutException;
49
import java.util.logging.Level;
49
import java.util.logging.Level;
50
import java.util.logging.Logger;
50
import java.util.logging.Logger;
51

51

52
public class EC2CloudPlatformManager extends AbstractCloudPlatformManager<EC2Cluster> implements CloudPlatformManager<EC2Cluster> {
52
public class EC2CloudPlatformManager extends AbstractCloudPlatformManager<EC2Cluster> implements CloudPlatformManager<EC2Cluster> {
53
    private EC2Instantiator nodeInstantiator;
-
 
-
 
53
    private EC2NodeInstantiator nodeInstantiator;
54
    private EC2ClusterLocator clusterLocator;
54
    private EC2ClusterLocator clusterLocator;
55

55

56
    private String overridesBucket;
56
    private String overridesBucket;
57
    private String awsAccessID, awsSecretKey;
57
    private String awsAccessID, awsSecretKey;
58
    private boolean awsSecured = true;
58
    private boolean awsSecured = true;
Line 245... Line 245...
245
        for (Future future : futures) {
245
        for (Future future : futures) {
246
            future.get(5 * 60, TimeUnit.SECONDS);
246
            future.get(5 * 60, TimeUnit.SECONDS);
247
        }
247
        }
248
    }
248
    }
249

249

250
    public void setNodeInstantiator(EC2Instantiator nodeInstantiator) throws RemoteException {
-
 
251
        this.nodeInstantiator = nodeInstantiator;
-
 
-
 
250
    public void setNodeInstantiator(EC2NodeInstantiator nodeNodeInstantiator) throws RemoteException {
-
 
251
        this.nodeInstantiator = nodeNodeInstantiator;
252
        // ensure the Discovery.MONITOR group exists
252
        // ensure the Discovery.MONITOR group exists
253
        java.util.List<String> groupNames = nodeInstantiator.getGroupsNames();
-
 
-
 
253
        java.util.List<String> groupNames = nodeNodeInstantiator.getGroupsNames();
254
        if (!groupNames.contains(Discovery.MONITOR.getGroupName())) {
254
        if (!groupNames.contains(Discovery.MONITOR.getGroupName())) {
255
            nodeInstantiator.createSecurityGroup(Discovery.MONITOR.getGroupName());
-
 
-
 
255
            nodeNodeInstantiator.createSecurityGroup(Discovery.MONITOR.getGroupName());
256
        }
256
        }
257
        // ensure the Discovery.AGENT group exists
257
        // ensure the Discovery.AGENT group exists
258
        if (!groupNames.contains(Discovery.AGENT.getGroupName())) {
258
        if (!groupNames.contains(Discovery.AGENT.getGroupName())) {
259
            nodeInstantiator.createSecurityGroup(Discovery.AGENT.getGroupName());
-
 
-
 
259
            nodeNodeInstantiator.createSecurityGroup(Discovery.AGENT.getGroupName());
260
        }
260
        }
261
    }
261
    }
262

262

263
    public void setOverridesBucket(String overridesBucket) {
263
    public void setOverridesBucket(String overridesBucket) {
264
        this.overridesBucket = overridesBucket;
264
        this.overridesBucket = overridesBucket;