![Harry Zhang](/assets/img/avatar_default.png)
Implements: blueprint update-to-1.8 Change-Id: I4d12db6ccaedf3c28b6f7ff687de46b42dac5465 Fetch version from release URL Change-Id: Icedce88e90ec98ff4b66b1b30e74030aa4932cdd
57 lines
1.7 KiB
Bash
57 lines
1.7 KiB
Bash
#!/bin/bash
|
|
# Copyright (c) 2017 OpenStack Foundation.
|
|
#
|
|
# 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.
|
|
|
|
programDir=`dirname $0`
|
|
programDir=$(readlink -f $programDir)
|
|
parentDir="$(dirname $programDir)"
|
|
programDirBaseName=$(basename $programDir)
|
|
|
|
setenforce 0
|
|
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
|
|
|
|
|
|
set -o errexit
|
|
set -o nounset
|
|
set -o pipefail
|
|
set -x
|
|
|
|
|
|
## install kubeadm kubectl kubelet
|
|
cat > /etc/yum.repos.d/kubernetes.repo << EOF
|
|
[kubernetes]
|
|
name=Kubernetes
|
|
baseurl=http://yum.kubernetes.io/repos/kubernetes-el7-x86_64
|
|
enabled=1
|
|
gpgcheck=1
|
|
repo_gpgcheck=1
|
|
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
|
|
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
|
|
EOF
|
|
|
|
yum install -y --allow-downgrades kubelet-${KUBE_VERSION}-0 kubeadm-${KUBE_VERSION}-0 kubectl-${KUBE_VERSION}-0
|
|
|
|
# configure_kubelet
|
|
unitFile='/etc/systemd/system/kubelet.service.d/10-kubeadm.conf'
|
|
sed -i '/^Environment="KUBELET_EXTRA_ARGS=/d' ${unitFile}
|
|
sed -i '/\[Service\]/aEnvironment="KUBELET_EXTRA_ARGS=--container-runtime=remote --container-runtime-endpoint=/var/run/frakti.sock --feature-gates=AllAlpha=true"' ${unitFile}
|
|
|
|
|
|
systemctl daemon-reload
|
|
systemctl enable kubelet
|
|
|
|
|
|
|
|
exit 0
|