diff --git a/README.md b/README.md index f2efa56..4217bff 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Since the application is designed to work in a PaaS environment, all configurati | Key | Description | --- | ----------- -| `_PROBABILITY` | The probability for a given deployment or job, overriding the default. For example, `REDIS_PROBABILITY` set to `0.3` means that VMs in the `redis` job will be destroyed more often than a default VM. +| ` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -93,41 +98,41 @@ - - - - - + + + + + - + - + - + - - + + - + - - - - - - + + + + + + @@ -138,4 +143,4 @@ - + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 073b8e6..690f3b8 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ org.springframework.boot spring-boot-starter-parent - 1.2.5.RELEASE + 1.2.6.RELEASE io.pivotal.strepsirrhini @@ -35,7 +35,7 @@ jar - 1.10.5.1 + 1.10.26 1.2.1 1.8 5.1 diff --git a/src/main/java/io/pivotal/strepsirrhini/chaoslemur/infrastructure/InfrastructureConfiguration.java b/src/main/java/io/pivotal/strepsirrhini/chaoslemur/infrastructure/InfrastructureConfiguration.java index c8403c4..08e16c3 100644 --- a/src/main/java/io/pivotal/strepsirrhini/chaoslemur/infrastructure/InfrastructureConfiguration.java +++ b/src/main/java/io/pivotal/strepsirrhini/chaoslemur/infrastructure/InfrastructureConfiguration.java @@ -17,6 +17,8 @@ package io.pivotal.strepsirrhini.chaoslemur.infrastructure; import com.amazonaws.auth.BasicAWSCredentials; +import com.amazonaws.regions.Region; +import com.amazonaws.regions.Regions; import com.amazonaws.services.ec2.AmazonEC2; import com.amazonaws.services.ec2.AmazonEC2Client; import org.springframework.beans.factory.annotation.Value; @@ -33,8 +35,14 @@ class InfrastructureConfiguration { @Bean @ConditionalOnProperty("aws.accessKeyId") AmazonEC2 amazonEC2(@Value("${aws.accessKeyId}") String accessKeyId, - @Value("${aws.secretAccessKey}") String secretAccessKey) { - return new AmazonEC2Client(new BasicAWSCredentials(accessKeyId, secretAccessKey)); + @Value("${aws.secretAccessKey}") String secretAccessKey, + @Value("${aws.region:us-east-1}") String regionName) { + + AmazonEC2Client amazonEC2Client = new AmazonEC2Client(new BasicAWSCredentials(accessKeyId, secretAccessKey)); + Region region = Region.getRegion(Regions.fromName(regionName)); + amazonEC2Client.setEndpoint(region.getServiceEndpoint("ec2")); + + return amazonEC2Client; } @Bean