From 39b4a18e9ea0b046caef4c32c289124f4c4eb363 Mon Sep 17 00:00:00 2001 From: Alexander Patrikalakis Date: Wed, 18 Jul 2018 06:22:59 -0700 Subject: [PATCH] [skip ci] Use AL2 in CloudFormation script (fixes #279) --- dynamodb-janusgraph-storage-backend-cfn.yaml | 88 +++++++++----------- src/test/resources/get-recent-al-amis.sh | 6 +- 2 files changed, 42 insertions(+), 52 deletions(-) diff --git a/dynamodb-janusgraph-storage-backend-cfn.yaml b/dynamodb-janusgraph-storage-backend-cfn.yaml index dd17080..2563467 100644 --- a/dynamodb-janusgraph-storage-backend-cfn.yaml +++ b/dynamodb-janusgraph-storage-backend-cfn.yaml @@ -2,61 +2,55 @@ Description: This stack creates a VPC, an EC2 Amazon Linux host in the VPC with a Public IP, and deploys Gremlin Server on it. **WARNING** This template creates an Amazon EC2 instance. You will be billed for the AWS resources used if you - create a stack from this template. + create a stack from this template. Uses 2018-06-22 AL2 and HVM virts only. AWSTemplateFormatVersion: '2010-09-09' Mappings: AWSRegionArch2AMI: - ap-south-1: - HVMG2: ami-52c7b43d - HVM64: ami-f5c6b59a - eu-west-2: - HVMG2: ami-b6daced2 - HVM64: ami-b7daced3 - eu-west-1: - HVMG2: ami-01ccc867 - PV64: ami-d1c0c4b7 - HVM64: ami-d3c0c4b5 - ap-northeast-2: - HVM64: ami-9a15c7f4 - HVMG2: ami-9d15c7f3 ap-northeast-1: - PV64: ami-30391657 - HVM64: ami-6a3b140d - HVMG2: ami-923d12f5 - sa-east-1: - HVM64: ami-2bccae47 - PV64: ami-36cfad5a - HVMG2: ami-37cfad5b - ca-central-1: - HVMG2: ami-0bd66a6f - HVM64: ami-73d06c17 + HVMG2: ami-e99f4896 + HVM64: ami-ef9e4990 + ap-northeast-2: + HVM64: ami-66c67308 + HVMG2: ami-afd86dc1 + ap-south-1: + HVM64: ami-cf82a8a0 + HVMG2: ami-d783a9b8 ap-southeast-1: - PV64: ami-ab5ce5c8 - HVM64: ami-b65de4d5 - HVMG2: ami-fc5ae39f + HVMG2: ami-05868579 + HVM64: ami-838685ff ap-southeast-2: - HVMG2: ami-162c2575 - HVM64: ami-762a2315 - PV64: ami-af2128cc + HVMG2: ami-39f8215b + HVM64: ami-7bf82119 + ca-central-1: + HVMG2: ami-0ee86a6a + HVM64: ami-72e96b16 eu-central-1: - HVM64: ami-506fbd3f - HVMG2: ami-b968bad6 - PV64: ami-ba68bad5 + HVMG2: ami-7c4f7097 + HVM64: ami-e2526d09 + eu-west-1: + HVMG2: ami-466768ac + HVM64: ami-776a659d + eu-west-2: + HVM64: ami-a4b950c3 + HVMG2: ami-b8b45ddf + eu-west-3: + HVM64: ami-2af54557 + HVMG2: ami-2cf54551 + sa-east-1: + HVMG2: ami-6dca9001 + HVM64: ami-a3c892cf us-east-1: - PV64: ami-668f1e70 - HVMG2: ami-c58c1dd3 - HVM64: ami-fd8617eb + HVM64: ami-7105540e + HVMG2: ami-b70554c8 us-east-2: - HVMG2: ami-4191b524 - HVM64: ami-6693b703 + HVMG2: ami-8c122be9 + HVM64: ami-d80c35bd us-west-1: - PV64: ami-0f85a06f - HVMG2: ami-7a85a01a - HVM64: ami-f887a298 + HVM64: ami-57876134 + HVMG2: ami-e0ba5c83 us-west-2: - HVM64: ami-3234a652 - HVMG2: ami-4836a428 - PV64: ami-c737a5a7 + HVMG2: ami-a9d09ed1 + HVM64: ami-bdd09ec5 AWSInstanceType2Arch: t2.nano: Arch: HVM64 @@ -562,11 +556,7 @@ Resources: - - "#!/bin/bash\n" - "export SDKMAN_DIR=/usr/local/sdkman && curl -s https://get.sdkman.io | bash && source /usr/local/sdkman/bin/sdkman-init.sh\n" - "echo 'export SDKMAN_DIR=/usr/local/sdkman; source /usr/local/sdkman/bin/sdkman-init.sh' > /etc/profile.d/sdkman.sh\n" - - "yum update -y -q -e 0 && yum upgrade -y -q -e 0 && yum install -y java-1.8.0-openjdk > /home/ec2-user/yumupdates.log\n" - - "yum remove -y java-1.7.0-openjdk > /home/ec2-user/yumremovejava7.log\n" - - "java -version > /home/ec2-user/java-version-before-sdkmvn.log\n" - - "sdk install java < /dev/null\n" - - "sdk current java > /home/ec2-user/java-version-from-sdkman.log\n" + - "yum update -y -q -e 0 && yum upgrade -y -q -e 0 && yum install -y -q java-1.8.0-openjdk-devel wget gpg zip unzip > /home/ec2-user/yumupdates.log\n" - "sdk install maven < /dev/null && set -x\n" - "mvn -version > /home/ec2-user/maven-installation-settings.log\n" - "export GREMLIN_SERVER_USERNAME='ec2-user'\n" diff --git a/src/test/resources/get-recent-al-amis.sh b/src/test/resources/get-recent-al-amis.sh index fab2889..68dd96e 100755 --- a/src/test/resources/get-recent-al-amis.sh +++ b/src/test/resources/get-recent-al-amis.sh @@ -17,13 +17,13 @@ LATER_THAN_DATE=$1 -aws ec2 describe-regions --query 'Regions[*].[RegionName]' | sed -e '/\[/d' -e '/\]/d' -e "s/^[ \t]*//" | sed 's/\"//g' | while read region; do +aws ec2 describe-regions --query 'Regions[*].[RegionName]' | sed -e '/\[/d' -e '/\]/d' -e "s/^[ \t]*//" | sed 's/\"//g' | sort | while read region; do echo " ${region}:" aws ec2 describe-images \ --region ${region} \ --owners amazon \ - --filters "Name=root-device-type,Values=ebs" "Name=name,Values=amzn-ami-*" \ - --query 'Images[? CreationDate > `'${LATER_THAN_DATE}'` && !contains(Name, `minimal`) && !contains(Name, `nat`)].[ImageId, ImageLocation]' |\ + --filters "Name=root-device-type,Values=ebs" "Name=name,Values=amzn2-ami*" \ + --query 'Images[? CreationDate > `'${LATER_THAN_DATE}'` && !contains(Name, `minimal`) && !contains(Name, `dotnetcore`) && !contains(Name, `nat`)].[ImageId, ImageLocation]' |\ grep "\"" |\ sed -e 's/^[ ]*\(.*\)[ ]*$/\1/' -e '/\"$/s/$/%/' |\ tr "\n" "@" |\