Recall from Components of a Cluster Setup that the following components make up an EKM server cluster:
One cluster file server
One cluster database server
One or more cluster nodes
One front-end web server
Cluster components can be set up in different combinations, and on different hosts, so multiple configurations are possible. For any EKM cluster, these requirements apply with respect to service startup order:
The cluster database server must be started before starting any cluster nodes.
The cluster file server and all required shared directories must be available before starting any cluster nodes.
If a cluster node is started before the cluster file server or cluster database server are available, the cluster node must be shut down, and restarted once all missing components are running and available.
The following EKM cluster components are registered as services using scripts supplied with EKM:
Cluster database server
Cluster nodes
EKM does not include scripts to register the following cluster components as services:
Front-end web server: See Front-End Web Server
Cluster file server: See Cluster File Server
The ANSYS EKM Server product installation is used to set
up the cluster database server and cluster nodes. On Windows, service
registration scripts are created by the product installation. On Linux,
example init scripts are provided for the
cluster database server and cluster nodes.
A cluster database server includes scripts that can be used
to register the cluster database server as a Windows service. These
scripts are located in EKMDB_ROOT/bin:
register_ekmdb_service.cmd: Register cluster database server Windows service.
unregister_ekmdb_service.cmd: Unregister cluster database server Windows service.
The service registration script for the cluster database server creates the following service:
ANSYS EKM Database 18.2 <CLUSTERNAME>: This service corresponds to the cluster database server (MySQL) that contains the EKM database.
A cluster node includes scripts that can be used for registration of the cluster node as a
Windows service. These scripts are located in
EKM_NODE_ROOT182/bin:
register_ekm_service.cmd: Register cluster node Windows
service.
unregister_ekm_service.cmd: Unregister cluster node Windows
service.
The service registration script for the cluster node creates the following service:
ANSYS EKM 18.2 <CLUSTERNAME> <NODENAME>: This service corresponds to the cluster node, and controls the JBoss application server which hosts the EKM server application.
KEY:
<CLUSTERNAME>: The EKM cluster name.
<NODENAME>: The node name (node ID) of the cluster node.
The init scripts for the cluster database
server and cluster nodes must be manually installed after setup of
these components. Instructions for installing, registering and using
these scripts follow.
Important: Recall from the discussion of Service Names that services on a host must have unique names. Follow the instructions in Service Names to create unique service names for each cluster component.
To register the cluster database server as a service, use the init script for the cluster database server: EKMDB_ROOT/bin/init.d/ekmdb182
Rename the script, following the naming suggestions
in Renaming a Service. For example, we will use ekmdb182_EKMSERVER as the new service name:
mv EKMDB_ROOT/bin/init.d/ekmdb182 EKMDB_ROOT/bin/init.d/ekmdb182_EKMSERVER
Copy the init script to the /etc/init.d directory:
cp EKMDB_ROOT/bin/init.d/ekmdb182_EKMSERVER
/etc/init.d
Edit the init script and
set the EKMDB_ROOT environment variable to
the base directory of the cluster database server. For example:
EKMDB_ROOT=/home/ekmdb
Edit the init script and
set the EKM_USER environment variable to
the user name of the EKM server account. For example:
EKM_USER=ekm
Register and enable the service:
/sbin/chkconfig -–add ekmdb182_EKMSERVER
Verify that the service is registered and enabled:
/sbin/chkconfig -–list ekmdb182_EKMSERVER
To register a cluster node as a service, use the init script for the
cluster node:
EKM_NODE_ROOT182/bin/init.d/ekm182
Rename the script, following the naming suggestions in Renaming a Service. For example, we’ll use
ekm182_EKMSERVER_NODE1 as the new service name:
mv EKM_NODE_ROOT182/bin/init.d/ekm182
EKM_NODE_ROOT182/bin/init.d/ekm182_EKMSERVER_NODE1
Copy the init script to the
/etc/init.d directory:
cp
EKM_NODE_ROOT182/bin/init.d/ekm182_EKMSERVER_NODE1
/etc/init.d
Edit the init script and set the
EKM_BASE environment variable to the base directory of the cluster
node. For example:
EKM_NODE_ROOT=/home/ekm/node1
Edit the init script and set the
EKM_USER environment variable to the user name of the EKM
server account. For example:
EKM_USER=ekm
Register and enable the service:
/sbin/chkconfig -–add
ekm182_EKMSERVER_NODE1
Verify that the service is registered and enabled:
/sbin/chkconfig -–list
ekm182_EKMSERVER_NODE1
The EKM init scripts accept the
following command-line arguments:
start: starts the service
stop: stops the service
restart: restarts the service
When a cluster component is registered as a service, the service
starts at system startup, and stops at system shutdown. The init script can also be run directly from the command-line
to stop, start, and restart the service.