Use standard HTTP ports

Depends-On: Id94cae82b2bea92e049975ccc9e91e4383f52931

Change-Id: I32c65d039edf1cb625189bb92837b6e6e647dc86
This commit is contained in:
Swann Croiset 2016-07-05 15:30:44 +02:00
parent 4e2d74d3c0
commit 8081acf234
3 changed files with 13 additions and 7 deletions

View File

@ -17,7 +17,6 @@ notice('fuel-plugin-influxdb-grafana: grafana_configuration.pp')
$deployment_id = hiera('deployment_id')
$master_ip = hiera('master_ip')
$vip = hiera('lma::influxdb::vip')
$grafana_port = hiera('lma::influxdb::grafana_port')
$influxdb_port = hiera('lma::influxdb::influxdb_port')
$grafana_link_created_file = '/var/cache/grafana_link_created'
@ -44,13 +43,13 @@ if hiera('lma::grafana::tls::enabled') {
$protocol = 'https'
$grafana_hostname = hiera('lma::grafana::tls::hostname')
$grafana_link_data = "{\"title\":\"Grafana\",\
\"description\":\"Dashboard for visualizing metrics (${grafana_hostname}: ${protocol}://${vip}:${grafana_port})\",\
\"url\":\"${protocol}://${grafana_hostname}:${grafana_port}/\"}"
\"description\":\"Dashboard for visualizing metrics (${grafana_hostname}: ${protocol}://${vip})\",\
\"url\":\"${protocol}://${grafana_hostname}/\"}"
} else {
$protocol = 'http'
$grafana_link_data = "{\"title\":\"Grafana\",\
\"description\":\"Dashboard for visualizing metrics\",\
\"url\":\"${protocol}://${vip}:${grafana_port}/\"}"
\"url\":\"${protocol}://${vip}\"}"
}
grafana_datasource { 'lma':
@ -61,7 +60,7 @@ grafana_datasource { 'lma':
database => $influxdb_database,
access_mode => 'proxy',
is_default => true,
grafana_url => "${protocol}://${vip}:${grafana_port}",
grafana_url => "${protocol}://${vip}",
grafana_user => $admin_username,
grafana_password => $admin_password,
}
@ -71,6 +70,7 @@ class {'lma_monitoring_analytics::grafana_dashboards':
admin_password => $admin_password,
protocol => $protocol,
host => $vip,
port => hiera('lma::influxdb::grafana_frontend_port'),
import_elasticsearch => $import_elasticsearch,
import_influxdb => $import_influxdb,
require => Grafana_datasource['lma'],

View File

@ -18,6 +18,7 @@ $nodes_ips = hiera('lma::influxdb::raft_nodes')
$nodes_names = prefix(range(1, size($nodes_ips)), 'server_')
$influxdb_port = hiera('lma::influxdb::influxdb_port')
$grafana_port = hiera('lma::influxdb::grafana_port')
$grafana_frontend_port = hiera('lma::influxdb::grafana_frontend_port')
$influxdb_grafana = hiera_hash('influxdb_grafana')
Openstack::Ha::Haproxy_service {
@ -52,7 +53,7 @@ if hiera('lma::grafana::tls::enabled') {
order => '801',
internal_ssl => true,
internal_ssl_path => hiera('lma::grafana::tls::cert_file_path'),
listen_port => $grafana_port,
listen_port => $grafana_frontend_port,
balancermember_port => $grafana_port,
haproxy_config_options => {
'option' => ['httplog', 'dontlog-normal'],
@ -63,7 +64,7 @@ if hiera('lma::grafana::tls::enabled') {
} else {
openstack::ha::haproxy_service { $grafana_haproxy_service:
order => '801',
listen_port => $grafana_port,
listen_port => $grafana_frontend_port,
balancermember_port => $grafana_port,
haproxy_config_options => {
'option' => ['httplog', 'dontlog-normal'],

View File

@ -106,6 +106,11 @@ lma::influxdb::data_dir: "/var/lib/influxdb"
lma::influxdb::listen_address: "<%= @listen_address %>"
lma::influxdb::influxdb_port: 8086
lma::influxdb::grafana_port: 8000
<% if @tls_enabled -%>
lma::influxdb::grafana_frontend_port: 443
<% else -%>
lma::influxdb::grafana_frontend_port: 80
<% end -%>
lma::influxdb::raft_leader: <%= @leader_ip_address == @listen_address ? "true" : "false" %>
lma::influxdb::raft_nodes: # The first node is the leader
- "<%= @leader_ip_address %>"