Try our new documentation site (beta).
Starting the Cluster Manager as a Service
While you always have the option of running grb_rsm from a terminal and leaving the process running in the background, we recommended that you start it as a service instead, especially in a production deployment. The advantage of a service is that it will automatically restart itself if the computer is restarted or if the process terminates unexpectedly.
grb_rsm provides several commands that help you to set it up as a service. These must be executed with administrator privileges:
- grb_rsm install
- Install the service. The details of exactly what this involves depend on the host operating system type and version: this uses systemd or upstart on Linux, launchd on Mac OS, and Windows services on Windows.
- grb_rsm start
- Start the service (and install it if it hasn't already been installed).
- grb_rsm stop
- Stop the service.
- grb_rsm restart
- Stop and then start the service.
- grb_rsm uninstall
- Uninstall the service.
Note that the install command installs the service using default settings. If you don't need to modify any of these, you can use the start command to both install and start the service. Otherwise, run install to register the service, then modify the configuration (the details are platform-dependent and are touched on below), and then run start the service.
Note that you only need to start the service once; grb_rsm will keep running until you execute the grb_rsm stop command. In particular, it will start again automatically if you restart the machine.
Note also that the start command does not accept any flags or additional parameters. All of the configuration properties must be set in the grb_rsm.cnf configuration file. If you need to make a change, edit the configuration file, then use the stop command followed by the start command to restart grb_rsm with the updated configuration.
The exact behavior of these commands varies depending on the host operating system and version:
Linux
On Linux, grb_rsm supports two major service managers: systemd and upstart. The install command will detect the service manager available on your system and will generate a service configuration file located in /etc/systemd/system/grb_rsm.service or /etc/init/grb_rsm.conf for systemd and upstart, respectively. Once the file is generated, you can edit it to set advanced properties. Please refer to the documentation of systemd or upstart to learn more about service configuration.
Use the start and stop commands to start and stop the
service. When the service is running, log messages are sent to
the Linux syslog
and to a rotating log file, grbrsm-service.log,
located in the same directory as grb_rsm.
The uninstall command will delete the generated file.
Mac OS
On Mac OS, the system manager is called launchd, and the install command will generate a service file in /Library/LaunchDaemons/grb_rsm.plist. Once the file is generated, you can edit it to set advanced properties. Please refer to the launchd documentation to learn more about service configuration.
Use the start and stop commands to start and stop the
service. When the service is running, log messages are sent to
the Mac OS syslog
and to a rotating log file, grbrsm-service.log,
located in the same directory as grb_rsm.
The uninstall command will delete the generated file.
Windows
On Windows, the install command will declare the service to the operating system. If you wish to set advanced properties for the service configuration, you will need to start the Services configuration application. Please refer to the Windows Operating System documentation for more details.
Use the start and stop commands to start and stop the service. When the service is running, log messages are sent to the Windows event log and to a rotating log file, grbrsm-service.log, located in the same directory as grb_rsm. Note that the service must run as a user that has write permissions to this directory; otherwise, no log file will be generated.
The uninstall command will delete the service from the registry.