Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

puppet: Rename hosts_domain so hosts_prefix can be grepped for.

Alex Vandiver24383a50827d
diff --git a/puppet/zulip_ops/manifests/app_frontend.pp b/puppet/zulip_ops/manifests/app_frontend.pp
index 9d7babeba17..2902275476f 100644
--- a/puppet/zulip_ops/manifests/app_frontend.pp
+++ b/puppet/zulip_ops/manifests/app_frontend.pp
@@ -8,7 +8,7 @@ class zulip_ops::app_frontend {
'autossh',
]
package { $app_packages: ensure => 'installed' }
- $hosts_domain = zulipconf('nagios', 'hosts_domain', undef)
+ $default_host_domain = zulipconf('nagios', 'default_host_domain', undef)
file { '/etc/logrotate.d/zulip':
ensure => file,
diff --git a/puppet/zulip_ops/manifests/munin.pp b/puppet/zulip_ops/manifests/munin.pp
index 0fba03ff825..45a5383fe10 100644
--- a/puppet/zulip_ops/manifests/munin.pp
+++ b/puppet/zulip_ops/manifests/munin.pp
@@ -9,7 +9,7 @@ class zulip_ops::munin {
]
package { $munin_packages: ensure => 'installed' }
- $hosts_domain = zulipconf('nagios', 'hosts_domain', undef)
+ $default_host_domain = zulipconf('nagios', 'default_host_domain', undef)
$hosts = $zulip_ops::base::hosts
file { '/etc/munin':
diff --git a/puppet/zulip_ops/manifests/nagios.pp b/puppet/zulip_ops/manifests/nagios.pp
index aa36ee42b41..90dd46e2b37 100644
--- a/puppet/zulip_ops/manifests/nagios.pp
+++ b/puppet/zulip_ops/manifests/nagios.pp
@@ -19,7 +19,7 @@ class zulip_ops::nagios {
$nagios_mail_password = zulipsecret('secrets', 'nagios_mail_password', '')
$nagios_camo_check_url = zulipconf('nagios', 'camo_check_url', undef)
- $hosts_domain = zulipconf('nagios', 'hosts_domain', undef)
+ $default_host_domain = zulipconf('nagios', 'default_host_domain', undef)
$hosts_zmirror = split(zulipconf('nagios', 'hosts_zmirror', undef), ',')
$hosts_zmirrorp = split(zulipconf('nagios', 'hosts_zmirrorp', undef), ',')
$hosts_app_prod = split(zulipconf('nagios', 'hosts_app_prod', undef), ',')
diff --git a/puppet/zulip_ops/templates/msmtprc_nagios.template.erb b/puppet/zulip_ops/templates/msmtprc_nagios.template.erb
index c3ecf8a7c2b..637c790a93d 100644
--- a/puppet/zulip_ops/templates/msmtprc_nagios.template.erb
+++ b/puppet/zulip_ops/templates/msmtprc_nagios.template.erb
@@ -1,5 +1,5 @@
from <%= @nagios_alert_email %>
-user postmaster@nagios.<%= @hosts_domain %>
+user postmaster@nagios.<%= @default_host_domain %>
password <%= @nagios_mail_password %>
host <%= @nagios_mail_host %>
diff --git a/puppet/zulip_ops/templates/nagios3/hosts.cfg.template.erb b/puppet/zulip_ops/templates/nagios3/hosts.cfg.template.erb
index a03774cd67d..c186874e92e 100644
--- a/puppet/zulip_ops/templates/nagios3/hosts.cfg.template.erb
+++ b/puppet/zulip_ops/templates/nagios3/hosts.cfg.template.erb
@@ -3,7 +3,7 @@ define host{
use generic-host
host_name <%= host %>
alias <%= host %>
- address <%= host %>.<%= @hosts_domain %>
+ address <%= host %>.<%= @default_host_domain %>
hostgroups all,pageable_servers
}
<% end -%>
@@ -13,7 +13,7 @@ define host{
use generic-host
host_name <%= host %>
alias <%= host %>
- address <%= host %>.<%= @hosts_domain %>
+ address <%= host %>.<%= @default_host_domain %>
hostgroups all,web,frontends,prod_frontends,singletornado_frontends,pageable_servers
}
<% end -%>
@@ -33,7 +33,7 @@ define host{
use generic-host
host_name <%= host %>
alias <%= host %>
- address <%= host %>.<%= @hosts_domain %>
+ address <%= host %>.<%= @default_host_domain %>
hostgroups all,web,frontends,staging_frontends,singletornado_frontends,not_pageable_servers
}
<% end -%>
@@ -43,7 +43,7 @@ define host{
use generic-host
host_name <%= host %>
alias <%= host %>
- address <%= host %>.<%= @hosts_domain %>
+ address <%= host %>.<%= @default_host_domain %>
hostgroups all,zmirror,zmirror_main
}
<% end -%>
@@ -53,7 +53,7 @@ define host{
use generic-host
host_name <%= host %>
alias <%= host %>
- address <%= host %>.<%= @hosts_domain %>
+ address <%= host %>.<%= @default_host_domain %>
hostgroups all,zmirror,zmirrorp
}
<% end -%>
@@ -63,7 +63,7 @@ define host{
use generic-host
host_name <%= host %>
alias <%= host %>
- address <%= host %>.<%= @hosts_domain %>
+ address <%= host %>.<%= @default_host_domain %>
hostgroups all,postgres,postgres_appdb_primary,pageable_servers
}
<% end -%>
@@ -73,7 +73,7 @@ define host{
use generic-host
host_name <%= host %>
alias <%= host %>
- address <%= host %>.<%= @hosts_domain %>
+ address <%= host %>.<%= @default_host_domain %>
hostgroups all,postgres_appdb,pageable_servers
}
<% end -%>
@@ -83,7 +83,7 @@ define host{
use generic-host
host_name <%= host %>
alias <%= host %>
- address <%= host %>.<%= @hosts_domain %>
+ address <%= host %>.<%= @default_host_domain %>
hostgroups all,not_pageable_servers
}
<% end -%>
@@ -93,7 +93,7 @@ define host{
use generic-host
host_name <%= host %>
alias <%= host %>
- address <%= host %>.<%= @hosts_domain %>
+ address <%= host %>.<%= @default_host_domain %>
hostgroups all,not_pageable_servers, redis
}
<% end -%>
diff --git a/puppet/zulip_ops/templates/nagios_apache_site.conf.template.erb b/puppet/zulip_ops/templates/nagios_apache_site.conf.template.erb
index bc7b64d24bc..93b0ae88faa 100644
--- a/puppet/zulip_ops/templates/nagios_apache_site.conf.template.erb
+++ b/puppet/zulip_ops/templates/nagios_apache_site.conf.template.erb
@@ -1,15 +1,15 @@
<VirtualHost *:80>
- ServerName nagios.<%= @hosts_domain %>
- Redirect permanent / https://nagios.<%= @hosts_domain %>/
+ ServerName nagios.<%= @default_host_domain %>
+ Redirect permanent / https://nagios.<%= @default_host_domain %>/
</VirtualHost>
<VirtualHost *:443>
- ServerName nagios.<%= @hosts_domain %>
+ ServerName nagios.<%= @default_host_domain %>
SSLEngine on
- SSLCertificateFile /etc/letsencrypt/live/nagios.<%= @hosts_domain %>/cert.pem
- SSLCertificateChainFile /etc/letsencrypt/live/nagios.<%= @hosts_domain %>/fullchain.pem
- SSLCertificateKeyFile /etc/letsencrypt/live/nagios.<%= @hosts_domain %>/privkey.pem
+ SSLCertificateFile /etc/letsencrypt/live/nagios.<%= @default_host_domain %>/cert.pem
+ SSLCertificateChainFile /etc/letsencrypt/live/nagios.<%= @default_host_domain %>/fullchain.pem
+ SSLCertificateKeyFile /etc/letsencrypt/live/nagios.<%= @default_host_domain %>/privkey.pem
Header add Strict-Transport-Security "max-age=15768000"
Header add X-Frame-Options DENY
@@ -23,7 +23,7 @@
# Where the HTML pages live
Alias /nagios3 /usr/share/nagios3/htdocs
- RedirectMatch ^/?$ https://nagios.<%= @hosts_domain %>/cgi-bin/nagios3/status.cgi?host=all
+ RedirectMatch ^/?$ https://nagios.<%= @default_host_domain %>/cgi-bin/nagios3/status.cgi?host=all
<Location "/">
AuthType Digest
diff --git a/puppet/zulip_ops/templates/supervisor/conf.d/munin_tunnels.conf.erb b/puppet/zulip_ops/templates/supervisor/conf.d/munin_tunnels.conf.erb
index c0e643448a2..f09f4d2d1a9 100644
--- a/puppet/zulip_ops/templates/supervisor/conf.d/munin_tunnels.conf.erb
+++ b/puppet/zulip_ops/templates/supervisor/conf.d/munin_tunnels.conf.erb
@@ -5,7 +5,7 @@ i = 0
@hosts.each do |host|
-%>
[program:munin-tunnel-<%= host %>]
-command=autossh -2 -N -M <%= 20000 + 2 * i %> -L <%= 5000 + i %>:localhost:4949 nagios@<%= host %>.<%= @hosts_domain %>
+command=autossh -2 -N -M <%= 20000 + 2 * i %> -L <%= 5000 + i %>:localhost:4949 nagios@<%= host %>.<%= @default_host_domain %>
priority=200 ; the relative start priority (default 999)
autostart=true ; start at supervisord start (default: true)
autorestart=true ; whether/when to restart (default: unexpected)
diff --git a/puppet/zulip_ops/templates/supervisor/conf.d/redis_tunnel.conf.template.erb b/puppet/zulip_ops/templates/supervisor/conf.d/redis_tunnel.conf.template.erb
index daad304e9ca..93c7e66e3d9 100644
--- a/puppet/zulip_ops/templates/supervisor/conf.d/redis_tunnel.conf.template.erb
+++ b/puppet/zulip_ops/templates/supervisor/conf.d/redis_tunnel.conf.template.erb
@@ -1,5 +1,5 @@
[program:redis-tunnel]
-command=autossh -M 0 -N -L 127.0.0.1:6379:127.0.0.1:6379 -o ServerAliveInterval=30 -o ServerAliveCountMax=3 redis0.<%= @hosts_domain %>
+command=autossh -M 0 -N -L 127.0.0.1:6379:127.0.0.1:6379 -o ServerAliveInterval=30 -o ServerAliveCountMax=3 redis0.<%= @default_host_domain %>
priority=50
user=zulip
autostart=true