Skip to content

Commit

Permalink
Merge pull request apache#2 from mhoppa/feature/add_smtp_influxdb_config
Browse files Browse the repository at this point in the history
Add influxdb & smtp configurations
  • Loading branch information
jhg03a committed Nov 17, 2019
2 parents 1cf8aaf + 925ddde commit 3cdb4c8
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
12 changes: 12 additions & 0 deletions infrastructure/ansible/roles/traffic_ops/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ to_certs_ca: /etc/pki/ca-trust/source/anchors/root.ca.crt
to_certs_verify: "0x00"

to_inactivity_timeout: 120
to_influxdb_conf_path: "{{ to_conf_installdir }}/influxdb.conf"
to_gen_new_secret: "yes"
to_no_of_secrets_to_keep: "2"

Expand Down Expand Up @@ -101,6 +102,10 @@ to_go_read_header_timeout: 120
to_go_read_timeout: 120
to_go_write_timeout: 120

to_smtp_enabled: false
to_smtp_username: ""
to_smtp_password: ""
to_smtp_address: ""

# --- database.conf & dbconf.yml
todb_db_name: traffic_ops
Expand Down Expand Up @@ -150,6 +155,13 @@ to_pi_health_thresh_load_avg: "25"
to_pi_health_thresh_kbps: "1750000"
to_pi_health_connect_timeout: "2000"

# --- influxdb.conf
to_influxdb_user: "influxuser"
to_influxdb_password: "password"
to_influxdb_deliveryservice_stats_db_name: "delivery_stats"
to_influxdb_cache_stats_db_name: "cache_stats"
to_influxdb_secure: false

# --- log4perl.conf
to_log_file: "/var/log/traffic_ops/traffic_ops.log"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
- production/riak.conf
- cdn.conf
- ldap.conf
- influxdb.conf
notify: Restart Traffic Ops

- name: Upgrade TODB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"workers" : {{ to_hypnotoad_number_of_workers }}
},
"inactivity_timeout" : {{ to_inactivity_timeout }},
"influxdb_conf_path" : "{{ to_influxdb_conf_path }}",
"portal" : {
"base_url" : "{{ to_portal_base_url }}",
"docs_url" : "{{ to_portal_docs_url }}",
Expand All @@ -45,6 +46,12 @@
"email_from" : "{{ to_email_from }}",
"no_account_found_msg" : "{{ to_account_missing_msg }}"
},
"smtp" : {
"enabled" : {{ to_smtp_enabled | bool | lower }},
"user" : "{{ to_smtp_username }}",
"password" : "{{ to_smtp_password }}",
"address" : "{{ to_smtp_address }}"
},
"traffic_ops_golang" : {
"backend_max_connections" : {
"mojolicious" : {{ to_mojo_max_db_connections }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#}
{
"cache_stats_db_name": "{{ to_influxdb_cache_stats_db_name }}",
"delivery_stats_db_name": "{{ to_influxdb_deliveryservice_stats_db_name }}",
"password": "{{ to_influxdb_password }}",
"user": "{{ to_influxdb_user }}",
"secure": {{ to_influxdb_secure | bool | lower }}
}

0 comments on commit 3cdb4c8

Please sign in to comment.