diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-02-28 03:32:06 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-02-28 03:32:06 -0500 |
commit | 67b3a2808db2d47ed47d5f56c521eacf19099efd (patch) | |
tree | bde624f16a850eb3f29072acd9ca3fe4cd87fd0c /modules | |
parent | 5f26eacc6f10750c805d45d3aae84b1eea94d637 (diff) | |
download | puppet-tozt-67b3a2808db2d47ed47d5f56c521eacf19099efd.tar.gz puppet-tozt-67b3a2808db2d47ed47d5f56c521eacf19099efd.zip |
start on some changes for influxdb 2.0
remove chronograf, move to token auth instead of http basic auth
need to remove kapacitor too, but have to port the alerts first
Diffstat (limited to 'modules')
-rw-r--r-- | modules/certbot/manifests/init.pp | 1 | ||||
-rw-r--r-- | modules/tick/files/chronograf | 2 | ||||
-rw-r--r-- | modules/tick/manifests/server.pp | 1 | ||||
-rw-r--r-- | modules/tick/manifests/server/chronograf.pp | 23 | ||||
-rw-r--r-- | modules/tick/templates/telegraf.conf | 7 | ||||
-rw-r--r-- | modules/tozt/files/nginx/chronograf-tls.conf | 16 | ||||
-rw-r--r-- | modules/tozt/files/nginx/chronograf.conf | 10 | ||||
-rw-r--r-- | modules/tozt/files/nginx/influxdb-tls.conf | 2 | ||||
-rw-r--r-- | modules/tozt/manifests/tick.pp | 14 |
9 files changed, 4 insertions, 72 deletions
diff --git a/modules/certbot/manifests/init.pp b/modules/certbot/manifests/init.pp index 200b854..c8ca213 100644 --- a/modules/certbot/manifests/init.pp +++ b/modules/certbot/manifests/init.pp @@ -18,7 +18,6 @@ class certbot($config_dir=undef) { "rc-teleterm.tozt.net", "bitwarden.tozt.net", "influxdb.tozt.net", - "chronograf.tozt.net", ] package { diff --git a/modules/tick/files/chronograf b/modules/tick/files/chronograf deleted file mode 100644 index 1baf186..0000000 --- a/modules/tick/files/chronograf +++ /dev/null @@ -1,2 +0,0 @@ -HOST=127.0.0.1 -BOLT_PATH=/media/persistent/chronograf/chronograf-v1.db diff --git a/modules/tick/manifests/server.pp b/modules/tick/manifests/server.pp index 81c54c9..e9a52ba 100644 --- a/modules/tick/manifests/server.pp +++ b/modules/tick/manifests/server.pp @@ -1,5 +1,4 @@ class tick::server { contain tick::server::influxdb - contain tick::server::chronograf contain tick::server::kapacitor } diff --git a/modules/tick/manifests/server/chronograf.pp b/modules/tick/manifests/server/chronograf.pp deleted file mode 100644 index 068539e..0000000 --- a/modules/tick/manifests/server/chronograf.pp +++ /dev/null @@ -1,23 +0,0 @@ -class tick::server::chronograf { - package::makepkg { 'chronograf-bin': - ensure => installed; - } - - file { - "/etc/default/chronograf": - source => "puppet:///modules/tick/chronograf", - require => Package::Makepkg['chronograf-bin'], - notify => Service['chronograf']; - "/media/persistent/chronograf": - ensure => directory, - owner => "chronograf", - group => "chronograf", - require => Package::Makepkg['chronograf-bin']; - } - - service { 'chronograf': - ensure => running, - enable => true, - require => Package::Makepkg['chronograf-bin']; - } -} diff --git a/modules/tick/templates/telegraf.conf b/modules/tick/templates/telegraf.conf index ba307bd..4fffce8 100644 --- a/modules/tick/templates/telegraf.conf +++ b/modules/tick/templates/telegraf.conf @@ -10,7 +10,8 @@ precision = "" hostname = "" omit_hostname = false -[[outputs.influxdb]] +[[outputs.influxdb_v2]] urls = ["https://influxdb.tozt.net"] - username = "<%= @influxdb_username %>" - password = "<%= @influxdb_password %>" + token = "<%= @influxdb_token %>" + organization = "tozt" + bucket = "telegraf" diff --git a/modules/tozt/files/nginx/chronograf-tls.conf b/modules/tozt/files/nginx/chronograf-tls.conf deleted file mode 100644 index 87a5447..0000000 --- a/modules/tozt/files/nginx/chronograf-tls.conf +++ /dev/null @@ -1,16 +0,0 @@ -server { - listen 443 ssl; - server_name chronograf.tozt.net; - - access_log /var/log/nginx/chronograf.access.log; - error_log /var/log/nginx/chronograf.error.log; - - include ssl; - - location / { - proxy_pass http://127.0.0.1:8888/; - auth_basic "chronograf"; - auth_basic_user_file "/media/persistent/chronograf.htpasswd"; - } -} -# vim:ft=nginx diff --git a/modules/tozt/files/nginx/chronograf.conf b/modules/tozt/files/nginx/chronograf.conf deleted file mode 100644 index 9011fd6..0000000 --- a/modules/tozt/files/nginx/chronograf.conf +++ /dev/null @@ -1,10 +0,0 @@ -server { - listen 80; - server_name chronograf.tozt.net; - - access_log /var/log/nginx/chronograf.access.log; - error_log /var/log/nginx/chronograf.error.log; - - rewrite ^(.*) https://$host$1 permanent; -} -# vim:ft=nginx diff --git a/modules/tozt/files/nginx/influxdb-tls.conf b/modules/tozt/files/nginx/influxdb-tls.conf index bf52358..2341261 100644 --- a/modules/tozt/files/nginx/influxdb-tls.conf +++ b/modules/tozt/files/nginx/influxdb-tls.conf @@ -9,8 +9,6 @@ server { location / { proxy_pass http://127.0.0.1:8086/; - auth_basic "influxdb"; - auth_basic_user_file "/media/persistent/influxdb.htpasswd"; } } # vim:ft=nginx diff --git a/modules/tozt/manifests/tick.pp b/modules/tozt/manifests/tick.pp index 58da090..8eedf26 100644 --- a/modules/tozt/manifests/tick.pp +++ b/modules/tozt/manifests/tick.pp @@ -23,25 +23,11 @@ class tozt::tick { source => 'puppet:///modules/tozt/kapacitor/partofme-data.tick'; } - secret { - "/media/persistent/influxdb.htpasswd": - source => 'influxdb_htpasswd', - owner => 'http'; - "/media/persistent/chronograf.htpasswd": - source => 'chronograf_htpasswd', - owner => 'http'; - } - nginx::site { "influxdb-tls": source => 'puppet:///modules/tozt/nginx/influxdb-tls.conf', require => Class['certbot']; "influxdb": source => 'puppet:///modules/tozt/nginx/influxdb.conf'; - "chronograf-tls": - source => 'puppet:///modules/tozt/nginx/chronograf-tls.conf', - require => Class['certbot']; - "chronograf": - source => 'puppet:///modules/tozt/nginx/chronograf.conf'; } } |