Package voldemort.utils.impl

Examples of voldemort.utils.impl.TypicaEc2Connection


                                                                                  "DEFAULT"));
        } catch(Exception e) {
            printUsage();
        }

        Ec2Connection ec2Connection = new TypicaEc2Connection(accessId, secretKey, null, regionUrl);
        List<HostNamePair> hostNamePairs = ec2Connection.createInstances(ami,
                                                                         keypairId,
                                                                         instanceType,
                                                                         instanceCount,
                                                                         securityGroupsList);
View Full Code Here


        OptionSet options = parse(args);
        String accessId = getAccessId(options);
        String secretKey = getSecretKey(options);
        String regionUrl = getRegionUrl(options);

        Ec2Connection ec2Connection = new TypicaEc2Connection(accessId, secretKey, null, regionUrl);

        List<String> hostNames = new ArrayList<String>();
        File hostNamesFile = getInputFile(options, "hostnames");
        File instancesFile = getInputFile(options, "instances");

        if(hostNamesFile == null && instancesFile == null)
            printUsage();

        if(hostNamesFile != null) {
            List<HostNamePair> hostNamePairs = getHostNamesPairsFromFile(hostNamesFile);

            for(HostNamePair hostNamePair: hostNamePairs)
                hostNames.add(hostNamePair.getExternalHostName());

            ec2Connection.deleteInstancesByHostName(hostNames);
        }

        if(instancesFile != null) {
            List<String> instanceIds = FileUtils.readLines(instancesFile);
            ec2Connection.deleteInstancesByInstanceId(instanceIds);
        }
    }
View Full Code Here

    }

    public static List<HostNamePair> createInstances(int instanceCount,
                                                     Ec2RemoteTestConfig ec2Config)
            throws Exception {
        Ec2Connection ec2 = new TypicaEc2Connection(ec2Config.getAccessId(),
                                                    ec2Config.getSecretKey(),
                                                    new Ec2Listener(ec2Config.getInstanceIdFile()),
                                                    null);
        return ec2.createInstances(ec2Config.getAmi(),
                                   ec2Config.getKeyPairId(),
                                   Ec2Connection.Ec2InstanceType.DEFAULT,
                                   instanceCount,
                                   null);
View Full Code Here

    }

    public static void destroyInstances(List<String> hostNames, Ec2RemoteTestConfig ec2Config)
            throws Exception {
        Ec2Connection ec2 = new TypicaEc2Connection(ec2Config.getAccessId(),
                                                    ec2Config.getSecretKey(),
                                                    new Ec2Listener(ec2Config.getInstanceIdFile()),
                                                    null);
        ec2.deleteInstancesByHostName(hostNames);
    }
View Full Code Here

                                                    null);
        ec2.deleteInstancesByHostName(hostNames);
    }

    public static List<HostNamePair> listInstances(Ec2RemoteTestConfig ec2Config) throws Exception {
        Ec2Connection ec2 = new TypicaEc2Connection(ec2Config.getAccessId(),
                                                    ec2Config.getSecretKey());
        return ec2.list();
    }
View Full Code Here

TOP

Related Classes of voldemort.utils.impl.TypicaEc2Connection

Copyright © 2018 www.massapicom. 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.