Don't print Kubernetes username/password to console.

It is too easy to copy/paste this on-line.

Fixes #1483
This commit is contained in:
Joe Beda
2014-09-29 13:11:31 -07:00
parent 648a400e36
commit c323179d9b
6 changed files with 65 additions and 48 deletions

View File

@@ -22,11 +22,11 @@ source $(dirname $0)/provision-config.sh
minion_ip_array=(${MINION_IPS//,/ })
for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
minion=${MINION_NAMES[$i]}
ip=${minion_ip_array[$i]}
ip=${minion_ip_array[$i]}
if [ ! "$(cat /etc/hosts | grep $minion)" ]; then
echo "Adding $minion to hosts file"
echo "$ip $minion" >> /etc/hosts
fi
fi
done
# Update salt configuration
@@ -68,7 +68,6 @@ EOF
# Configure nginx authorization
mkdir -p $KUBE_TEMP
mkdir -p /srv/salt/nginx
echo "Using password: $MASTER_USER:$MASTER_PASSWD"
python $(dirname $0)/../../third_party/htpasswd/htpasswd.py -b -c ${KUBE_TEMP}/htpasswd $MASTER_USER $MASTER_PASSWD
MASTER_HTPASSWD=$(cat ${KUBE_TEMP}/htpasswd)
echo $MASTER_HTPASSWD > /srv/salt/nginx/htpasswd

View File

@@ -39,7 +39,7 @@ function verify-prereqs {
}
# Instantiate a kubernetes cluster
function kube-up {
function kube-up {
get-password
vagrant up
@@ -74,7 +74,7 @@ function kube-up {
done
done
done
echo
echo "Waiting for each minion to be registered with cloud provider"
for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
@@ -85,13 +85,16 @@ function kube-up {
COUNT=$(grep -c ${MINION_NAMES[i]} /tmp/minions) || { printf "."; sleep 2; COUNT="0"; }
done
done
echo
echo "Kubernetes cluster created."
echo
echo "Kubernetes cluster is running. Access the master at:"
echo "Kubernetes cluster is running. The master is running at:"
echo
echo " https://${KUBE_MASTER_IP}"
echo
echo "The user name and password to use is located in ~/.kubernetes_auth."
echo
echo " https://${user}:${passwd}@${KUBE_MASTER_IP}"
}
# Delete a kubernetes cluster