Commit 4b34eb33 by tingweiwang

Delete 4-flannel_install.sh

1 parent c72209ee
Showing with 0 additions and 22 deletions
#!/bin/bash
master1_ip=192.168.1.32
etcdctl --endpoints=https://$master1_ip:2379 --ca-file=/opt/kubernetes/ssl/ca.pem --cert-file=/opt/kubernetes/ssl/etcd.pem --key-file=/opt/kubernetes/ssl/etcd-key.pem set /coreos.com/network/config '{ "Network": "172.17.0.0/16", "Backend": {"Type": "vxlan"}}'
cp /root/k8s/bin/mk-docker-opts.sh /opt/kubernetes/bin/
cp /root/k8s/bin/flanneld /opt/kubernetes/bin/
ansible all -m copy -a "src=/opt/kubernetes/bin/mk-docker-opts.sh dest=/opt/kubernetes/bin/ mode=755"
ansible all -m copy -a "src=/opt/kubernetes/bin/flanneld dest=/opt/kubernetes/bin/ mode=755"
ansible all -m copy -a "src=/opt/kubernetes/ssl/etcd.pem dest=/opt/kubernetes/ssl/"
ansible all -m copy -a "src=/opt/kubernetes/ssl/etcd-key.pem dest=/opt/kubernetes/ssl/"
cat >>/opt/kubernetes/cfg/flanneld<<EOF
FLANNEL_OPTIONS="--etcd-endpoints=https://$master1_ip:2379 \\
-etcd-cafile=/opt/kubernetes/ssl/ca.pem \\
-etcd-certfile=/opt/kubernetes/ssl/etcd.pem \\
-etcd-keyfile=/opt/kubernetes/ssl/etcd-key.pem \\
--iface=eno1"
EOF
ansible all -m copy -a "src=/opt/kubernetes/cfg/flanneld dest=/opt/kubernetes/cfg/ mode=755"
cp /root/k8s/service/flanneld.service /lib/systemd/system/
ansible all -m copy -a "src=/lib/systemd/system/flanneld.service dest=/lib/systemd/system/ mode=755"
ansible all -m shell -a "systemctl daemon-reload && service flanneld restart && service flanneld status && systemctl enable flanneld.service"
ansible all -m copy -a "src=/root/k8s/service/docker.service dest=/lib/systemd/system/docker.service mode=755"
ansible all -m shell -a "systemctl daemon-reload && service docker restart"
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!