Examples of CloudDeployment


Examples of org.globus.workspace.cloud.meta.client.CloudDeployment

        print.getOpts().codeRemove(PrCodes.CREATE__GROUP_ID_PRINT);
        print.getOpts().codeRemove(PrCodes.ENSMONITOR__SINGLE_REPORT_NAMES);
        print.getOpts().codeRemove(PrCodes.CTXMONITOR__SINGLE_REPORT_NAMES);

        for (int i = 0; i < clouds.length; i++) {
            CloudDeployment cloud = clouds[i];
            final File cloudDir = new File(newdir,
                "cloud-" + cloud.getCloud().getName());
            final String cloudDirPath = cloudDir.getAbsolutePath();
            if (cloudDir.mkdir()) {
                print.debugln("Created directory: " + cloudDirPath);
            } else {
                throw new ExecutionProblem(
                    "Could not create directory '" + cloudDirPath + "'");
            }

            final RunTask[] runTasks = cloud.generateRunTasks(brokerContact,
                cloudDirPath, sshKeyPath, durationMinutes, print);
            final FutureTask[] futureTasks = new FutureTask[runTasks.length];
            for (int taskIndex = 0; taskIndex < futureTasks.length; taskIndex++) {
                futureTasks[taskIndex] = new FutureTask(runTasks[taskIndex]);
            }

            final String ensembleEprPath = runTasks[0].getEnsembleEprPath();

            final String identAuth = cloud.getCloud().getFactoryID();
            final String handle = cloud.getCloud().getName();

            print.infoln("\nLaunching "+handle+"...");

            try {
            startAllMembersWithBackout(futureTasks, ensembleEprPath,
                identAuth, handle, print);
            } catch (ExecutionProblem e) {
                destroyMultiCloudCluster(clouds, ensembleEprPaths, print);
                throw e;
            } catch (ExitNow e) {
                destroyMultiCloudCluster(clouds, ensembleEprPaths, print);
                throw e;
            }

            ensembleEprPaths[i] = ensembleEprPath;
        }

        print.infoln("\nWaiting for launch updates.");
         for (int i = 0; i < clouds.length; i++) {
            CloudDeployment cloud = clouds[i];
            final String ensembleEprPath = ensembleEprPaths[i];
            final String identAuth =  cloud.getCloud().getFactoryID();
            final String handle =  cloud.getCloud().getName();

            try {
            this.clusterMonitor(ensembleEprPath,
                identAuth,
                handle,
View Full Code Here

Examples of org.globus.workspace.cloud.meta.client.CloudDeployment

                "ensembleEprPaths arrays must match");
        }
        print.errln("\nProblem, attempting to destroy cluster.");

        for (int i=0; i<clouds.length; i++) {
            final CloudDeployment cloud = clouds[i];
            final String ensembleEprPath = ensembleEprPaths[i];

            if (ensembleEprPath == null) {
                continue;
    }

            final File f = new File(ensembleEprPath);
            if (!f.exists()) {
                continue;
            }

            final String handle = cloud.getCloud().getName();

            try {
            this.destroyCluster(ensembleEprPath,
                cloud.getCloud().getFactoryID(),
                handle,
                print);
            } catch (Throwable e) {
                print.errln("Failed to destroy '"+handle+"': "+e.toString());
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.