Skip to content

Commit

Permalink
AWS: Strip more comments from instance user-data
Browse files Browse the repository at this point in the history
To stay under the 16KB limit
  • Loading branch information
justinsb committed Dec 8, 2015
1 parent 929ab32 commit 428e415
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cluster/aws/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,12 @@ function start-master() {
grep -v "^#" "${KUBE_ROOT}/cluster/aws/templates/create-dynamic-salt-files.sh"
grep -v "^#" "${KUBE_ROOT}/cluster/aws/templates/download-release.sh"
grep -v "^#" "${KUBE_ROOT}/cluster/aws/templates/salt-master.sh"
) > "${KUBE_TEMP}/master-start.sh"
) > "${KUBE_TEMP}/master-user-data"

# We're running right up against the 16KB limit
# Remove all comment lines and then put back the bin/bash shebang
sed -i -e 's/^[[:blank:]]*#.*$//' -e '/^[[:blank:]]*$/d' "${KUBE_TEMP}/master-user-data"
sed -i '1i #! /bin/bash' "${KUBE_TEMP}/master-user-data"

echo "Starting Master"
master_id=$($AWS_CMD run-instances \
Expand All @@ -904,7 +909,7 @@ function start-master() {
--security-group-ids ${MASTER_SG_ID} \
--associate-public-ip-address \
--block-device-mappings "${MASTER_BLOCK_DEVICE_MAPPINGS}" \
--user-data file://${KUBE_TEMP}/master-start.sh \
--user-data file://${KUBE_TEMP}/master-user-data \
--query Instances[].InstanceId)
add-tag $master_id Name $MASTER_NAME
add-tag $master_id Role $MASTER_TAG
Expand Down

1 comment on commit 428e415

@k8s-teamcity-mesosphere

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity OSS :: Kubernetes Mesos :: 4 - Smoke Tests Build 8475 outcome was SUCCESS
Summary: Tests passed: 1, ignored: 205 Build time: 00:04:48

Please sign in to comment.