From 7f3bbe1dfe6606b62886c115f723a3acab2cee38 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Tue, 23 Feb 2016 23:20:43 -0500 Subject: [PATCH] AWS kube-up: Bump to the latest Jessie image, allow overriding Jessie image can be selected by name using AWS_IMAGE_NAME. This is a little easier than specifying the AMI ID. --- cluster/aws/jessie/util.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cluster/aws/jessie/util.sh b/cluster/aws/jessie/util.sh index bca02b36bca29..3af2f65ad4c41 100644 --- a/cluster/aws/jessie/util.sh +++ b/cluster/aws/jessie/util.sh @@ -30,10 +30,12 @@ function detect-jessie-image () { # TODO: publish on a k8s AWS account aws_account="721322707521" # TODO: we could use tags for the image - image_name="k8s-1.2-debian-jessie-amd64-hvm-2016-02-23-ebs" - AWS_IMAGE=`aws ec2 describe-images --owner ${aws_account} --filters Name=name,Values=${image_name} --query Images[].ImageId --output text` - if [[ -z "${AWS_IMAGE:-}" ]]; then - echo "Please specify AWS_IMAGE directly (image ${image_name} not found in region ${AWS_REGION})" + if [[ -z "${AWS_IMAGE_NAME:-}" ]]; then + AWS_IMAGE_NAME="k8s-1.2-debian-jessie-amd64-hvm-2016-02-24-ebs" + fi + AWS_IMAGE=`aws ec2 describe-images --owner ${aws_account} --filters Name=name,Values=${AWS_IMAGE_NAME} --query Images[].ImageId --output text` + if [[ -z "${AWS_IMAGE-}" ]]; then + echo "Please specify AWS_IMAGE directly (image ${AWS_IMAGE_NAME} not found in region ${AWS_REGION})" exit 1 fi fi