Adds JUJU to the Kubernetes Provider listing
This feature adds Juju provisioning to the kube-up script. It currently parses out the pre-requisits on debian/ubuntu based systems and installs them if they are missing. From there we followed the integration path that was found in the libvirt-coreos path, implementing the methods found in the boilerplate and calling juju service calls. There are a few "arbitrary sleeps" in the code to allow the cloud provider to settle and properly deploy. These are work-around cases from the script executing faster than juju was able to communicate from the state server to subsequent nodes. I left comments inline at these points. To exercise this: export KUBERNETES_PROVIDER=juju cluster/kube-up.sh It will spin up a ref arch with 1 Kubernetes Master, 2 minions, and run the cluster validation checks against the deployment. Bridging the gap between the juju specific bits and the upstream recommended guides for getting started with Juju. To note, if you do not have a "current environment" set in Juju, it will spin up the quickstart integration wizard in interactive mode, allowing you to configure juju, and add the proper provider/use it. Otherwise it assumes you're in the provider you wish to use, and will deploy there.
This commit is contained in:
@@ -55,7 +55,7 @@ echo "Found ${found} nodes."
|
||||
cat -n "${MINIONS_FILE}"
|
||||
|
||||
# On vSphere, use minion IPs as their names
|
||||
if [[ "${KUBERNETES_PROVIDER}" == "vsphere" ]] || [[ "${KUBERNETES_PROVIDER}" == "vagrant" ]] || [[ "${KUBERNETES_PROVIDER}" == "libvirt-coreos" ]]; then
|
||||
if [[ "${KUBERNETES_PROVIDER}" == "vsphere" ]] || [[ "${KUBERNETES_PROVIDER}" == "vagrant" ]] || [[ "${KUBERNETES_PROVIDER}" == "libvirt-coreos" ]] || [[ "${KUBERNETES_PROVIDER}" == "juju" ]] ; then
|
||||
MINION_NAMES=("${KUBE_MINION_IP_ADDRESSES[@]}")
|
||||
fi
|
||||
|
||||
@@ -69,7 +69,7 @@ for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
|
||||
fi
|
||||
|
||||
name="${MINION_NAMES[$i]}"
|
||||
if [ "$KUBERNETES_PROVIDER" != "vsphere" ] && [ "$KUBERNETES_PROVIDER" != "vagrant" ] && [ "$KUBERNETES_PROVIDER" != "libvirt-coreos" ]; then
|
||||
if [ "$KUBERNETES_PROVIDER" != "vsphere" ] && [ "$KUBERNETES_PROVIDER" != "vagrant" ] && [ "$KUBERNETES_PROVIDER" != "libvirt-coreos" ] && [ "$KUBERNETES_PROVIDER" != "juju" ]; then
|
||||
# Grab fully qualified name
|
||||
name=$(grep "${MINION_NAMES[$i]}\." "${MINIONS_FILE}")
|
||||
fi
|
||||
@@ -79,7 +79,7 @@ for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
|
||||
attempt=0
|
||||
while true; do
|
||||
echo -n "Attempt $((attempt+1)) at checking Kubelet installation on node ${MINION_NAMES[$i]} ..."
|
||||
if [ "$KUBERNETES_PROVIDER" != "libvirt-coreos" ]; then
|
||||
if [ "$KUBERNETES_PROVIDER" != "libvirt-coreos" ] && [ "$KUBERNETES_PROVIDER" != "juju" ]; then
|
||||
curl_output=$(curl -s --insecure --user "${KUBE_USER}:${KUBE_PASSWORD}" \
|
||||
"https://${KUBE_MASTER_IP}/api/v1beta1/proxy/minions/${name}/healthz")
|
||||
else
|
||||
|
Reference in New Issue
Block a user