-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef8ebd0
commit 1e46118
Showing
14 changed files
with
316 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
if [ -z "${DEPLOYMENT_NAME}" ]; then | ||
echo "DEPLOYMENT_NAME is not set" | ||
exit 1 | ||
fi | ||
|
||
export SYSTEM_DOMAIN="autoscaler.app-runtime-interfaces.ci.cloudfoundry.org" | ||
export POSTGRES_ADDRESS="${DEPLOYMENT_NAME}-postgres.tcp.${SYSTEM_DOMAIN}" | ||
export POLICY_DB_PASSWORD="$(credhub get -n /bosh-autoscaler/${DEPLOYMENT_NAME}/database_password --quiet)" | ||
export STOREPROCEDURE_DB_PASSWORD="$(credhub get -n /bosh-autoscaler/${DEPLOYMENT_NAME}/database_password --quiet)" | ||
export METRICSFORWARDER_HEALTH_PASSWORD="$(credhub get -n /bosh-autoscaler/${DEPLOYMENT_NAME}/autoscaler_metricsforwarder_health_password --quiet)" | ||
export METRICSFORWARDER_APPNAME="${METRICSFORWARDER_APPNAME:-"${DEPLOYMENT_NAME}-metricsforwarder"}" | ||
export POSTGRES_EXTERNAL_PORT="${PR_NUMBER:-5432}" | ||
|
||
|
||
if [ -z "${PR_NUMBER}" ]; then | ||
echo "PR_NUMBER is not set" | ||
exit 1 | ||
fi | ||
|
||
|
||
if [ -z "${SYSTEM_DOMAIN}" ]; then | ||
echo "SYSTEM_DOMAIN is not set" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "${POSTGRES_ADDRESS}" ]; then | ||
echo "POSTGRES_ADDRESS is not set" | ||
exit 1 | ||
fi | ||
|
||
echo ' | ||
ID: development | ||
extends: com.github.cloudfoundry.app-autoscaler-release | ||
version: 1.0.0 | ||
_schema-version: 3.3.0 | ||
modules: | ||
- name: metricsforwarder | ||
parameters: | ||
routes: | ||
- route: '${METRICSFORWARDER_APPNAME}'.${default-domain} | ||
resources: | ||
- name: config | ||
parameters: | ||
config: | ||
metricsforwarder: | ||
health: | ||
password: "'"${METRICSFORWARDER_HEALTH_PASSWORD}"'" | ||
db: | ||
policy_db: | ||
url: "postgres://postgres:'"${POLICY_DB_PASSWORD}@${POSTGRES_ADDRESS}:${POSTGRES_EXTERNAL_PORT}"'/autoscaler?application_name=metricsforwarder&sslmode=verify-full&sslrootcert=/home/vcap/app/assets/certs/policy_db/ca.crt&sslcert=/home/vcap/app/assets/certs/policy_db/crt&sslkey=/home/vcap/app/assets/certs/policy_db/key" | ||
storedprocedure_db: | ||
url: "postgres://postgres:STOREPROCEDURE_DB_PASSWORD@$POSTGRES_ADDRESS:POSTGRES_EXTERNAL_PORT/autoscaler?application_name=metricsforwarder&sslmode=verify-full&sslrootcert=/home/vcap/app/assets/certs/storedprocedure_db/ca.crt&sslcert=/home/vcap/app/assets/certs/storedprocedure_db/crt&sslkey=/home/vcap/app/assets/certs/storedprocedure_db/key" | ||
' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.