Skip to content

Instantly share code, notes, and snippets.

@calebwashburn
Last active February 12, 2019 21:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calebwashburn/78e89a83c185f91ace59005ab6e19c54 to your computer and use it in GitHub Desktop.
Save calebwashburn/78e89a83c185f91ace59005ab6e19c54 to your computer and use it in GitHub Desktop.
!/bin/bash -e
PIVNET_TOKEN=$1
version=$(bosh interpolate ../config/versions/cf.yml --path /product-version)
glob=$(bosh interpolate ../config/versions/cf.yml --path /pivnet-file-glob)
slug=$(bosh interpolate ../config/versions/cf.yml --path /pivnet-product-slug)
mkdir -p cf-tcg
mkdir -p ../config/templates
mkdir -p ../config/defaults
tmpdir=cf-tcg
tile-config-generator generate --base-directory=${tmpdir} --do-not-include-product-version --include-errands \
pivnet --token ${PIVNET_TOKEN} --product-slug ${slug} --product-version ${version} --product-glob ${glob}
bosh int ${tmpdir}/product.yml \
-o ${tmpdir}/features/haproxy_forward_tls-disable.yml \
-o ${tmpdir}/optional/add-control-static_ips.yml \
-o ${tmpdir}/optional/add-router-static_ips.yml > ../config/templates/cf.yml
rm -rf ../config/defaults/cf.yml
touch ../config/defaults/cf.yml
cat ${tmpdir}/product-default-vars.yml >> ../config/defaults/cf.yml
cat ${tmpdir}/errand-vars.yml >> ../config/defaults/cf.yml
cat ${tmpdir}/resource-vars.yml >> ../config/defaults/cf.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment