zrhoffman commented on a change in pull request #5681:
URL: https://github.com/apache/trafficcontrol/pull/5681#discussion_r602437113
##########
File path: infrastructure/cdn-in-a-box/traffic_ops/config.sh
##########
@@ -100,108 +92,103 @@ cat <<-EOF >/opt/traffic_ops/app/conf/cdn.conf
"log_location_info": "$TO_LOG_INFO",
"log_location_debug": "$TO_LOG_DEBUG",
"log_location_event": "$TO_LOG_EVENT",
- "max_db_connections": 20,
"db_conn_max_lifetime_seconds": ${DEBUGGING_TIMEOUT:-60},
- "db_query_timeout_seconds": ${DEBUGGING_TIMEOUT:-20},
- "backend_max_connections": {
- "mojolicious": 4
- },
- "whitelisted_oauth_urls": [],
- "oauth_client_secret": "",
- "routing_blacklist": {
- "ignore_unknown_routes": false,
- "disabled_routes": []
- },
- "supported_ds_metrics": [ "kbps", "tps_total", "tps_2xx", "tps_3xx",
"tps_4xx", "tps_5xx" ]
- },
- "cors" : {
- "access_control_allow_origin" : "*"
+ "db_query_timeout_seconds": ${DEBUGGING_TIMEOUT:-20}
},
"to" : {
- "base_url" : "https://$TO_FQDN",
- "email_from" : "no-reply@$INFRA_SUBDOMAIN.$TLD_DOMAIN",
- "no_account_found_msg" : "A Traffic Ops user account is required for
access. Please contact your Traffic Ops user administrator."
+ "email_from" : "no-reply@$INFRA_SUBDOMAIN.$TLD_DOMAIN"
},
"portal" : {
"base_url" : "https://$TP_HOST.$INFRA_SUBDOMAIN.$TLD_DOMAIN/#!/",
- "email_from" : "no-reply@$INFRA_SUBDOMAIN.$TLD_DOMAIN",
- "pass_reset_path" : "user",
- "user_register_path" : "user"
- },
- "secrets" : [
- "$TO_SECRET"
- ],
- "geniso" : {
- "iso_root_path" : "/opt/traffic_ops/app/public"
+ "email_from" : "no-reply@$INFRA_SUBDOMAIN.$TLD_DOMAIN"
},
- "inactivity_timeout" : 60,
"smtp" : {
"enabled" : true,
- "user" : "",
- "password" : "",
"address" : "${SMTP_FQDN}:${SMTP_PORT}"
},
"InfluxEnabled": true,
"influxdb_conf_path": "/opt/traffic_ops/app/conf/production/influx.conf",
"lets_encrypt" : {
- "user_email" : "",
- "send_expiration_email": false,
- "convert_self_signed": false,
- "renew_days_before_expiration": 30,
"environment": "staging"
- },
- "acme_renewal": {
- "summary_email": "",
- "renew_days_before_expiration": 30
- },
- "acme_accounts": [
- {
- "acme_provider" : "",
- "user_email" : "",
- "acme_url" : "",
- "kid" : "",
- "hmac_encoded" : ""
- }
- ]
+ }
}
EOF
+))"
-cat <<-EOF >/opt/traffic_ops/app/conf/production/database.conf
+<<RIAK_CONF cat >/opt/traffic_ops/app/conf/production/riak.conf
{
- "description": "Local PostgreSQL database on port 5432",
- "dbname": "$DB_NAME",
- "hostname": "$DB_FQDN",
- "user": "$DB_USER",
- "password": "$DB_USER_PASS",
- "port": "$DB_PORT",
- "ssl": false,
- "type": "Pg"
-}
-EOF
-
-cat <<-EOF >/opt/traffic_ops/app/db/dbconf.yml
-version: "1.0"
-name: dbconf.yml
-
-production:
- driver: postgres
- open: host=$DB_FQDN port=$DB_PORT user=$DB_USER password=$DB_USER_PASS
dbname=$DB_NAME sslmode=disable
-test:
- driver: postgres
- open: host=$DB_FQDN port=$DB_PORT user=$DB_USER password=$DB_USER_PASS
dbname=to_test sslmode=disable
-EOF
-
-cat <<-EOF >/opt/traffic_ops/app/conf/production/riak.conf
-{ "user": "$TV_RIAK_USER",
+ "MaxTLSVersion": "1.1",
"password": "$TV_RIAK_PASSWORD",
- "MaxTLSVersion": "1.1"
+ "user": "$TV_RIAK_USER"
}
-EOF
+RIAK_CONF
-cat <<-EOF >/opt/traffic_ops/app/conf/production/influx.conf
+<<INFLUX_CONF cat >/opt/traffic_ops/app/conf/production/influx.conf
{
- "user": "$INFLUXDB_ADMIN_USER",
- "password": "$INFLUXDB_ADMIN_PASSWORD",
- "secure": false
+ "password": "$INFLUXDB_ADMIN_PASSWORD",
+ "secure": false,
+ "user": "$INFLUXDB_ADMIN_USER"
}
-EOF
+INFLUX_CONF
+
+install_bin=/opt/traffic_ops/install/bin
+input_json="${install_bin}/input.json"
+echo "$(jq "$(<<JQ_FILTER cat
Review comment:
Using envsubst in 9c3d3f9ecf
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]