RedHat systemd configuration
Starting with DSE version 6.8.2, installations support systemd
for RHEL-based and compatible systems.
The system installs the following units in /usr/lib/systemd/system
:
-
dse-all.target
: starts DSE nodes -
dse-shutdown.target
: stops DSE nodes
The system also installs a dse@.service
template in /usr/share/dse/templates
. It serves as a template unit for all DSE node instances running on the host OS under the cassandra
user.
The dse add-node
command and the /usr/share/dse/tools/dse-convert-to-systemd
helper script use that template.
Once you enable dse-all.target
, the dse add-node
command creates and enables systemd
service for new nodes, and creates init.d
scripts to redirect lifecycle commands to systemctl
.
Enable DSE systemd
units
By default, systemd
units are not enabled.
Previous init.d
scripts remain in effect.
On systems that have |
-
Stop the DSE
init.d
service:sudo service dse stop
-
Enable
dse-all.target
:sudo systemctl enable dse-all.target
After enabling
dse-all.target
, DSE nodes automatically start as part of the multi-user target on each reboot. -
On each node run:
sudo /usr/share/dse/tools/dse-convert-to-systemd full-node-id
The node address,
full-node-id
, must be the fully-qualified node ID and include thedse-
prefix. The default node ID isdse
unless you configure other nodes./usr/share/dse/tools/dse-convert-to-systemd dse-node1
The
dse-convert-tosystemd
script makes the following changes:-
Creates and enables
systemd
units for DSE nodes in/etc/systemd/system/
. -
Modifies the DSE
init.d
script to redirect lifecycle commands tosystemctl
.
-
DSE systemd
operations
systemd
commands include:
-
Start all DSE nodes:
systemctl start dse-all.target
-
Stop all DSE nodes:
systemctl start dse-shutdown.target
-
Start one DSE node:
systemctl start full-node-id
-
Stop one DSE node:
systemctl stop full-node-id
The node address, |
The default start timeout is 10 minutes and the default stop timeout is 30 seconds. Adjust these values by editing the corresponding unit files. |