List of usage examples for com.amazonaws.services.elasticbeanstalk AWSElasticBeanstalk setEndpoint
@Deprecated
void setEndpoint(String endpoint);
From source file:fr.xebia.workshop.caching.CreateTomcat.java
License:Apache License
public static void main(String[] args) throws Exception { AWSCredentials awsCredentials = AmazonAwsUtils.loadAwsCredentials(); AWSElasticBeanstalk beanstalk = new AWSElasticBeanstalkClient(awsCredentials); beanstalk.setEndpoint("elasticbeanstalk.eu-west-1.amazonaws.com"); WorkshopInfrastructure workshopInfrastructure = new WorkshopInfrastructure() .withTeamIdentifiers("1" /*, "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"*/) .withAwsAccessKeyId(awsCredentials.getAWSAccessKeyId()) .withAwsSecretKey(awsCredentials.getAWSSecretKey()).withKeyPairName("web-caching-workshop") .withBeanstalkNotificationEmail("cleclerc@xebia.fr"); CreateTomcat createTomcat = new CreateTomcat(beanstalk, workshopInfrastructure); createTomcat.createServers();/*from ww w . j a v a 2 s . c o m*/ }
From source file:fr.xebia.workshop.caching.WorkshopInfrastructureCreator.java
License:Apache License
public static void main(String[] args) { // AMAZON SERVICES AWSCredentials awsCredentials = AmazonAwsUtils.loadAwsCredentials(); AmazonEC2 ec2 = new AmazonEC2Client(awsCredentials); ec2.setEndpoint("ec2.eu-west-1.amazonaws.com"); AWSElasticBeanstalk beanstalk = new AWSElasticBeanstalkClient(awsCredentials); beanstalk.setEndpoint("elasticbeanstalk.eu-west-1.amazonaws.com"); AmazonRoute53 route53 = new AmazonRoute53Client(awsCredentials); ExecutorService executor = Executors.newFixedThreadPool(3); // WORKSHOP CONFIGURATION WorkshopInfrastructure workshopInfrastructure = new WorkshopInfrastructure() .withTeamIdentifiers("1", "2" /*, "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" */) .withAwsAccessKeyId(awsCredentials.getAWSAccessKeyId()) .withAwsSecretKey(awsCredentials.getAWSSecretKey()).withKeyPairName("web-caching-workshop") .withBeanstalkNotificationEmail("cleclerc@xebia.fr"); // CREATE WORKSHOP INFRASTRUCTURE CreateCachingProxyServers createCachingProxyServers = new CreateCachingProxyServers(ec2, route53, workshopInfrastructure);//w ww. j a v a 2s. c om executor.execute(createCachingProxyServers); CreateTomcat createTomcat = new CreateTomcat(beanstalk, workshopInfrastructure); executor.execute(createTomcat); executor.shutdown(); try { executor.awaitTermination(10, TimeUnit.MINUTES); } catch (Exception e) { e.printStackTrace(); } logger.info("Workshop infrastructure created"); }
From source file:fr.xebia.workshop.nginx.CreateTomcat.java
License:Apache License
public static void main(String[] args) throws Exception { AWSCredentials awsCredentials = AmazonAwsUtils.loadAwsCredentials(); AWSElasticBeanstalk beanstalk = new AWSElasticBeanstalkClient(awsCredentials); beanstalk.setEndpoint("elasticbeanstalk.eu-west-1.amazonaws.com"); WorkshopInfrastructure workshopInfrastructure = new WorkshopInfrastructure() .withTeamIdentifiers("1"/*, "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"*/) .withAwsAccessKeyId(awsCredentials.getAWSAccessKeyId()) .withAwsSecretKey(awsCredentials.getAWSSecretKey()).withKeyPairName("nginx-workshop") .withBeanstalkNotificationEmail("slemesle@xebia.fr"); CreateTomcat createTomcat = new CreateTomcat(beanstalk, workshopInfrastructure); createTomcat.createServers();//from www.j a v a 2 s.c o m }