Make sure you have virtualbox
installed on your machine (tested on versions >= 5.1.26r117224).
Make sure you have vagrant
installed (tested on 1.8 and 2.0).
Note: check if the hostmanager
plug in is installed using:
vagrant plugin install vagrant-hostmanager
Even if it is not installed, the vagrant up
command below will install it for you.
vboxmanage list vms
vboxmanage showvminfo $UUI
vagrant up
vagrant up master-node
vagrant status
vagrant ssh master-node
vagrant halt
vagrant halt master-node
vagrant ssh radiant3 -c 'ip -4 addr' | grep inet
vagrant status
(cd examples/vagrant; vagrant ssh $vmname -c 'ip -4 addr' | grep inet)
vagrant destroy -f api-proxy client installer
vagrant status
vagrant snapshot save shard1-master1 k8s-master
vagrant snapshot save shard1-worker1 k8s-worker1
vagrant snapshot list
vagrant snapshot restore k8s-master
vagrant snapshot delete k8s-master
scp -o StrictHostKeyChecking=no -i ~/.vagrant.d/insecure_private_key hyperkube-amd64 [email protected]:~
ssh -o LogLevel=quiet \
-o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \
-i ~/.vagrant.d/insecure_private_key vagrant@$client_ip \
/bin/bash <<EOF
output=\$(curl -w "%{http_code}" -XPOST -s -k --data "node=$shard_ip" --header "X-Tls-Client-Dn: $ADMIN_KEY" "https://$api_proxy_ip:6969/admin/api/v1/shards/$shard/users/$tenant" 2>&1)
httpCode=\$(tail -n 1 <<< "\$output")
outputSize=\$(wc -l <<< "\$output")
output=\$(head -n \$((\$outputSize - 1)) <<< "\$output")
if [[ "\$httpCode" != "200" ]]; then
echo "ERROR \$httpCode: Could not initialize kubernetes tenant"
echo "\$output"
exit 1
fi
mkdir -p "$tenant"
echo "\$output" > "$tenant/kube-config"
EOF