AWS kube-up: remove support for vivid

Vivid is EOL, and Docker is no longer packaged for it.

Remove support for it in 1.3 (in 1.2 we had warned users it was EOL).

Also remove unused wheezy, trusty & coreos & do general cleanup.
This commit is contained in:
Justin Santa Barbara 2016-06-18 17:00:48 -04:00
parent a82bcfd58f
commit b8112beb34
11 changed files with 8 additions and 518 deletions

View File

@ -1,182 +0,0 @@
#cloud-config
coreos:
units:
- name: kubernetes-install-rkt.service
command: start
content: |
[Unit]
Description=Fetch rkt
Documentation=http://github.com/coreos/rkt
Requires=network-online.target
After=network-online.target
[Service]
Type=oneshot
EnvironmentFile=/etc/kube-env
ExecStartPre=/usr/bin/mkdir -p /opt/rkt
ExecStartPre=/usr/bin/wget \
-O /opt/rkt/rkt-v${RKT_VERSION}.tar.gz \
https://github.com/coreos/rkt/releases/download/v${RKT_VERSION}/rkt-v${RKT_VERSION}.tar.gz
ExecStart=/usr/bin/tar xzvf /opt/rkt/rkt-v${RKT_VERSION}.tar.gz -C /opt --overwrite
- name: hostname-override.service
command: start
content: |
[Unit]
Description=Kubelet Hostname Override
Requires=network-online.target
After=network-online.target
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/kube-env
ExecStart=/run/setup-hostname-override.sh
- name: kubernetes-install-minion.service
command: start
content: |
[Unit]
Description=Install Kubernetes Server
Requires=network-online.target
After=network-online.target
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/kube-env
ExecStartPre=/usr/bin/mkdir -p /opt/kubernetes/pkg
ExecStartPre=/usr/bin/curl --location --create-dirs --output /opt/kubernetes/pkg/kubernetes-server-linux-amd64.tar.gz ${SERVER_BINARY_TAR_URL}
ExecStart=/usr/bin/tar xf /opt/kubernetes/pkg/kubernetes-server-linux-amd64.tar.gz -C /opt --overwrite
- name: kubelet.service
command: start
content: |
[Unit]
Description=Run Kubelet service
Requires=kubernetes-install-minion.service
After=kubernetes-install-minion.service
Requires=hostname-override.service
After=hostname-override.service
[Service]
EnvironmentFile=/etc/kube-env
EnvironmentFile=/etc/hostname-override
ExecStartPre=/usr/bin/mkdir -p /etc/kubernetes/manifests
ExecStartPre=/run/setup-auth.sh
ExecStart=/opt/kubernetes/server/bin/kubelet \
--api-servers=https://${MASTER_IP} \
--config=/etc/kubernetes/manifests \
--allow-privileged=False \
--v=2 \
--cluster-dns=10.0.0.10 \
--cluster-domain=${DNS_DOMAIN} \
--logtostderr=true \
--hostname-override=${HOSTNAME_OVERRIDE} \
--container-runtime=${KUBERNETES_CONTAINER_RUNTIME}
Restart=always
RestartSec=10
KillMode=process
- name: kube-proxy.service
command: start
content: |
[Unit]
Description=Start Kube-proxy service as Daemon
Requires=kubernetes-install-minion.service
After=kubernetes-install-minion.service
Requires=kubernetes-install-rkt.service
After=kubernetes-install-rkt.service
[Service]
EnvironmentFile=/etc/kube-env
ExecStartPre=/run/config-kube-proxy.sh
ExecStart=/opt/kubernetes/server/bin/kube-proxy \
--master=https://${MASTER_IP} \
--kubeconfig=/var/lib/kube-proxy/kubeconfig \
--v=2 \
--logtostderr=true \
--hostname-override=${HOSTNAME_OVERRIDE}
Restart=always
RestartSec=10
- name: rkt-metadata.socket
command: start
content: |
[Unit]
Description=rkt metadata service socket
PartOf=rkt-metadata.service
Requires=kubernetes-install-rkt.service
After=kubernetes-install-rkt.service
[Socket]
ListenStream=/run/rkt/metadata-svc.sock
SocketMode=0660
SocketUser=root
SocketGroup=root
RemoveOnStop=true
- name: rkt-metadata.service
command: start
content: |
[Unit]
Description=rkt metadata service
Documentation=http://github.com/coreos/rkt
Requires=rkt-metadata.socket
After=network.target rkt-metadata.socket
Requires=kubernetes-install-rkt.service
After=kubernetes-install-rkt.service
[Service]
EnvironmentFile=/etc/kube-env
ExecStart=/opt/rkt-${RKT_VERSION}/rkt metadata-service
write_files:
- path: /run/setup-hostname-override.sh
permissions: "0755"
content: |
#!/bin/bash
set -x
source /etc/kube-env
if [[ -z "${HOSTNAME_OVERRIDE}" ]]; then
HOSTNAME_OVERRIDE=`curl --silent http://169.254.169.254/2007-01-19/meta-data/local-hostname`
fi
if [[ -z "${HOSTNAME_OVERRIDE}" ]]; then
HOSTNAME_OVERRIDE=`hostname -f`
fi
echo "HOSTNAME_OVERRIDE=${HOSTNAME_OVERRIDE}" > /etc/hostname-override
- path: /run/setup-auth.sh
permissions: "0755"
content: |
#!/bin/bash -e
set -x
source /etc/kube-env
/usr/bin/mkdir -p /var/lib/kubelet
printf '{"BearerToken": "%s", "Insecure": true }' ${KUBE_BEARER_TOKEN} > /var/lib/kubelet/kubernetes_auth
- path: /run/config-kube-proxy.sh
permissions: "0755"
content: |
#!/bin/bash -e
set -x
source /etc/kube-env
/usr/bin/mkdir -p /var/lib/kube-proxy
cat > /var/lib/kube-proxy/kubeconfig << EOF
apiVersion: v1
kind: Config
users:
- name: kube-proxy
user:
token: $KUBE_PROXY_TOKEN
clusters:
- name: local
cluster:
insecure-skip-tls-verify: true
contexts:
- context:
cluster: local
user: kube-proxy
name: service-account-context
current-context: service-account-context
EOF
- path: /etc/kube-env
permissions: 0644
owner: root
content: |

