diff --git a/bots/process_ccache b/bots/process_ccache index 62244e7197..08f8e487e0 100755 --- a/bots/process_ccache +++ b/bots/process_ccache @@ -19,7 +19,7 @@ file(api_key_path, "w").write(api_key + "\n") # Setup supervisord configuration supervisor_path = "/etc/supervisor/conf.d/%s.conf" % (program_name,) -template = "/home/humbug/humbug/bots/zmirror_private.conf.template" +template = "/home/humbug/zulip/bots/zmirror_private.conf.template" template_data = file(template).read() session_path = "/home/humbug/zephyr_sessions/%s" % (program_name,) diff --git a/bots/zephyr_mirror.py b/bots/zephyr_mirror.py index f01cd03664..925be92b84 100755 --- a/bots/zephyr_mirror.py +++ b/bots/zephyr_mirror.py @@ -46,7 +46,7 @@ if options.sync_subscriptions: sys.exit(0) if options.forward_class_messages and not options.noshard: - sys.path.append("/home/humbug/humbug") + sys.path.append("/home/humbug/zulip") if options.on_startup_command is not None: subprocess.call([options.on_startup_command]) from zerver.lib.parallel import run_parallel diff --git a/bots/zmirror_private.conf.template b/bots/zmirror_private.conf.template index 4a08aaf05c..30a49b2744 100644 --- a/bots/zmirror_private.conf.template +++ b/bots/zmirror_private.conf.template @@ -1,5 +1,5 @@ [program:zmirror-USERNAME] -command=python /home/humbug/humbug/bots/zephyr_mirror_backend.py --root-path=/home/humbug/humbug/bots --user=USERNAME --log-path=/home/humbug/logs/mirror-log-%(program_name)s --use-sessions --session-path=/home/humbug/zephyr_sessions/%(program_name)s --api-key-file=/home/humbug/api-keys/%(program_name)s --ignore-expired-tickets --nagios-path=/home/humbug/mirror_status/%(program_name)s --nagios-class=zulip-mirror-nagios +command=python /home/humbug/zulip/bots/zephyr_mirror_backend.py --root-path=/home/humbug/zulip/bots --user=USERNAME --log-path=/home/humbug/logs/mirror-log-%(program_name)s --use-sessions --session-path=/home/humbug/zephyr_sessions/%(program_name)s --api-key-file=/home/humbug/api-keys/%(program_name)s --ignore-expired-tickets --nagios-path=/home/humbug/mirror_status/%(program_name)s --nagios-class=zulip-mirror-nagios 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/bots/zulip_git_config.py b/bots/zulip_git_config.py index 985c12ad1f..f3707eeb30 100644 --- a/bots/zulip_git_config.py +++ b/bots/zulip_git_config.py @@ -30,5 +30,5 @@ def commit_notice_destination(repo, branch, commit): # Return None for cases where you don't want a notice sent return None -ZULIP_API_PATH = "/home/humbug/humbug/api" +ZULIP_API_PATH = "/home/humbug/zulip/api" ZULIP_SITE = "https://staging.zulip.com" diff --git a/bots/zulip_trac_config.py b/bots/zulip_trac_config.py index 0ec02c25f0..47475254ad 100644 --- a/bots/zulip_trac_config.py +++ b/bots/zulip_trac_config.py @@ -10,5 +10,5 @@ STREAM_FOR_NOTIFICATIONS = "trac" TRAC_BASE_TICKET_URL = "https://trac.zulip.net/ticket" TRAC_NOTIFY_FIELDS = ["description", "summary", "resolution", "comment", "owner"] -ZULIP_API_PATH = "/home/humbug/humbug/api" +ZULIP_API_PATH = "/home/humbug/zulip/api" ZULIP_SITE = "https://staging.zulip.com" diff --git a/servers/install-server b/servers/install-server index 4741bd4531..bd2a0ad8b9 100755 --- a/servers/install-server +++ b/servers/install-server @@ -13,7 +13,7 @@ if ! $(echo "$hostname" | grep -q zulip); then exit 1 fi -humbug_root=${HUMBUG_ROOT:-$HOME/humbug} +humbug_root=${HUMBUG_ROOT:-$HOME/zulip} amazon_key_file=$humbug_root/humbug.pem if ! [ -e "$amazon_key_file" ]; then @@ -84,8 +84,8 @@ cp -a /root/humbug/servers/puppet/modules/zulip/files/puppet.conf /etc/puppet/ userdel admin passwd -d root puppet apply -e 'class {"zulip": machinetype => "$type"}' -cp -a /root/humbug /home/humbug/humbug -chown -R humbug:humbug /home/humbug/humbug +cp -a /root/humbug /home/humbug/zulip +chown -R humbug:humbug /home/humbug/zulip # These server restarting bits should be moveable into puppet-land, ideally apt-get -y upgrade if [ -e "/etc/init.d/nginx" ]; then diff --git a/servers/puppet/modules/zulip/files/cron.d/graphite_backup b/servers/puppet/modules/zulip/files/cron.d/graphite_backup index c6ca91ef2f..50085992eb 100644 --- a/servers/puppet/modules/zulip/files/cron.d/graphite_backup +++ b/servers/puppet/modules/zulip/files/cron.d/graphite_backup @@ -1,4 +1,4 @@ MAILTO=root SHELL=/bin/bash -0 3 * * * humbug /home/humbug/humbug/servers/puppet/modules/zulip/files/graphite/daily_rsync_backup.sh +0 3 * * * humbug /home/humbug/zulip/servers/puppet/modules/zulip/files/graphite/daily_rsync_backup.sh diff --git a/servers/puppet/modules/zulip/files/cron.d/zephyr-mirror b/servers/puppet/modules/zulip/files/cron.d/zephyr-mirror index b1d881a73b..6664862c75 100644 --- a/servers/puppet/modules/zulip/files/cron.d/zephyr-mirror +++ b/servers/puppet/modules/zulip/files/cron.d/zephyr-mirror @@ -22,5 +22,5 @@ SHELL=/bin/bash # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command -35 * * * * humbug /home/humbug/humbug/bots/zmirror-renew-kerberos -*/2 * * * * humbug /home/humbug/humbug/bots/check-mirroring --sharded &> /var/lib/nagios_state/check-mirroring-results-tmp; mv /var/lib/nagios_state/check-mirroring-results-tmp /var/lib/nagios_state/check-mirroring-results +35 * * * * humbug /home/humbug/zulip/bots/zmirror-renew-kerberos +*/2 * * * * humbug /home/humbug/zulip/bots/check-mirroring --sharded &> /var/lib/nagios_state/check-mirroring-results-tmp; mv /var/lib/nagios_state/check-mirroring-results-tmp /var/lib/nagios_state/check-mirroring-results diff --git a/servers/puppet/modules/zulip/files/nagios3/commands.cfg b/servers/puppet/modules/zulip/files/nagios3/commands.cfg index a0189aeb26..b45122496d 100644 --- a/servers/puppet/modules/zulip/files/nagios3/commands.cfg +++ b/servers/puppet/modules/zulip/files/nagios3/commands.cfg @@ -83,7 +83,7 @@ define command{ define command{ command_name check_feedback_bot - command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_procs -u humbug -c 1:1 -a "python /home/humbug/humbug/bots/feedback-bot"' + command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_procs -u humbug -c 1:1 -a "python /home/humbug/zulip/bots/feedback-bot"' } define command{ @@ -103,7 +103,7 @@ define command{ define command{ command_name check_sync_public_streams - command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_procs -u humbug -c 1:1 -a "/home/humbug/humbug/bots/sync-public-streams"' + command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_procs -u humbug -c 1:1 -a "/home/humbug/zulip/bots/sync-public-streams"' } define command{ diff --git a/servers/puppet/modules/zulip/files/supervisor/conf.d/feedback-bot.conf b/servers/puppet/modules/zulip/files/supervisor/conf.d/feedback-bot.conf index 3a001e09f1..bd8010a112 100644 --- a/servers/puppet/modules/zulip/files/supervisor/conf.d/feedback-bot.conf +++ b/servers/puppet/modules/zulip/files/supervisor/conf.d/feedback-bot.conf @@ -1,4 +1,4 @@ [program:feedback-bot] -command=/home/humbug/humbug/bots/feedback-bot +command=/home/humbug/zulip/bots/feedback-bot autostart=true user=humbug diff --git a/servers/puppet/modules/zulip/files/supervisor/conf.d/stats.conf b/servers/puppet/modules/zulip/files/supervisor/conf.d/stats.conf index 40c104811c..48af963fbf 100644 --- a/servers/puppet/modules/zulip/files/supervisor/conf.d/stats.conf +++ b/servers/puppet/modules/zulip/files/supervisor/conf.d/stats.conf @@ -27,7 +27,7 @@ stdout_logfile=/var/log/zulip/carbon-aggregator.log ; stdout log path, N directory=/home/humbug/ [program:zulip-statsd] -command=node stats.js /home/humbug/humbug/servers/puppet/modules/zulip/files/statsd/local.js +command=node stats.js /home/humbug/zulip/servers/puppet/modules/zulip/files/statsd/local.js priority=200 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) @@ -40,7 +40,7 @@ directory=/home/humbug/statsd [program:zulip-graphiti] -command=/home/humbug/humbug/tools/run-graphiti +command=/home/humbug/zulip/tools/run-graphiti autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) stopsignal=TERM ; signal used to kill process (default TERM) diff --git a/servers/puppet/modules/zulip/files/supervisor/conf.d/zmirror.conf b/servers/puppet/modules/zulip/files/supervisor/conf.d/zmirror.conf index 72301d2f4e..1f810ad2fa 100644 --- a/servers/puppet/modules/zulip/files/supervisor/conf.d/zmirror.conf +++ b/servers/puppet/modules/zulip/files/supervisor/conf.d/zmirror.conf @@ -1,5 +1,5 @@ [program:zmirror] -command=python /home/humbug/humbug/bots/zephyr_mirror.py --root-path=/home/humbug/ --user=tabbott/extra --forward-class-messages --log-path=/home/humbug/logs/mirror-log --on-startup-command="/home/humbug/humbug/bots/zmirror-renew-kerberos" +command=python /home/humbug/zulip/bots/zephyr_mirror.py --root-path=/home/humbug/ --user=tabbott/extra --forward-class-messages --log-path=/home/humbug/logs/mirror-log --on-startup-command="/home/humbug/zulip/bots/zmirror-renew-kerberos" priority=200 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) @@ -11,7 +11,7 @@ stdout_logfile=/var/log/zulip/zmirror.log ; stdout log path, NONE for no environment=HOME="/home/humbug",USER="humbug" [program:sync-public-streams] -command=python /home/humbug/humbug/bots/sync-public-streams +command=python /home/humbug/zulip/bots/sync-public-streams 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/servers/puppet/modules/zulip/manifests/git.pp b/servers/puppet/modules/zulip/manifests/git.pp index 8a15a7dca1..10fe8b43f0 100644 --- a/servers/puppet/modules/zulip/manifests/git.pp +++ b/servers/puppet/modules/zulip/manifests/git.pp @@ -13,6 +13,6 @@ class zulip::git { file { '/home/git/repositories/eng/zulip.git/hooks/post-receive': ensure => 'link', - target => '/home/humbug/humbug/tools/post-receive', + target => '/home/humbug/zulip/tools/post-receive', } } diff --git a/servers/puppet/modules/zulip/manifests/trac.pp b/servers/puppet/modules/zulip/manifests/trac.pp index b5b2b7c28e..77a571cd5d 100644 --- a/servers/puppet/modules/zulip/manifests/trac.pp +++ b/servers/puppet/modules/zulip/manifests/trac.pp @@ -21,11 +21,11 @@ class zulip::trac { } file { '/home/humbug/trac/plugins/zulip_trac.py': ensure => 'link', - target => '/home/humbug/humbug/api/integrations/trac/zulip_trac.py', + target => '/home/humbug/zulip/api/integrations/trac/zulip_trac.py', } file { '/home/humbug/trac/plugins/zulip_trac_config.py': ensure => 'link', - target => '/home/humbug/humbug/bots/zulip_trac_config.py', + target => '/home/humbug/zulip/bots/zulip_trac_config.py', } # TODO: Add downloading and installing trac at /home/humbug/trac diff --git a/tools/post-receive b/tools/post-receive index 44509ac224..10eeda275e 100755 --- a/tools/post-receive +++ b/tools/post-receive @@ -37,7 +37,7 @@ def update_deployment(server, refname): "/home/humbug/deployments/current/tools/update-deployment", refname]) def send_deployment_finished_message(branch, message): - subprocess.check_call(["/home/humbug/humbug/api/bin/zulip-send", "--user=commit-bot@zulip.com", + subprocess.check_call(["/home/humbug/zulip/api/bin/zulip-send", "--user=commit-bot@zulip.com", "--api-key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "--stream=commits", "--site=https://staging.zulip.com", (u"--subject=deploy \u21D2 %s" % (branch,)).encode("utf-8"), "--message=%s" % (message,)]) @@ -51,7 +51,7 @@ deployments = { for ln in sys.stdin: oldrev, newrev, refname = ln.strip().split() if refname in deployments: - p = subprocess.Popen("/home/humbug/humbug/bots/githook-post-receive", + p = subprocess.Popen("/home/humbug/zulip/bots/githook-post-receive", stdin=subprocess.PIPE) p.communicate(input=ln) diff --git a/zerver/views/__init__.py b/zerver/views/__init__.py index c8c34d1c40..09d2a3a09a 100644 --- a/zerver/views/__init__.py +++ b/zerver/views/__init__.py @@ -445,7 +445,7 @@ def webathena_kerberos_login(request, user_profile, # TODO: Send these data via (say) rabbitmq try: subprocess.check_call(["ssh", "humbug@zmirror2.zulip.net", "--", - "/home/humbug/humbug/bots/process_ccache", + "/home/humbug/zulip/bots/process_ccache", user, user_profile.api_key, base64.b64encode(ccache)])