Skip to content

Commit

Permalink
AWS kube-up: Bump to the latest Jessie image, allow overriding
Browse files Browse the repository at this point in the history
Jessie image can be selected by name using AWS_IMAGE_NAME. This is a
little easier than specifying the AMI ID.
  • Loading branch information
justinsb committed Feb 24, 2016
1 parent 41e2a4b commit 7f3bbe1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cluster/aws/jessie/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7f3bbe1

Please sign in to comment.