[manual] Move /etc/humbug-* files into /etc/zulip

The moved files are:
humbug-server
humbug-local
humbug-machinetype

Their new names are their old names with 'humbug-' removed.

zulip-puppet-apply must be run before this commit is deployed

(imported from commit f4eb523244d3409b5809c279301225d3fdf0c230)
This commit is contained in:
Zev Benjamin 2013-10-28 17:24:33 -04:00
parent 09acf1c22d
commit 57bef07832
8 changed files with 18 additions and 11 deletions

View File

@ -15,8 +15,8 @@ logging.basicConfig(format="%(asctime)s restart-server: %(message)s",
deploy_path = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))
os.chdir(deploy_path)
if os.path.exists("/etc/humbug-server"):
with open("/etc/humbug-machinetype") as mtf:
if os.path.exists("/etc/zulip/server"):
with open("/etc/zulip/machinetype") as mtf:
if pwd.getpwuid(os.getuid())[0] != "zulip":
logging.error("Must be run as user 'zulip'.")
sys.exit(1)

View File

@ -1,9 +1,9 @@
#!/bin/sh
export AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxxx
export AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
if grep -q postgres /etc/humbug-machinetype; then
if grep -q postgres /etc/zulip/machinetype; then
export WALE_S3_PREFIX=s3://humbug-postgres-backups
else
export WALE_S3_PREFIX=s3://humbug-postgres-`cat /etc/humbug-machinetype`-backups
export WALE_S3_PREFIX=s3://humbug-postgres-`cat /etc/zulip/machinetype`-backups
fi
exec /usr/local/bin/wal-e "$@"

View File

@ -56,10 +56,17 @@ class zulip::base {
# This is just an empty file. It's used by the app to test if it's running
# in production.
file { '/etc/humbug-server':
file { '/etc/zulip/server':
ensure => file,
mode => 644,
source => 'puppet:///modules/zulip/humbug-server',
content => '',
}
file { '/etc/zulip':
ensure => 'directory',
mode => 644,
owner => 'zulip',
group => 'zulip',
}
file { '/etc/puppet/puppet.conf':

View File

@ -1,7 +1,7 @@
class zulip ($machinetype) {
class { "zulip::$machinetype": }
file { '/etc/humbug-machinetype':
file { '/etc/zulip/machinetype':
ensure => file,
mode => 644,
content => "$machinetype\n",

View File

@ -36,10 +36,10 @@ class zulip::local_server {
# This is just an empty file. It's used by the app to test if it's running
# on a local server.
file { '/etc/zulip-local':
file { '/etc/zulip/local':
ensure => file,
mode => 644,
source => 'puppet:///modules/zulip/humbug-server',
content => '',
}
file { "/usr/share/postgresql/9.1/tsearch_data/zulip_english.stop":

View File

@ -47,7 +47,7 @@ EMAIL_PORT = 587
# Whether we're running in a production environment. Note that DEPLOYED does
# **not** mean hosted by us; customer sites are DEPLOYED and LOCAL_SERVER
# and as such should not for example assume they are the main Zulip site.
DEPLOYED = os.path.exists('/etc/humbug-server')
DEPLOYED = os.path.exists('/etc/zulip/server')
STAGING_DEPLOYED = (platform.node() == 'staging.zulip.net')
TESTING_DEPLOYED = not not re.match(r'^test', platform.node())

View File

@ -13,7 +13,7 @@ from zerver.openid import openid_failure_handler
# Whether we're running in a production environment. Note that DEPLOYED does
# **not** mean hosted by us; customer sites are DEPLOYED and LOCAL_SERVER
# and as such should not for example assume they are the main Zulip site.
DEPLOYED = os.path.exists('/etc/humbug-server')
DEPLOYED = os.path.exists('/etc/zulip/server')
STAGING_DEPLOYED = (platform.node() == 'staging.zulip.net')
TESTING_DEPLOYED = not not re.match(r'^test', platform.node())