From 878684a49f034d98351ed3bcef55f149be9c2260 Mon Sep 17 00:00:00 2001 From: Brad Moylan Date: Wed, 10 Aug 2016 16:16:36 -0700 Subject: [PATCH 1/3] Fix docker download location in CentOS script. This script currntly downloads a file with a whale saying 404 and tries to daemonize it. --- cluster/centos/build.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cluster/centos/build.sh b/cluster/centos/build.sh index 9777cdc2945..165963b8bd1 100755 --- a/cluster/centos/build.sh +++ b/cluster/centos/build.sh @@ -53,7 +53,7 @@ function download-releases() { curl -L ${K8S_DOWNLOAD_URL} -o ${RELEASES_DIR}/kubernetes.tar.gz echo "Download docker-latest ..." - curl -L https://get.docker.com/builds/Linux/x86_64/docker-latest -o ${RELEASES_DIR}/docker + curl -L https://get.docker.com/builds/Linux/x86_64/docker-latest.tgz -o ${RELEASES_DIR}/docker.tar.gz } function unpack-releases() { @@ -95,8 +95,10 @@ function unpack-releases() { cp ${RELEASES_DIR}/kubernetes/server/kubernetes/server/bin/kubectl ${BINARY_DIR} fi - if [[ -f ${RELEASES_DIR}/docker ]]; then - cp ${RELEASES_DIR}/docker ${BINARY_DIR}/node/bin + if [[ -f ${RELEASES_DIR}/docker.tar.gz ]]; then + tar xzf ${RELEASES_DIR}/docker.tar.gz -C ${RELEASES_DIR} + + cp ${RELEASES_DIR}/docker/docker* ${BINARY_DIR}/node/bin fi chmod -R +x ${BINARY_DIR} From 7a4908b278e583b7c4d9858cfdaa6a6ae630dede Mon Sep 17 00:00:00 2001 From: Brad Moylan Date: Wed, 10 Aug 2016 16:19:22 -0700 Subject: [PATCH 2/3] CentOS Cluster scripts: Upgrade K8S to 1.3.5 --- cluster/centos/config-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/centos/config-build.sh b/cluster/centos/config-build.sh index 1c851c8be7c..087d2807de5 100755 --- a/cluster/centos/config-build.sh +++ b/cluster/centos/config-build.sh @@ -26,7 +26,7 @@ FLANNEL_VERSION=${FLANNEL_VERSION:-"0.5.5"} ETCD_VERSION=${ETCD_VERSION:-"3.0.4"} # Define k8s version to use. -K8S_VERSION=${K8S_VERSION:-"1.1.1"} +K8S_VERSION=${K8S_VERSION:-"1.3.5"} FLANNEL_DOWNLOAD_URL=\ "https://github.com/coreos/flannel/releases/download/v${FLANNEL_VERSION}/flannel-${FLANNEL_VERSION}-linux-amd64.tar.gz" From 3cb6589a97a48947898ec33766f4d07ebda6dfe1 Mon Sep 17 00:00:00 2001 From: Brad Moylan Date: Wed, 17 Aug 2016 22:11:58 -0700 Subject: [PATCH 3/3] Use specific version of docker instead of latest. --- cluster/centos/build.sh | 5 +++-- cluster/centos/config-build.sh | 6 ++++++ cluster/centos/node/scripts/docker.sh | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/cluster/centos/build.sh b/cluster/centos/build.sh index 165963b8bd1..06ac2131e90 100755 --- a/cluster/centos/build.sh +++ b/cluster/centos/build.sh @@ -52,8 +52,8 @@ function download-releases() { echo "Download kubernetes release v${K8S_VERSION} ..." curl -L ${K8S_DOWNLOAD_URL} -o ${RELEASES_DIR}/kubernetes.tar.gz - echo "Download docker-latest ..." - curl -L https://get.docker.com/builds/Linux/x86_64/docker-latest.tgz -o ${RELEASES_DIR}/docker.tar.gz + echo "Download docker release v${DOCKER_VERSION} ..." + curl -L ${DOCKER_DOWNLOAD_URL} -o ${RELEASES_DIR}/docker.tar.gz } function unpack-releases() { @@ -95,6 +95,7 @@ function unpack-releases() { cp ${RELEASES_DIR}/kubernetes/server/kubernetes/server/bin/kubectl ${BINARY_DIR} fi + # docker if [[ -f ${RELEASES_DIR}/docker.tar.gz ]]; then tar xzf ${RELEASES_DIR}/docker.tar.gz -C ${RELEASES_DIR} diff --git a/cluster/centos/config-build.sh b/cluster/centos/config-build.sh index 087d2807de5..d9a67fd58f3 100755 --- a/cluster/centos/config-build.sh +++ b/cluster/centos/config-build.sh @@ -19,6 +19,9 @@ # Directory to store release packages that will be downloaded. RELEASES_DIR=${RELEASES_DIR:-/tmp/downloads} +# Define docker version to use. +DOCKER_VERSION=${DOCKER_VERSION:-"1.12.0"} + # Define flannel version to use. FLANNEL_VERSION=${FLANNEL_VERSION:-"0.5.5"} @@ -28,6 +31,9 @@ ETCD_VERSION=${ETCD_VERSION:-"3.0.4"} # Define k8s version to use. K8S_VERSION=${K8S_VERSION:-"1.3.5"} +DOCKER_DOWNLOAD_URL=\ +"https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz" + FLANNEL_DOWNLOAD_URL=\ "https://github.com/coreos/flannel/releases/download/v${FLANNEL_VERSION}/flannel-${FLANNEL_VERSION}-linux-amd64.tar.gz" diff --git a/cluster/centos/node/scripts/docker.sh b/cluster/centos/node/scripts/docker.sh index 839d29bc70f..55ceacea419 100755 --- a/cluster/centos/node/scripts/docker.sh +++ b/cluster/centos/node/scripts/docker.sh @@ -35,7 +35,7 @@ Type=notify EnvironmentFile=-/run/flannel/docker EnvironmentFile=-/opt/kubernetes/cfg/docker WorkingDirectory=/opt/kubernetes/bin -ExecStart=/opt/kubernetes/bin/docker daemon \$DOCKER_OPT_BIP \$DOCKER_OPT_MTU \$DOCKER_OPTS +ExecStart=/opt/kubernetes/bin/dockerd \$DOCKER_OPT_BIP \$DOCKER_OPT_MTU \$DOCKER_OPTS LimitNOFILE=1048576 LimitNPROC=1048576