mirror of https://github.com/easzlab/kubeasz.git
minor fixes
parent
ddc15996a3
commit
1845483369
5
ezctl
5
ezctl
|
@ -266,10 +266,13 @@ function cmd() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
COMMAND="ansible-playbook -i clusters/$1/hosts -e @clusters/$1/config.yml playbooks/$PLAY_BOOK"
|
||||||
|
echo "$COMMAND"
|
||||||
|
|
||||||
logger info "cluster:$1 $2 begins in 5s, press any key to abort:\n"
|
logger info "cluster:$1 $2 begins in 5s, press any key to abort:\n"
|
||||||
! (read -r -t5 -n1) || { logger warn "$2 abort"; return 1; }
|
! (read -r -t5 -n1) || { logger warn "$2 abort"; return 1; }
|
||||||
|
|
||||||
ansible-playbook -i "clusters/$1/hosts" -e "@clusters/$1/config.yml" "playbooks/$PLAY_BOOK" || return 1
|
${COMMAND} || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
5
ezdown
5
ezdown
|
@ -350,9 +350,10 @@ function start_kubeasz_docker() {
|
||||||
|
|
||||||
# run kubeasz docker container
|
# run kubeasz docker container
|
||||||
docker run --detach \
|
docker run --detach \
|
||||||
--name kubeasz \
|
|
||||||
--restart always \
|
|
||||||
--env HOST_IP="$host_ip" \
|
--env HOST_IP="$host_ip" \
|
||||||
|
--name kubeasz \
|
||||||
|
--network host \
|
||||||
|
--restart always \
|
||||||
--volume "$BASE":"$BASE" \
|
--volume "$BASE":"$BASE" \
|
||||||
--volume /root/.kube:/root/.kube \
|
--volume /root/.kube:/root/.kube \
|
||||||
--volume /root/.ssh:/root/.ssh \
|
--volume /root/.ssh:/root/.ssh \
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
|
|
||||||
# 只需单节点执行一次
|
# 只需单节点执行一次
|
||||||
- name: 运行 calico网络
|
- name: 运行 calico网络
|
||||||
shell: "{{ bin_dir }}/kubectl apply -f {{ cluster_dir }}/yml/calico.yaml"
|
shell: "{{ base_dir }}/bin/kubectl apply -f {{ cluster_dir }}/yml/calico.yaml"
|
||||||
run_once: true
|
run_once: true
|
||||||
connection: local
|
connection: local
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
|
|
||||||
# 只需单节点执行一次
|
# 只需单节点执行一次
|
||||||
- name: 运行 cilium网络
|
- name: 运行 cilium网络
|
||||||
shell: "{{ bin_dir }}/kubectl apply -f {{ cluster_dir }}/yml/cilium.yaml"
|
shell: "{{ base_dir }}/bin/kubectl apply -f {{ cluster_dir }}/yml/cilium.yaml"
|
||||||
run_once: true
|
run_once: true
|
||||||
connection: local
|
connection: local
|
||||||
|
|
||||||
|
|
|
@ -67,8 +67,8 @@
|
||||||
# connection: local
|
# connection: local
|
||||||
#
|
#
|
||||||
# - name: 创建 metallb controller 部署
|
# - name: 创建 metallb controller 部署
|
||||||
# shell: "{{ bin_dir }}/kubectl apply -f {{ cluster_dir }}/yml/metallb.yaml && \
|
# shell: "{{ base_dir }}/bin/kubectl apply -f {{ cluster_dir }}/yml/metallb.yaml && \
|
||||||
# {{ bin_dir }}/kubectl apply -f {{ cluster_dir }}/yml/{{ metallb_protocol }}.yaml"
|
# {{ base_dir }}/bin/kubectl apply -f {{ cluster_dir }}/yml/{{ metallb_protocol }}.yaml"
|
||||||
# run_once: true
|
# run_once: true
|
||||||
# connection: local
|
# connection: local
|
||||||
# when: '"metallb" not in pod_info.stdout and metallb_install == "yes"'
|
# when: '"metallb" not in pod_info.stdout and metallb_install == "yes"'
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
|
|
||||||
# 只需单节点执行一次
|
# 只需单节点执行一次
|
||||||
- name: 运行 flannel网络
|
- name: 运行 flannel网络
|
||||||
shell: "{{ bin_dir }}/kubectl apply -f {{ cluster_dir }}/yml/flannel.yaml"
|
shell: "{{ base_dir }}/bin/kubectl apply -f {{ cluster_dir }}/yml/flannel.yaml"
|
||||||
run_once: true
|
run_once: true
|
||||||
connection: local
|
connection: local
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
|
|
||||||
# 只需单节点执行一次
|
# 只需单节点执行一次
|
||||||
- name: 运行 kube-router DaemonSet
|
- name: 运行 kube-router DaemonSet
|
||||||
shell: "{{ bin_dir }}/kubectl apply -f {{ cluster_dir }}/yml/kube-router.yaml"
|
shell: "{{ base_dir }}/bin/kubectl apply -f {{ cluster_dir }}/yml/kube-router.yaml"
|
||||||
run_once: true
|
run_once: true
|
||||||
connection: local
|
connection: local
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue