mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 00:18:12 +00:00
Before we deploy this commit, we must migrate the data from the staging redis server to the new, dedicated redis server. The steps for doing so are the following: * Remove the zulip::redis puppet class from staging's zulip.conf * ssh once from staging to redis-staging.zulip.net so that the host key is known * Create a tunnel from redis0.zulip.net to staging.zulip.net * zulip@redis0:~$ ssh -N -L 127.0.0.1:6380:127.0.0.1:6379 -o ServerAliveInterval=30 -o ServerAliveCountMax=3 staging.zulip.net * Set the redis instance on redis0.zulip.net to replicate the one on staging.zulip.net * redis 127.0.0.1:6379> slaveof 127.0.0.1 6380 * Stop the app on staging * Stop redis-server on staging * Promote the redis server on redis0.zulip.net to a master * redis 127.0.0.1:6379> slaveof no one * Do a puppet apply at this commit on staging (this will bring up the tunnel to redis0) * Deploy this commit to staging (start the app on staging) * Kill the tunnel from redis0.zulip.net to staging.zulip.net * Uninstall redis-server on staging The steps for migrating prod will be the same modulo s/staging/prod0/. (imported from commit 546d258883ac299d65e896710edd0974b6bd60f8)
56 lines
1.7 KiB
Puppet
56 lines
1.7 KiB
Puppet
class zulip_internal::app_frontend {
|
|
include zulip::app_frontend
|
|
include zulip::postfix_localmail
|
|
$app_packages = [# Needed for minify-js
|
|
"yui-compressor",
|
|
"nodejs",
|
|
# Needed for statsd reporting
|
|
"python-django-statsd-mozilla",
|
|
# Needed only for a disabled integration
|
|
"python-embedly",
|
|
# Needed for the ssh tunnel to the redis server
|
|
"autossh",
|
|
]
|
|
package { $app_packages: ensure => "installed" }
|
|
|
|
file { "/etc/nginx/zulip-include/app.d/accept-loadbalancer.conf":
|
|
require => Package["nginx-full"],
|
|
owner => "root",
|
|
group => "root",
|
|
mode => 644,
|
|
source => "puppet:///modules/zulip_internal/nginx/zulip-include-app.d/accept-loadbalancer.conf",
|
|
notify => Service["nginx"],
|
|
}
|
|
|
|
file { '/etc/log2zulip.conf':
|
|
ensure => file,
|
|
owner => "zulip",
|
|
group => "zulip",
|
|
mode => 644,
|
|
source => 'puppet:///modules/zulip_internal/log2zulip.conf',
|
|
}
|
|
|
|
file { '/etc/cron.d/log2zulip':
|
|
ensure => file,
|
|
owner => "root",
|
|
group => "root",
|
|
mode => 644,
|
|
source => 'puppet:///modules/zulip_internal/cron.d/log2zulip',
|
|
}
|
|
|
|
file { '/etc/log2zulip.zuliprc':
|
|
ensure => file,
|
|
owner => "zulip",
|
|
group => "zulip",
|
|
mode => 600,
|
|
source => 'puppet:///modules/zulip_internal/log2zulip.zuliprc',
|
|
}
|
|
file { "/etc/cron.d/check-apns-tokens":
|
|
ensure => file,
|
|
owner => "root",
|
|
group => "root",
|
|
mode => 644,
|
|
source => "puppet:///modules/zulip_internal/cron.d/check-apns-tokens",
|
|
}
|
|
}
|