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: Remove puppet_ops configuration for separate loadbalancer host.

Alex Vandiver0b736ef4cf70
diff --git a/docs/production/deployment.md b/docs/production/deployment.md
index fa5fc2546ef..b2ad1211b73 100644
--- a/docs/production/deployment.md
+++ b/docs/production/deployment.md
@@ -255,11 +255,8 @@ For `nginx` configuration, there's two things you need to set up:
settings. E.g. if you don't set `client_max_body_size`, it won't be
possible to upload large files to your Zulip server.
* The `nginx` site-specific configuration (in
- `/etc/nginx/sites-available`) for the Zulip app. You can look at
- our [nginx reverse proxy configuration][nginx-loadbalancer] to see
- an example of how to do this properly (the various include files are
- available via the `zulip::nginx` Puppet module). Or modify this
- example:
+ `/etc/nginx/sites-available`) for the Zulip app. The following
+ example is a good starting point:
```
server {
@@ -285,11 +282,9 @@ Don't forget to update `server_name`, `ssl_certificate`,
`ssl_certificate_key` and `proxy_pass` with the appropriate values for
your installation.
-[nginx-proxy-config]: https://github.com/zulip/zulip/blob/master/puppet/zulip/files/nginx/zulip-include-common/proxy
[nginx-proxy-longpolling-config]: https://github.com/zulip/zulip/blob/master/puppet/zulip/files/nginx/zulip-include-common/proxy_longpolling
[standalone.pp]: https://github.com/zulip/zulip/blob/master/puppet/zulip/manifests/profile/standalone.pp
[zulipchat-puppet]: https://github.com/zulip/zulip/tree/master/puppet/zulip_ops/manifests
-[nginx-loadbalancer]: https://github.com/zulip/zulip/blob/master/puppet/zulip_ops/files/nginx/sites-available/loadbalancer
### Apache2 configuration
diff --git a/puppet/zulip_ops/files/nginx/sites-available/loadbalancer b/puppet/zulip_ops/files/nginx/sites-available/loadbalancer
deleted file mode 100644
index 602df25fefe..00000000000
--- a/puppet/zulip_ops/files/nginx/sites-available/loadbalancer
+++ /dev/null
@@ -1,156 +0,0 @@
-upstream staging {
- server staging0.zulipchat.net:443;
-
- keepalive 10000;
-}
-
-upstream prod {
- server prod0.zulipchat.net:443;
-
- keepalive 10000;
-}
-
-server {
- listen 80;
- location / {
- return 301 https://$host$request_uri;
- }
-
- include /etc/nginx/zulip-include/certbot;
-}
-
-server {
- listen www.zulipstaging.com:443 http2;
- server_name www.zulipstaging.com;
-
- ssl on;
- ssl_certificate /etc/letsencrypt/live/zulipchat.com/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/zulipchat.com/privkey.pem;
-
- location / {
- return 301 https://zulipstaging.com$request_uri;
- }
-
- include /etc/nginx/zulip-include/certbot;
-}
-
-server {
- # The listen needs to be `www.zulipstaging.com` since bare zulipstaging.com
- # is not a CNAME and thus has the public IP inside EC2
- listen www.zulipstaging.com:443 http2;
- server_name zulipstaging.com *.zulipstaging.com;
-
- ssl on;
- ssl_certificate /etc/letsencrypt/live/zulipchat.com/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/zulipchat.com/privkey.pem;
-
- location / {
- proxy_pass https://staging/;
- include /etc/nginx/zulip-include/proxy;
- }
-
- # We don't need /api/v1/events/internal, because that doesn't go through the loadbalancer.
- location /json/events {
- proxy_pass https://staging;
- include /etc/nginx/zulip-include/proxy_longpolling;
- }
-
- location /api/v1/events {
- proxy_pass https://staging;
- include /etc/nginx/zulip-include/proxy_longpolling;
- }
-
- include /etc/nginx/zulip-include/certbot;
-}
-
-server {
- # The listen needs to be `www.zulipchat.com` since bare zulipchat.com
- # is not a CNAME and thus has the public IP inside EC2
- listen www.zulipchat.com:443 http2;
- server_name www.zulipchat.com zulipchat.com www.zulip.com;
-
- ssl on;
- ssl_certificate /etc/letsencrypt/live/zulipchat.com/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/zulipchat.com/privkey.pem;
-
- location / {
- return 301 https://zulip.com$request_uri;
- }
-
- location /static {
- # The app loads static files from https://zulipchat.com/static,
- # so skip the redirect for those.
- proxy_pass https://prod;
- include /etc/nginx/zulip-include/proxy;
- }
-
- include /etc/nginx/zulip-include/certbot;
-}
-
-server {
- # The listen needs to be `www.zulipchat.com` since bare zulipchat.com
- # is not a CNAME and thus has the public IP inside EC2
- listen www.zulipchat.com:443 default_server http2;
- server_name *.zulipchat.com zulip.com *.zulip.com;
-
- ssl on;
- ssl_certificate /etc/letsencrypt/live/zulipchat.com/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/zulipchat.com/privkey.pem;
-
- location / {
- proxy_pass https://prod;
- include /etc/nginx/zulip-include/proxy;
- }
-
- location /json/events {
- proxy_pass https://prod;
- include /etc/nginx/zulip-include/proxy_longpolling;
- }
-
- location /api/v1/events {
- proxy_pass https://prod;
- include /etc/nginx/zulip-include/proxy_longpolling;
- }
-
- include /etc/nginx/zulip-include/certbot;
-}
-
-server {
- listen chat.fhir.org:443 http2;
- server_name chat.fhir.org;
- ssl_certificate /etc/letsencrypt/live/chat.fhir.org/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/chat.fhir.org/privkey.pem;
-
- location / {
- proxy_pass https://prod;
- include /etc/nginx/zulip-include/proxy;
- }
-
- location /json/events {
- proxy_pass https://prod;
- include /etc/nginx/zulip-include/proxy_longpolling;
- }
-
- location /api/v1/events {
- proxy_pass https://prod;
- include /etc/nginx/zulip-include/proxy_longpolling;
- }
-
- include /etc/nginx/zulip-include/certbot;
-}
-
-server {
- listen uploads.zulipusercontent.net:443 http2;
- server_name uploads.zulipusercontent.net;
-
- ssl on;
- ssl_certificate /etc/letsencrypt/live/uploads.zulipusercontent.net/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/uploads.zulipusercontent.net/privkey.pem;
-
- location / {
- proxy_pass http://127.0.0.1:9292;
- include /etc/nginx/zulip-include/proxy;
- }
-
- include /etc/nginx/zulip-include/certbot;
-}
diff --git a/puppet/zulip_ops/manifests/profile/loadbalancer.pp b/puppet/zulip_ops/manifests/profile/loadbalancer.pp
deleted file mode 100644
index d438b087a23..00000000000
--- a/puppet/zulip_ops/manifests/profile/loadbalancer.pp
+++ /dev/null
@@ -1,27 +0,0 @@
-class zulip_ops::profile::loadbalancer {
- include zulip_ops::profile::base
- include zulip::nginx
- include zulip::camo
-
- file { '/etc/nginx/sites-available/loadbalancer':
- ensure => file,
- require => Package['nginx-full'],
- owner => 'root',
- group => 'root',
- mode => '0644',
- source => 'puppet:///modules/zulip_ops/nginx/sites-available/loadbalancer',
- notify => Service['nginx'],
- }
-
- file { '/etc/nginx/sites-enabled/loadbalancer':
- ensure => 'link',
- require => Package['nginx-full'],
- target => '/etc/nginx/sites-available/loadbalancer',
- notify => Service['nginx'],
- }
-
- # Can be removed if you see it deployed:
- file { '/etc/cron.d/log2zulip':
- ensure => absent,
- }
-}
diff --git a/puppet/zulip_ops/manifests/profile/nagios.pp b/puppet/zulip_ops/manifests/profile/nagios.pp
index 01fdbdb5429..742f2bffa89 100644
--- a/puppet/zulip_ops/manifests/profile/nagios.pp
+++ b/puppet/zulip_ops/manifests/profile/nagios.pp
@@ -27,7 +27,6 @@ class zulip_ops::profile::nagios {
$hosts_postgresql_primary = split(zulipconf('nagios', 'hosts_postgresql_primary', undef), ',')
$hosts_postgresql_replica = split(zulipconf('nagios', 'hosts_postgresql_replica', undef), ',')
$hosts_redis = split(zulipconf('nagios', 'hosts_redis', undef), ',')
- $hosts_loadbalancer = split(zulipconf('nagios', 'hosts_loadbalancer', undef), ',')
$hosts_stats = split(zulipconf('nagios', 'hosts_stats', undef), ',')
$hosts_fullstack = split(zulipconf('nagios', 'hosts_fullstack', undef), ',')
diff --git a/puppet/zulip_ops/templates/nagios3/hosts.cfg.template.erb b/puppet/zulip_ops/templates/nagios3/hosts.cfg.template.erb
index d7aa398fa7d..08409989f49 100644
--- a/puppet/zulip_ops/templates/nagios3/hosts.cfg.template.erb
+++ b/puppet/zulip_ops/templates/nagios3/hosts.cfg.template.erb
@@ -1,13 +1,3 @@
-<% @hosts_loadbalancer.each do |host| -%>
-define host{
- use generic-host
- host_name <%= host %>
- alias <%= host %>
- address <%= host %>.<%= @default_host_domain %>
- hostgroups all,pageable_servers
- }
-<% end -%>
-
<% @hosts_app_prod.each do |host| -%>
define host{
use generic-host