mirror of https://github.com/zulip/zulip.git
[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:
parent
09acf1c22d
commit
57bef07832
|
@ -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__), '..'))
|
deploy_path = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))
|
||||||
os.chdir(deploy_path)
|
os.chdir(deploy_path)
|
||||||
|
|
||||||
if os.path.exists("/etc/humbug-server"):
|
if os.path.exists("/etc/zulip/server"):
|
||||||
with open("/etc/humbug-machinetype") as mtf:
|
with open("/etc/zulip/machinetype") as mtf:
|
||||||
if pwd.getpwuid(os.getuid())[0] != "zulip":
|
if pwd.getpwuid(os.getuid())[0] != "zulip":
|
||||||
logging.error("Must be run as user 'zulip'.")
|
logging.error("Must be run as user 'zulip'.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
export AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxxx
|
export AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxxx
|
||||||
export AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
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
|
export WALE_S3_PREFIX=s3://humbug-postgres-backups
|
||||||
else
|
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
|
fi
|
||||||
exec /usr/local/bin/wal-e "$@"
|
exec /usr/local/bin/wal-e "$@"
|
||||||
|
|
|
@ -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
|
# This is just an empty file. It's used by the app to test if it's running
|
||||||
# in production.
|
# in production.
|
||||||
file { '/etc/humbug-server':
|
file { '/etc/zulip/server':
|
||||||
ensure => file,
|
ensure => file,
|
||||||
mode => 644,
|
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':
|
file { '/etc/puppet/puppet.conf':
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class zulip ($machinetype) {
|
class zulip ($machinetype) {
|
||||||
class { "zulip::$machinetype": }
|
class { "zulip::$machinetype": }
|
||||||
|
|
||||||
file { '/etc/humbug-machinetype':
|
file { '/etc/zulip/machinetype':
|
||||||
ensure => file,
|
ensure => file,
|
||||||
mode => 644,
|
mode => 644,
|
||||||
content => "$machinetype\n",
|
content => "$machinetype\n",
|
||||||
|
|
|
@ -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
|
# This is just an empty file. It's used by the app to test if it's running
|
||||||
# on a local server.
|
# on a local server.
|
||||||
file { '/etc/zulip-local':
|
file { '/etc/zulip/local':
|
||||||
ensure => file,
|
ensure => file,
|
||||||
mode => 644,
|
mode => 644,
|
||||||
source => 'puppet:///modules/zulip/humbug-server',
|
content => '',
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/usr/share/postgresql/9.1/tsearch_data/zulip_english.stop":
|
file { "/usr/share/postgresql/9.1/tsearch_data/zulip_english.stop":
|
||||||
|
|
|
@ -47,7 +47,7 @@ EMAIL_PORT = 587
|
||||||
# Whether we're running in a production environment. Note that DEPLOYED does
|
# Whether we're running in a production environment. Note that DEPLOYED does
|
||||||
# **not** mean hosted by us; customer sites are DEPLOYED and LOCAL_SERVER
|
# **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.
|
# 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')
|
STAGING_DEPLOYED = (platform.node() == 'staging.zulip.net')
|
||||||
TESTING_DEPLOYED = not not re.match(r'^test', platform.node())
|
TESTING_DEPLOYED = not not re.match(r'^test', platform.node())
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ from zerver.openid import openid_failure_handler
|
||||||
# Whether we're running in a production environment. Note that DEPLOYED does
|
# Whether we're running in a production environment. Note that DEPLOYED does
|
||||||
# **not** mean hosted by us; customer sites are DEPLOYED and LOCAL_SERVER
|
# **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.
|
# 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')
|
STAGING_DEPLOYED = (platform.node() == 'staging.zulip.net')
|
||||||
TESTING_DEPLOYED = not not re.match(r'^test', platform.node())
|
TESTING_DEPLOYED = not not re.match(r'^test', platform.node())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue