c12s-kubespray/deploy-k8s.kargo.sh

25 lines
703 B
Bash
Raw Normal View History

#!/bin/bash
INVENTORY="nodes_to_inv.py"
nodes=""
i=1
2016-06-30 13:32:46 +00:00
for nodeip in `cat nodes` ; do
i=$(( $i+1 ))
nodes+=" node${i}[ansible_ssh_host=${nodeip},ip=${nodeip}]"
done
2016-06-16 10:19:27 +00:00
echo "Running deployment..."
#kargo deploy -y --ansible-opts="-e @custom.yaml"
2016-06-30 13:35:00 +00:00
ansible-playbook -i $INVENTORY /root/kargo/cluster.yml -e @custom.yaml
deploy_res=$?
if [ "$deploy_res" -eq "0" ]; then
echo "Setting up kubedns..."
ansible-playbook -i $INVENTORY playbooks/kubedns.yaml
2016-06-27 15:57:29 +00:00
echo "Setting up kubedashboard..."
ansible-playbook -i $INVENTORY playbooks/kubedashboard.yaml
echo "Setting up ip route work-around for DNS clusterIP availability..."
ansible-playbook -i $INVENTORY playbooks/ipro_for_cluster_ips.yaml
fi