From 601c4eefe1e540029032fc93792a4b65537103cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benoi=CC=82t=20Sauve=CC=80re?= Date: Thu, 8 Jun 2017 12:08:17 +0200 Subject: [PATCH 1/6] Added travis ci file --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..2c19cf61 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +sudo: false + +language: groovy + +jdk: +- oraclejdk7 + +script: ./grailsw clean && yes | ./grailsw refresh-dependencies From 5866eb5e6d8fb516863dc7e2670d226af82eecaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benoi=CC=82t=20Sauve=CC=80re?= Date: Thu, 8 Jun 2017 12:12:32 +0200 Subject: [PATCH 2/6] Run the grails tests in the Travis CI flow --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2c19cf61..8312ffd6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,4 @@ language: groovy jdk: - oraclejdk7 -script: ./grailsw clean && yes | ./grailsw refresh-dependencies +script: ./grailsw clean && yes | ./grailsw refresh-dependencies && ./grailsw test-app From db09da2604496f29a7a0ceb3bddf1185cf69554d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benoi=CC=82t=20Sauve=CC=80re?= Date: Thu, 8 Jun 2017 13:23:04 +0200 Subject: [PATCH 3/6] Added ICE_HOME environment variable + Disabled tests --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8312ffd6..ac383008 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,10 @@ language: groovy jdk: - oraclejdk7 -script: ./grailsw clean && yes | ./grailsw refresh-dependencies && ./grailsw test-app +install: + - export ICE_HOME=${TRAVIS_BUILD_DIR} + - ./grailsw clean + - yes | ./grailsw refresh-dependencies + +script: + - ./grailsw compile \ No newline at end of file From f8c98521bec0fcd68b85389a1ffadce08feb25c8 Mon Sep 17 00:00:00 2001 From: Josh Rosen Date: Tue, 27 Sep 2016 14:09:34 -0700 Subject: [PATCH 4/6] Add GovCloud region and ap-northeast-2c AZ. --- .../com/netflix/ice/basic/BasicReservationService.java | 6 ++++++ .../ice/processor/ReservationCapacityPoller.java | 6 ++++++ src/java/com/netflix/ice/tag/Region.java | 3 +++ src/java/com/netflix/ice/tag/Zone.java | 10 +++++++++- 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/java/com/netflix/ice/basic/BasicReservationService.java b/src/java/com/netflix/ice/basic/BasicReservationService.java index c6fecaf0..54f828a5 100644 --- a/src/java/com/netflix/ice/basic/BasicReservationService.java +++ b/src/java/com/netflix/ice/basic/BasicReservationService.java @@ -145,6 +145,12 @@ private void pollAPI() throws Exception { AmazonEC2Client ec2Client = new AmazonEC2Client(AwsUtils.awsCredentialsProvider, AwsUtils.clientConfig); for (Region region: Region.getAllRegions()) { + // GovCloud uses different credentials than standard AWS, so you would need two separate + // sets of credentials if you wanted to poll for RIs in both environments. For now, we + // just ignore GovCloud here in order to prevent AuthFailure errors. + if (region == Region.US_GOV_WEST_1) { + continue; + } ec2Client.setEndpoint("ec2." + region.name + ".amazonaws.com"); do { if (!StringUtils.isEmpty(token)) diff --git a/src/java/com/netflix/ice/processor/ReservationCapacityPoller.java b/src/java/com/netflix/ice/processor/ReservationCapacityPoller.java index 8ab163b8..f07968f0 100644 --- a/src/java/com/netflix/ice/processor/ReservationCapacityPoller.java +++ b/src/java/com/netflix/ice/processor/ReservationCapacityPoller.java @@ -139,6 +139,12 @@ public String getSessionToken() { ec2Client = new AmazonEC2Client(AwsUtils.awsCredentialsProvider.getCredentials(), AwsUtils.clientConfig); for (Region region: Region.getAllRegions()) { + // GovCloud uses different credentials than standard AWS, so you would need two separate + // sets of credentials if you wanted to poll for RIs in both environments. For now, we + // just ignore GovCloud when polling for RIs in order to prevent AuthFailure errors. + if (region == Region.US_GOV_WEST_1) { + continue; + } ec2Client.setEndpoint("ec2." + region.name + ".amazonaws.com"); diff --git a/src/java/com/netflix/ice/tag/Region.java b/src/java/com/netflix/ice/tag/Region.java index 04c7ae43..861a96d2 100644 --- a/src/java/com/netflix/ice/tag/Region.java +++ b/src/java/com/netflix/ice/tag/Region.java @@ -29,6 +29,7 @@ public class Region extends Tag { public static final Region US_EAST_2 = new Region("us-east-2", "USE2"); public static final Region US_WEST_1 = new Region("us-west-1", "USW1"); public static final Region US_WEST_2 = new Region("us-west-2", "USW2"); + public static final Region US_GOV_WEST_1 = new Region("us-gov-west-1", "UGW1"); public static final Region EU_WEST_1 = new Region("eu-west-1", "EU"); public static final Region EU_WEST_2 = new Region("eu-west-2", "EUW2"); public static final Region EU_CENTRAL_1 = new Region("eu-central-1", "EUC1"); @@ -48,6 +49,7 @@ public class Region extends Tag { regionsByShortName.put(US_EAST_2.shortName, US_EAST_2); regionsByShortName.put(US_WEST_1.shortName, US_WEST_1); regionsByShortName.put(US_WEST_2.shortName, US_WEST_2); + regionsByShortName.put(US_GOV_WEST_1.shortName, US_GOV_WEST_1); regionsByShortName.put(EU_WEST_1.shortName, EU_WEST_1); regionsByShortName.put(EU_WEST_2.shortName, EU_WEST_2); regionsByShortName.put(EU_CENTRAL_1.shortName, EU_CENTRAL_1); @@ -63,6 +65,7 @@ public class Region extends Tag { regionsByName.put(US_EAST_2.name, US_EAST_2); regionsByName.put(US_WEST_1.name, US_WEST_1); regionsByName.put(US_WEST_2.name, US_WEST_2); + regionsByName.put(US_GOV_WEST_1.name, US_GOV_WEST_1); regionsByName.put(EU_WEST_1.name, EU_WEST_1); regionsByName.put(EU_WEST_2.name, EU_WEST_2); regionsByName.put(EU_CENTRAL_1.name, EU_CENTRAL_1); diff --git a/src/java/com/netflix/ice/tag/Zone.java b/src/java/com/netflix/ice/tag/Zone.java index df506da0..3294379e 100644 --- a/src/java/com/netflix/ice/tag/Zone.java +++ b/src/java/com/netflix/ice/tag/Zone.java @@ -52,6 +52,9 @@ private Zone (Region region, String name) { public static final Zone US_WEST_2B = new Zone(Region.US_WEST_2, "us-west-2b"); public static final Zone US_WEST_2C = new Zone(Region.US_WEST_2, "us-west-2c"); + public static final Zone US_GOV_WEST_1A = new Zone(Region.US_GOV_WEST_1, "us-gov-west-1a"); + public static final Zone US_GOV_WEST_1B = new Zone(Region.US_GOV_WEST_1, "us-gov-west-1b"); + public static final Zone EU_WEST_1A = new Zone(Region.EU_WEST_1, "eu-west-1a"); public static final Zone EU_WEST_1B = new Zone(Region.EU_WEST_1, "eu-west-1b"); public static final Zone EU_WEST_1C = new Zone(Region.EU_WEST_1, "eu-west-1c"); @@ -72,6 +75,7 @@ private Zone (Region region, String name) { public static final Zone AP_NORTHEAST_2A = new Zone(Region.AP_NORTHEAST_2, "ap-northeast-2a"); public static final Zone AP_NORTHEAST_2B = new Zone(Region.AP_NORTHEAST_2, "ap-northeast-2b"); + public static final Zone AP_NORTHEAST_2C = new Zone(Region.AP_NORTHEAST_2, "ap-northeast-2c"); public static final Zone AP_SOUTHEAST_1A = new Zone(Region.AP_SOUTHEAST_1, "ap-southeast-1a"); public static final Zone AP_SOUTHEAST_1B = new Zone(Region.AP_SOUTHEAST_1, "ap-southeast-1b"); @@ -108,6 +112,9 @@ private Zone (Region region, String name) { zonesByName.put(US_WEST_2B.name, US_WEST_2B); zonesByName.put(US_WEST_2C.name, US_WEST_2C); + zonesByName.put(US_GOV_WEST_1A.name, US_GOV_WEST_1A); + zonesByName.put(US_GOV_WEST_1B.name, US_GOV_WEST_1B); + zonesByName.put(EU_WEST_1A.name, EU_WEST_1A); zonesByName.put(EU_WEST_1B.name, EU_WEST_1B); zonesByName.put(EU_WEST_1C.name, EU_WEST_1C); @@ -128,6 +135,7 @@ private Zone (Region region, String name) { zonesByName.put(AP_NORTHEAST_2A.name, AP_NORTHEAST_2A); zonesByName.put(AP_NORTHEAST_2B.name, AP_NORTHEAST_2B); + zonesByName.put(AP_NORTHEAST_2C.name, AP_NORTHEAST_2C); zonesByName.put(AP_SOUTHEAST_1A.name, AP_SOUTHEAST_1A); zonesByName.put(AP_SOUTHEAST_1B.name, AP_SOUTHEAST_1B); @@ -176,4 +184,4 @@ public static List getZones(List names) { result.add(zonesByName.get(name)); return result; } -} \ No newline at end of file +} From 9a18cc1155ce53ec7619b027d9ca334c86fa4c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Sauv=C3=A8re?= Date: Tue, 4 Jul 2017 14:57:26 +0200 Subject: [PATCH 5/6] Added master branch status from Travis --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index d4f67930..9b379e61 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +# Ice +[![Build Status](https://travis-ci.org/Teevity/ice.svg?branch=master)](https://travis-ci.org/Teevity/ice) + ## Intro Ice provides a birds-eye view of our large and complex cloud landscape from a usage and cost perspective. Cloud resources are dynamically provisioned by dozens of service teams within the organization and any static snapshot of resource allocation has limited value. The ability to trend usage patterns on a global scale, yet decompose them down to a region, availability zone, or service team provides incredible flexibility. Ice allows us to quantify our AWS footprint and to make educated decisions regarding reservation purchases and reallocation of resources. From 782856d199d7cdb4444410ccb6a11bc430dcf170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benoi=CC=82t=20Sauve=CC=80re?= Date: Tue, 4 Jul 2017 15:10:36 +0200 Subject: [PATCH 6/6] Add eu-central-1c zone #252 --- src/java/com/netflix/ice/tag/Zone.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/java/com/netflix/ice/tag/Zone.java b/src/java/com/netflix/ice/tag/Zone.java index 3294379e..aa90ffa6 100644 --- a/src/java/com/netflix/ice/tag/Zone.java +++ b/src/java/com/netflix/ice/tag/Zone.java @@ -64,6 +64,7 @@ private Zone (Region region, String name) { public static final Zone EU_CENTRAL_1A = new Zone(Region.EU_CENTRAL_1, "eu-central-1a"); public static final Zone EU_CENTRAL_1B = new Zone(Region.EU_CENTRAL_1, "eu-central-1b"); + public static final Zone EU_CENTRAL_1C = new Zone(Region.EU_CENTRAL_1, "eu-central-1c"); public static final Zone SA_EAST_1A = new Zone(Region.SA_EAST_1, "sa-east-1a"); public static final Zone SA_EAST_1B = new Zone(Region.SA_EAST_1, "sa-east-1b"); @@ -124,6 +125,7 @@ private Zone (Region region, String name) { zonesByName.put(EU_CENTRAL_1A.name, EU_CENTRAL_1A); zonesByName.put(EU_CENTRAL_1B.name, EU_CENTRAL_1B); + zonesByName.put(EU_CENTRAL_1C.name, EU_CENTRAL_1C); zonesByName.put(SA_EAST_1A.name, SA_EAST_1A); zonesByName.put(SA_EAST_1B.name, SA_EAST_1B);