diff --git a/cluster/aws/templates/salt-master.sh b/cluster/aws/templates/salt-master.sh index 9851dac867f..d88643ceb74 100755 --- a/cluster/aws/templates/salt-master.sh +++ b/cluster/aws/templates/salt-master.sh @@ -16,7 +16,7 @@ # Prepopulate the name of the Master mkdir -p /etc/salt/minion.d -echo "master: $MASTER_NAME" > /etc/salt/minion.d/master.conf +echo "master: $SALT_MASTER" > /etc/salt/minion.d/master.conf cat </etc/salt/minion.d/grains.conf grains: diff --git a/cluster/aws/templates/salt-minion.sh b/cluster/aws/templates/salt-minion.sh index a5e16729a28..c397fe386ee 100755 --- a/cluster/aws/templates/salt-minion.sh +++ b/cluster/aws/templates/salt-minion.sh @@ -16,7 +16,7 @@ # Prepopulate the name of the Master mkdir -p /etc/salt/minion.d -echo "master: $MASTER_NAME" > /etc/salt/minion.d/master.conf +echo "master: $SALT_MASTER" > /etc/salt/minion.d/master.conf # Turn on debugging for salt-minion # echo "DAEMON_ARGS=\"\$DAEMON_ARGS --log-file-level=debug\"" > /etc/default/salt-minion diff --git a/cluster/aws/util.sh b/cluster/aws/util.sh index 82efbf3a9fe..4003ec771d1 100644 --- a/cluster/aws/util.sh +++ b/cluster/aws/util.sh @@ -24,6 +24,8 @@ source "${KUBE_ROOT}/cluster/aws/${KUBE_CONFIG_FILE-"config-default.sh"}" export AWS_DEFAULT_REGION=${ZONE} AWS_CMD="aws --output json ec2" +MASTER_INTERNAL_IP=172.20.0.9 + function json_val { python -c 'import json,sys;obj=json.load(sys.stdin);print obj'$1'' } @@ -293,7 +295,7 @@ function kube-up { echo "#! /bin/bash" echo "mkdir -p /var/cache/kubernetes-install" echo "cd /var/cache/kubernetes-install" - echo "readonly MASTER_NAME='${MASTER_NAME}'" + echo "readonly SALT_MASTER='${MASTER_INTERNAL_IP}'" echo "readonly INSTANCE_PREFIX='${INSTANCE_PREFIX}'" echo "readonly NODE_INSTANCE_PREFIX='${INSTANCE_PREFIX}-minion'" echo "readonly SERVER_BINARY_TAR_URL='https://s3-${ZONE}.amazonaws.com/${SERVER_BINARY_TAR_URL}'" @@ -386,7 +388,7 @@ function kube-up { ( # We pipe this to the ami as a startup script in the user-data field. Requires a compatible ami echo "#! /bin/bash" - echo "MASTER_NAME='${MASTER_NAME}'" + echo "SALT_MASTER='${MASTER_INTERNAL_IP}'" echo "MINION_IP_RANGE='${MINION_IP_RANGES[$i]}'" grep -v "^#" "${KUBE_ROOT}/cluster/aws/templates/salt-minion.sh" ) > "${KUBE_TEMP}/minion-start-${i}.sh"