Merge pull request #21237 from justinsb/aws_jessie_support
AWS Debian Jessie Support
This commit is contained in:
@@ -22,60 +22,21 @@ source "${KUBE_ROOT}/cluster/aws/trusty/common.sh"
|
||||
SSH_USER=admin
|
||||
|
||||
# Detects the AMI to use for jessie (considering the region)
|
||||
# Source: https://wiki.debian.org/Cloud/AmazonEC2Image/Jessie
|
||||
#
|
||||
# Vars set:
|
||||
# AWS_IMAGE
|
||||
function detect-jessie-image () {
|
||||
if [[ -z "${AWS_IMAGE-}" ]]; then
|
||||
case "${AWS_REGION}" in
|
||||
ap-northeast-1)
|
||||
AWS_IMAGE=ami-e624fbe6
|
||||
;;
|
||||
|
||||
ap-southeast-1)
|
||||
AWS_IMAGE=ami-ac360cfe
|
||||
;;
|
||||
|
||||
ap-southeast-2)
|
||||
AWS_IMAGE=ami-bbc5bd81
|
||||
;;
|
||||
|
||||
eu-central-1)
|
||||
AWS_IMAGE=ami-02b78e1f
|
||||
;;
|
||||
|
||||
eu-west-1)
|
||||
AWS_IMAGE=ami-e31a6594
|
||||
;;
|
||||
|
||||
sa-east-1)
|
||||
AWS_IMAGE=ami-0972f214
|
||||
;;
|
||||
|
||||
us-east-1)
|
||||
AWS_IMAGE=ami-116d857a
|
||||
;;
|
||||
|
||||
us-west-1)
|
||||
AWS_IMAGE=ami-05cf2541
|
||||
;;
|
||||
|
||||
us-west-2)
|
||||
AWS_IMAGE=ami-818eb7b1
|
||||
;;
|
||||
|
||||
cn-north-1)
|
||||
AWS_IMAGE=ami-888815b1
|
||||
;;
|
||||
|
||||
us-gov-west-1)
|
||||
AWS_IMAGE=ami-35b5d516
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Please specify AWS_IMAGE directly (region ${AWS_REGION} not recognized)"
|
||||
exit 1
|
||||
esac
|
||||
# TODO: publish on a k8s AWS account
|
||||
aws_account="721322707521"
|
||||
# TODO: we could use tags for the image
|
||||
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
|
||||
}
|
||||
|
@@ -175,7 +175,9 @@ if [[ ${docker_storage} == "btrfs" ]]; then
|
||||
elif [[ ${docker_storage} == "aufs-nolvm" || ${docker_storage} == "aufs" ]]; then
|
||||
# Install aufs kernel module
|
||||
# Fix issue #14162 with extra-virtual
|
||||
apt-get-install linux-image-extra-$(uname -r) linux-image-extra-virtual
|
||||
if [[ `lsb_release -i -s` == 'Ubuntu' ]]; then
|
||||
apt-get-install linux-image-extra-$(uname -r) linux-image-extra-virtual
|
||||
fi
|
||||
|
||||
# Install aufs tools
|
||||
apt-get-install aufs-tools
|
||||
@@ -188,6 +190,9 @@ else
|
||||
fi
|
||||
|
||||
if [[ -n "${move_docker}" ]]; then
|
||||
# Stop docker if it is running, so we can move its files
|
||||
systemctl stop docker || true
|
||||
|
||||
# Move docker to e.g. /mnt
|
||||
# but only if it is a directory, not a symlink left over from a previous run
|
||||
if [[ -d /var/lib/docker ]]; then
|
||||
|
Reference in New Issue
Block a user