RedHat systemd configuration
Instructions for enabling systemd
units on RHEL-based and compatible
systems.
As of DSE version 6.0.13, systemd
units are now included for
RHEL-based and compatible systems.
The following units are installed in /usr/lib/systemd/system:
dse.target
: starts DSE nodesdse-shutdown.target
: stops DSE nodes
In addition, a dse@.service
template is installed into
/usr/share/dse/templates and serves as a template unit for
all DSE node instances running on the host OS under the cassandra
user. That template is used by the dse add-node
command and the
/usr/share/dse/tools/dse-convert-to-systemd helper
script.
Once dse.target
is enabled, the dse add-node
command creates and enables systemd
service for new nodes, and also
creates init.d
scripts to redirect lifecycle commands to
systemctl
.
systemd
units are not enabled. Old
init.d
scripts remain in effect.systemd
, the old init.d
services can still
be manipulated usiing systemd commands, for instance, systemctl start
dse
.To enable DSE systemd
units:
-
Stop the DSE
init.d
service:sudo service dse stop
-
Enable
dse.target
:sudo systemctl enable dse.target
Note: After dse.target is enabled, 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
Note: The node address, full-node-id must be the full node ID including thedse-
prefix. The default node ID if no other nodes are configured isdse
./usr/share/dse/tools/dse-convert-to-systemd dse-node1
Thedse-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
.
- Creates and enables
What's next
systemd
operations include:- Start all DSE
nodes:
systemctl start dse.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
dse-
prefix. The default node ID
if no other nodes are configured is dse
.