How to Stop & Start HipChat Server / HipChat Data Center
目的
You want to power off the instance for back up / maintenance purposes. To avoid new information / data from being constantly synced to the server, you prefer to have stop the instance before starting it again to resume functionality.
ソリューション
Depending on your preference, please refer to the following sections accordingly:
Power Off VM
This option will completely shut down the Virtual Machine hosting the instance:
Obtain root access
sudo dont-blame-hipchat
Shut down the virtual machine hosting the instance
poweroff
Shut Down Services
This option leaves the machine up but stop all services:
Create a script in /home/admin/startup_scripts on the server named remove_hipchat_from_startup and add the following content:
#!/bin/bash sudo dont-blame-hipchat -c 'update-rc.d -f hipchat remove' sudo dont-blame-hipchat -c 'update-rc.d -f monit remove' sudo dont-blame-hipchat -c 'upcate-rc.d -f crowd remove' sudo dont-blame-hipchat -c 'chmod -x /etc/cron.hourly/start_monit'
The commands above will prevent init from bringing up the hipchat service, monit service, and crowd service should the nodes get restarted for any reason.Change the permissions on the script and run it:
chmod +x /home/admin/startup_scripts/remove_hipchat_from_startup cd /home/admin/startup_scripts ./remove_hipchat_from_startup
Then, manually stop the services:
service hipchat stop service monit stop service crowd stop
- The hipchat service handles punjab, tetra, and coral. Stopping monit will keep the monit service from trying to restart those services behind the scenes.
Having the script in /home/admin/startup_scripts will prevent those services from starting up whenever the system is rebooted.
Start All Services
If you choose to stop all services only, you can bring it up again by performing the steps below:
- Remove /home/admin/startup_scripts/remove_hipchat_from_startup file
Run Chef using the command cs
Start Services again using:
hup