View File

@ -1,55 +0,0 @@
#!/bin/bash
# Copyright 2015 The Kubernetes Authors All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# A library of helper functions for CoreOS.
SSH_USER=core
function detect-minion-image (){
if [[ -z "${KUBE_NODE_IMAGE-}" ]]; then
KUBE_NODE_IMAGE=$(curl -s -L http://${COREOS_CHANNEL}.release.core-os.net/amd64-usr/current/coreos_production_ami_all.json | python -c "import json,sys;obj=json.load(sys.stdin);print filter(lambda t: t['name']=='${AWS_REGION}', obj['amis'])[0]['hvm']")
fi
if [[ -z "${KUBE_NODE_IMAGE-}" ]]; then
echo "unable to determine KUBE_NODE_IMAGE"
exit 2
fi
}
function generate-minion-user-data() {
# this is a bit of a hack. We make all of our "variables" in
# our cloud config controlled by env vars from this script
cat ${KUBE_ROOT}/cluster/aws/coreos/node.yaml
cat <<EOF
ENV_TIMESTAMP=$(yaml-quote $(date -u +%Y-%m-%dT%T%z))
INSTANCE_PREFIX=$(yaml-quote ${INSTANCE_PREFIX})
SERVER_BINARY_TAR_URL=$(yaml-quote ${SERVER_BINARY_TAR_URL})
ENABLE_CLUSTER_DNS=$(yaml-quote ${ENABLE_CLUSTER_DNS:-false})
DNS_SERVER_IP=$(yaml-quote ${DNS_SERVER_IP:-})
DNS_DOMAIN=$(yaml-quote ${DNS_DOMAIN:-})
MASTER_IP=$(yaml-quote ${MASTER_INTERNAL_IP})
KUBELET_TOKEN=$(yaml-quote ${KUBELET_TOKEN:-})
KUBE_PROXY_TOKEN=$(yaml-quote ${KUBE_PROXY_TOKEN:-})
KUBE_BEARER_TOKEN=$(yaml-quote ${KUBELET_TOKEN:-})
KUBERNETES_CONTAINER_RUNTIME=$(yaml-quote ${CONTAINER_RUNTIME})
RKT_VERSION=$(yaml-quote ${RKT_VERSION})
EOF
}
function check-minion() {
echo "working"
}

View File

@ -17,7 +17,7 @@
# A library of helper functions for Jessie.
source "${KUBE_ROOT}/cluster/aws/trusty/common.sh"
source "${KUBE_ROOT}/cluster/aws/common/common.sh"
SSH_USER=admin

View File

@ -88,7 +88,11 @@ Supported options:
debian-LTS team.
* `wily`: Ubuntu Wily. Wily is not an LTS release, and OS support is due to
end in July 2016.
No longer supported as of 1.3:
* `vivid`: Ubuntu Vivid. Vivid OS support ended in early February 2016.
Docker no longer provides packages for vivid.
Given the support situation, we recommend using Debian Jessie. In Kubernetes
1.3 Ubuntu should have their next LTS release out, so we should be able to

View File

@ -1,22 +0,0 @@
#!/bin/bash
# Copyright 2015 The Kubernetes Authors All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
source "${KUBE_ROOT}/cluster/aws/trusty/common.sh"
# TODO: Move image detection in here once it is no longer shared with CoreOS
SSH_USER=ubuntu

View File

@ -65,10 +65,8 @@ case "${OS_DISTRIBUTION}" in
wily)
;;
vivid)
echo "vivid is currently end-of-life and does not get updates." >&2
echo "Please consider using wily or jessie instead" >&2
echo "(will continue in 10 seconds)" >&2
sleep 10
echo "vivid is no longer supported by kube-up; please use jessie instead" >&2
exit 2
;;
coreos)
echo "coreos is no longer supported by kube-up; please use jessie instead" >&2
@ -328,18 +326,9 @@ function detect-security-groups {
# AWS_IMAGE
function detect-image () {
case "${OS_DISTRIBUTION}" in
trusty|coreos)
detect-trusty-image
;;
vivid)
detect-vivid-image
;;
wily)
detect-wily-image
;;
wheezy)
detect-wheezy-image
;;
jessie)
detect-jessie-image
;;
@ -350,72 +339,6 @@ case "${OS_DISTRIBUTION}" in
esac
}
# Detects the AMI to use for trusty (considering the region)
# Used by CoreOS & Ubuntu
#
# Vars set:
# AWS_IMAGE
function detect-trusty-image () {
# This is the ubuntu 14.04 image for <region>, amd64, hvm:ebs-ssd
# See here: http://cloud-images.ubuntu.com/locator/ec2/ for other images
# This will need to be updated from time to time as amis are deprecated
if [[ -z "${AWS_IMAGE-}" ]]; then
case "${AWS_REGION}" in
ap-northeast-1)
AWS_IMAGE=ami-93876e93
;;
ap-northeast-2)
AWS_IMAGE=ami-62ac620c
;;
ap-southeast-1)
AWS_IMAGE=ami-66546234
;;
eu-central-1)
AWS_IMAGE=ami-e2a694ff
;;
eu-west-1)
AWS_IMAGE=ami-d7fd6ea0
;;
sa-east-1)
AWS_IMAGE=ami-a357eebe
;;
us-east-1)
AWS_IMAGE=ami-6089d208
;;
us-west-1)
AWS_IMAGE=ami-cf7d998b
;;
cn-north-1)
AWS_IMAGE=ami-d436a4ed
;;
us-gov-west-1)
AWS_IMAGE=ami-01523322
;;
ap-southeast-2)
AWS_IMAGE=ami-cd4e3ff7
;;
us-west-2)
AWS_IMAGE=ami-3b14370b
;;
*)
echo "Please specify AWS_IMAGE directly (region ${AWS_REGION} not recognized)"
exit 1
esac
fi
}
# Detects the RootDevice to use in the Block Device Mapping (considering the AMI)
#
# Vars set:

