加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
init.sh 2.68 KB
一键复制 编辑 原始数据 按行查看 历史
alanpengpan 提交于 2019-05-25 00:47 . Update Harbor to v1.8.0
#! /bin/bash
set -e
path=`dirname $0`
kubernetes_version=1.14.2
harbor_version=1.8.0
docker_version=18.09.6
haproxy_version=1.8.14
keepalived_version=1.3.5
loadbalancer_version=HAProxy-${haproxy_version}_Keepalived-${keepalived_version}
prometheus_version=2.7.1
prometheus_operator_version=0.30.0
kube_prometheus_version=0.1.0
metrics_server_version=0.3.3
dashboard_version=1.10.1
flannel_version=0.11.0
helm_version=2.14.0
istio_version=1.1.7
mv ${path}/kubernetes-playbook/version ${path}/kubernetes-playbook/v${kubernetes_version}
mv ${path}/harbor-playbook/version ${path}/harbor-playbook/v${harbor_version}
mv ${path}/docker-playbook/version ${path}/docker-playbook/${docker_version}-CE
mv ${path}/loadbalancer-playbook/version ${path}/loadbalancer-playbook/${loadbalancer_version}
mv ${path}/prometheus-playbook/version ${path}/prometheus-playbook/v${prometheus_version}
mv ${path}/istio-playbook/version ${path}/istio-playbook/v${istio_version}
docker run --rm --name=kubeadm-version wise2c/kubeadm-version:v${kubernetes_version} kubeadm config images list --kubernetes-version ${kubernetes_version} > ${path}/k8s-images-list.txt
etcd_version=`cat ${path}/k8s-images-list.txt |grep etcd |awk -F ':' '{print $2}'`
mv etcd-playbook/version-by-kubeadm etcd-playbook/${etcd_version}
echo "Kubernetes Version: ${kubernetes_version}" > ${path}/components-version.txt
echo "Harbor Version: ${harbor_version}" >> ${path}/components-version.txt
echo "Docker Version: ${docker_version}" >> ${path}/components-version.txt
echo "HAProxy Version: ${haproxy_version}" >> ${path}/components-version.txt
echo "Keepalived Version: ${keepalived_version}" >> ${path}/components-version.txt
echo "Prometheus Version: ${prometheus_version}" >> ${path}/components-version.txt
echo "PrometheusOperator Version: ${prometheus_operator_version}" >> ${path}/components-version.txt
echo "KubePrometheus Version: ${kube_prometheus_version}" >> ${path}/components-version.txt
echo "MetricsServer Version: ${metrics_server_version}" >> ${path}/components-version.txt
echo "Dashboard Version: ${dashboard_version}" >> ${path}/components-version.txt
echo "Flannel Version: ${flannel_version}" >> ${path}/components-version.txt
echo "Helm Version: ${helm_version}" >> ${path}/components-version.txt
echo "Istio Version: ${istio_version}" >> ${path}/components-version.txt
for dir in `ls ${path}`
do
if [[ ${dir} =~ -playbook$ ]]; then
for version in `ls ${path}/${dir}`
do
echo ${version}
if [ -f ${path}/${dir}/${version}/init.sh ]; then
cp ${path}/components-version.txt ${path}/${dir}/${version}/
bash ${path}/${dir}/${version}/init.sh ${version}
fi
done
fi
done
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化