Add support for deployment via kargo-cli

This commit is contained in:
Aleksandr Didenko
2016-06-16 11:48:51 +02:00
parent b9ed54812b
commit 531f611ea3
4 changed files with 69 additions and 6 deletions

19
deploy-k8s.kargo.sh Normal file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
custom_opts='--ansible-opts="-e @kargo/custom.yaml"'
nodes=""
i=0
for nodeip in `cat /root/nodes` ; do
i=$(( $i+1 ))
nodes+=" node${i}[ansible_ssh_host=${nodeip},ip=${nodeip}]"
done
kargo prepare -y --nodes $nodes
kargo deploy -y $custom_opts
deploy_res=$?
if [ "$deploy_res" -eq "0" ]; then
echo "Setting up kubedns..."
kpm deploy kube-system/kubedns --namespace=kube-system
fi