View File

@ -1,87 +0,0 @@
#!/bin/bash
# Copyright 2015 The Kubernetes Authors All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
source "${KUBE_ROOT}/cluster/aws/trusty/common.sh"
SSH_USER=ubuntu
# Detects the AMI to use for ubuntu (considering the region)
#
# Vars set:
# AWS_IMAGE
function detect-vivid-image () {
# This is the ubuntu 15.04 image for <region>, amd64, hvm:ebs-ssd
# See here: http://cloud-images.ubuntu.com/locator/ec2/ for other images
# This will need to be updated from time to time as amis are deprecated
if [[ -z "${AWS_IMAGE-}" ]]; then
case "${AWS_REGION}" in
ap-northeast-1)
AWS_IMAGE=ami-ee023e80
;;
ap-northeast-2)
AWS_IMAGE=ami-c2df11ac
;;
ap-southeast-1)
AWS_IMAGE=ami-7ad91519
;;
eu-central-1)
AWS_IMAGE=ami-9c7960f0
;;
eu-west-1)
AWS_IMAGE=ami-6a379c19
;;
sa-east-1)
AWS_IMAGE=ami-7d49c811
;;
us-east-1)
AWS_IMAGE=ami-b5bd98df
;;
us-west-1)
AWS_IMAGE=ami-b30571d3
;;
cn-north-1)
AWS_IMAGE=ami-4c7ab321
;;
#us-gov-west-1)
# AWS_IMAGE=?Not available?
# ;;
ap-southeast-2)
AWS_IMAGE=ami-d11431b2
;;
us-west-2)
AWS_IMAGE=ami-58a2b839
;;
*)
echo "Please specify AWS_IMAGE directly (region ${AWS_REGION} not recognized)"
exit 1
esac
fi
}

