diff --git a/doc/source/grafyaml.rst b/doc/source/grafyaml.rst index 47daef2bab..5f156880af 100644 --- a/doc/source/grafyaml.rst +++ b/doc/source/grafyaml.rst @@ -12,7 +12,7 @@ At a Glance =========== :Hosts: - * http://grafana.openstack.org + * http://grafana.opendev.org :Puppet: * https://github.com/pabelanger/puppet-grafyaml :Configuration: diff --git a/hiera/common.yaml b/hiera/common.yaml index 2a8cc205a2..2b4b6de2a2 100644 --- a/hiera/common.yaml +++ b/hiera/common.yaml @@ -227,7 +227,7 @@ cacti_hosts: - gitea06.opendev.org - gitea07.opendev.org - gitea08.opendev.org -- grafana.openstack.org +- grafana01.opendev.org - graphite02.opendev.org - health.openstack.org - jvb01.opendev.org diff --git a/inventory/base/hosts.yaml b/inventory/base/hosts.yaml index a961055b8c..68b3f295f6 100644 --- a/inventory/base/hosts.yaml +++ b/inventory/base/hosts.yaml @@ -223,13 +223,6 @@ all: region_name: sjc1 public_v4: 38.108.68.205 public_v6: 2604:e100:3:0:f816:3eff:feef:a51d - grafana02.openstack.org: - ansible_host: 23.253.253.90 - location: - cloud: openstackci-rax - region_name: DFW - public_v4: 23.253.253.90 - public_v6: 2001:4800:7817:104:be76:4eff:fe04:60d5 grafana01.opendev.org: ansible_host: 198.101.251.7 location: diff --git a/inventory/service/groups.yaml b/inventory/service/groups.yaml index dd9867aaf3..ac276d5d85 100644 --- a/inventory/service/groups.yaml +++ b/inventory/service/groups.yaml @@ -72,8 +72,6 @@ groups: gitea-lb: - gitea-lb[0-9]*.opendev.org grafana: - - grafana[0-9]*.openstack.org - grafana_opendev: - grafana[0-9]*.opendev.org graphite: - graphite*.opendev.org @@ -140,7 +138,6 @@ groups: - elasticsearch[0-9]*.open*.org - ethercalc[0-9]*.open*.org - firehose[0-9]*.open*.org - - grafana[0-9]*.open*.org - health[0-9]*.openstack.org - kdc[0-9]*.open*.org - lists*.katacontainers.io @@ -175,7 +172,6 @@ groups: - elasticsearch[0-9]*.open*.org - ethercalc[0-9]*.open*.org - firehose[0-9]*.open*.org - - grafana[0-9]*.open*.org - health[0-9]*.openstack.org - kdc[0-9]*.open*.org - lists*.katacontainers.io @@ -231,7 +227,7 @@ groups: - eavesdrop[0-9]*.open*.org - ethercalc[0-9]*.open*.org - etherpad[0-9]*.open*.org - - grafana[0-9]*.open*.org + - grafana[0-9].opendev.org - graphite*.opendev.org - health[0-9]*.openstack.org - nb[0-9]*.opendev.org diff --git a/manifests/site.pp b/manifests/site.pp index bf0f78bfca..974225b716 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1,20 +1,3 @@ -# Node-OS: xenial -# Puppet-Version: !3 -node /^grafana\d*\.open.*\.org$/ { - $group = "grafana" - class { 'openstack_project::server': } - class { 'openstack_project::grafana': - admin_password => hiera('grafana_admin_password'), - admin_user => hiera('grafana_admin_user', 'username'), - mysql_host => hiera('grafana_mysql_host', 'localhost'), - mysql_name => hiera('grafana_mysql_name'), - mysql_password => hiera('grafana_mysql_password'), - mysql_user => hiera('grafana_mysql_user', 'username'), - project_config_repo => 'https://opendev.org/openstack/project-config', - secret_key => hiera('grafana_secret_key'), - } -} - # Node-OS: xenial node /^health\d*\.openstack\.org$/ { $group = "health" diff --git a/modules.env b/modules.env index ca5d889c62..27bbe4b574 100644 --- a/modules.env +++ b/modules.env @@ -56,7 +56,6 @@ SOURCE_MODULES["https://github.com/vamsee/puppet-solr"]="0.0.8" SOURCE_MODULES["https://github.com/voxpupuli/puppet-alternatives"]="0.3.0" SOURCE_MODULES["https://github.com/voxpupuli/puppet-archive"]="v0.5.1" SOURCE_MODULES["https://github.com/voxpupuli/puppet-git_resource"]="0.3.0" -SOURCE_MODULES["https://github.com/voxpupuli/puppet-grafana"]="v6.0.0" SOURCE_MODULES["https://github.com/voxpupuli/puppet-nodejs"]="v2.3.0" diff --git a/modules/openstack_project/manifests/grafana.pp b/modules/openstack_project/manifests/grafana.pp deleted file mode 100644 index cc4ab215a7..0000000000 --- a/modules/openstack_project/manifests/grafana.pp +++ /dev/null @@ -1,102 +0,0 @@ -# == Class: openstack_project::grafana -# -# === Parameters -# [*cfg*] -# Manages the Grafana configuration file. The upstream puppet-grafana module -# documentaion: https://github.com/bfraser/puppet-grafana#cfg -# -class openstack_project::grafana ( - $mysql_password, - $admin_password = '', - $admin_user = 'admin', - $grafana_cfg = {}, - $http_host = '127.0.0.1', - $http_port = '8080', - $mysql_host = '127.0.0.1', - $mysql_name = 'grafana', - $mysql_user = 'grafana', - $project_config_repo = '', - $secret_key = '', - $vhost_name = $::fqdn, -) { - include ::httpd - - $grafana_cfg_defaults = { - # NOTE(pabelanger): app_mode must be the first key! - 'app_mode' => 'production', - 'analytics' => { - 'reporting_enabled' => false, - }, - 'auth.anonymous' => { - 'enabled' => true, - }, - 'database' => { - 'type' => 'mysql', - 'host' => "${mysql_host}:3306", - 'name' => $mysql_name, - 'user' => $mysql_user, - 'password' => $mysql_password, - }, - 'security' => { - 'admin_password' => $admin_password, - 'admin_user' => $admin_user, - 'secret_key' => $secret_key, - }, - 'server' => { - 'http_addr' => $http_host, - 'http_port' => $http_port, - }, - 'users' => { - 'allow_sign_up' => false, - }, - } - - $grafana_cfg_merged = merge($grafana_cfg_defaults, $grafana_cfg) - - $version = 'latest' - - class { '::grafana': - cfg => $grafana_cfg_merged, - # Note that we can't use archive because that install_method requires - # the camptocamp-archive module but we have puppetcommunity-archive - # in modules.env, and puppet only supports having one in the modulepath - # at a time. - install_method => 'repo', - version => $version, - } - - ::httpd::vhost { $vhost_name: - docroot => 'MEANINGLESS ARGUMENT', - port => 80, - priority => '50', - template => 'openstack_project/grafana.vhost.erb', - } - - if ! defined(Httpd::Mod['rewrite']) { - httpd::mod { 'rewrite': - ensure => present, - } - } - - if ! defined(Httpd::Mod['proxy']) { - httpd::mod { 'proxy': - ensure => present, - } - } - - if ! defined(Httpd::Mod['proxy_http']) { - httpd::mod { 'proxy_http': - ensure => present, - } - } - - class { '::project_config': - url => $project_config_repo, - } - - class { '::grafyaml': - config_dir => $::project_config::grafana_dashboards_dir, - grafana_url => "http://${admin_user}:${admin_password}@${http_host}:${http_port}", - require => Class['grafana'], - } -} diff --git a/modules/openstack_project/templates/grafana.vhost.erb b/modules/openstack_project/templates/grafana.vhost.erb deleted file mode 100644 index 9029b1c90b..0000000000 --- a/modules/openstack_project/templates/grafana.vhost.erb +++ /dev/null @@ -1,16 +0,0 @@ -# ************************************ -# Managed by Puppet -# ************************************ - -NameVirtualHost <%= @vhost_name %>:<%= @port %> -:<%= @port %>> - ServerName <%= @srvname %> - - ProxyPass / http://127.0.0.1:8080/ retry=0 nocanon - ProxyPassReverse / http://127.0.0.1:8080/ - - ErrorLog /var/log/apache2/<%= @name %>_error.log - LogLevel warn - CustomLog /var/log/apache2/<%= @name %>_access.log combined - ServerSignature Off - diff --git a/playbooks/service-grafana.yaml b/playbooks/service-grafana.yaml index 8fd0607e68..4018b1df9f 100644 --- a/playbooks/service-grafana.yaml +++ b/playbooks/service-grafana.yaml @@ -1,4 +1,4 @@ -- hosts: "grafana_opendev:!disabled" +- hosts: "grafana:!disabled" name: "Base: configure grafana" roles: - iptables