Merge "Put k8s_external_ip parameter in configs for multi-deploy"

This commit is contained in:
Jenkins 2016-11-19 21:06:39 +00:00 committed by Gerrit Code Review
commit 068c67b7aa
2 changed files with 10 additions and 1 deletions

View File

@ -94,6 +94,13 @@ if [ `kubectl get nodes | grep node | wc -l` -lt $(($NUMBER_OF_ENVS * 3)) ]; the
exit 1
fi
# add k8s_address to config
default_iface=$(ip ro sh | awk '/^default via [0-9]+.[0-9]+.[0-9]+.[0-9]+ dev/ {print $5}')
ext_ipaddr=$(ip addr show $default_iface | awk '/inet / {print substr($2, 1, length($2)-3)}')
cat >${CONFIG_DIR}/ccp-hw-config.yaml << EOF
configs:
k8s_external_ip: "$ext_ipaddr"
EOF
if [ -n "${APT_CACHE_SERVER}" ]; then
cat >>"${CONFIG_DIR}"/ccp-configs-common.yaml << EOF
@ -123,7 +130,6 @@ if [ "${BUILD_IMAGES}" = "true" ]; then
${CCP} build
fi
# Deploy envs:
for n in $(seq 1 ${NUMBER_OF_ENVS}); do
CCP="ccp --verbose --debug --config-file ${CONFIG_DIR}/ccp-cli-${VERSION}-config-${n}.yaml"

View File

@ -1,3 +1,6 @@
!include
- ccp-hw-config.yaml
---
builder:
push: True