View File

@ -1,81 +0,0 @@
#!/bin/bash
# Copyright 2015 The Kubernetes Authors All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# A library of helper functions for Wheezy.
source "${KUBE_ROOT}/cluster/aws/trusty/common.sh"
SSH_USER=admin
# Detects the AMI to use for wheezy (considering the region)
# Source: https://wiki.debian.org/Cloud/AmazonEC2Image/Wheezy
#
# Vars set:
# AWS_IMAGE
function detect-wheezy-image () {
if [[ -z "${AWS_IMAGE-}" ]]; then
case "${AWS_REGION}" in
ap-northeast-1)
AWS_IMAGE=ami-b25d44b3
;;
ap-southeast-1)
AWS_IMAGE=ami-aeb49ffc
;;
ap-southeast-2)
AWS_IMAGE=ami-6b770351
;;
eu-central-1)
AWS_IMAGE=ami-98043785
;;
eu-west-1)
AWS_IMAGE=ami-61e56916
;;
sa-east-1)
AWS_IMAGE=ami-3d8b3720
;;
us-east-1)
AWS_IMAGE=ami-e0efab88
;;
us-west-1)
AWS_IMAGE=ami-b4869ff1
;;
us-west-2)
AWS_IMAGE=ami-431a4273
;;
us-gov-west-1)
AWS_IMAGE=ami-d13455f2
;;
cn-north-1)
AWS_IMAGE=ami-48029071
;;
*)
echo "Please specify AWS_IMAGE directly (region ${AWS_REGION} not recognized)"
exit 1
esac
fi
}

View File

@ -15,7 +15,7 @@
# limitations under the License.
source "${KUBE_ROOT}/cluster/aws/trusty/common.sh"
source "${KUBE_ROOT}/cluster/aws/common/common.sh"
SSH_USER=ubuntu

View File

@ -243,16 +243,6 @@ net.ipv4.ip_forward:
{% set override_deb_url='http://apt.dockerproject.org/repo/pool/main/d/docker-engine/docker-engine_1.11.2-0~trusty_amd64.deb' %}
{% set override_deb_sha1='022dee31e68c6d572eaac750915786e4a6729d2a' %}
{% elif grains.get('cloud', '') == 'aws'
and grains.get('os_family', '') == 'Debian'
and grains.get('oscodename', '') == 'vivid' -%}
# TODO: Get from google storage?
{% set docker_pkg_name='docker-engine' %}
{% set override_docker_ver='1.9.1-0~vivid' %}
{% set override_deb='docker-engine_1.9.1-0~vivid_amd64.deb' %}
{% set override_deb_url='http://apt.dockerproject.org/repo/pool/main/d/docker-engine/docker-engine_1.9.1-0~vivid_amd64.deb' %}
{% set override_deb_sha1='81741f6f16630632de53762c5554238d57b3b9cb' %}
{% elif grains.get('cloud', '') == 'aws'
and grains.get('os_family', '') == 'Debian'
and grains.get('oscodename', '') == 'wily' -%}