-
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 8ffdf1e
Showing
6 changed files
with
88 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/usr/bin/env bash | ||
|
||
export PR_NUMBER="$(gh pr view --json number --jq '.number')" | ||
export DEPLOYMENT_NAME="autoscaler-${PR_NUMBER}" | ||
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 POSTGRES_EXTERNAL_PORT="${PR_NUMBER:-5432}" | ||
|
||
echo '{ "metricsforwarder": { | ||
"cache_cleanup_interval": "6h", | ||
"cache_ttl": "900s", | ||
"cred_helper_impl": "default", | ||
"health": { | ||
"password": "'"${METRICSFORWARDER_HEALTH_PASSWORD}"'", | ||
"username": "metricsforwarder" | ||
}, | ||
"logging": { | ||
"level": "debug" | ||
}, | ||
"syslog": { | ||
"server_address": "log-cache.service.cf.internal", | ||
"port": 6067, | ||
"tls": { | ||
"ca_file": "/home/vcap/app/assets/certs/syslog_client/ca.crt", | ||
"cert_file": "/home/vcap/app/assets/certs/syslog_client/client.crt", | ||
"key_file": "/home/vcap/app/assets/certs/syslog_client/client.key" | ||
} | ||
}, | ||
"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", | ||
"max_open_connections": 100, | ||
"max_idle_connections": 10, | ||
"connection_max_lifetime": "60s" | ||
}, | ||
"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", | ||
"max_open_connections": 20, | ||
"max_idle_connections": 10, | ||
"connection_max_lifetime": "60s" | ||
} | ||
}, | ||
"policy_poller_interval": "60s", | ||
"rate_limit": { | ||
"valid_duration": "1s", | ||
"max_amount": 10 | ||
} | ||
} | ||
}' |
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