Post Installation Tasks
Post-Installation Tasks
After installation, the SLEE service will have a system service definition created, but will not be running due to lack of configuration. The package installation will advise you which service configuration file is being used with output similar to:
Using service configuration file: /path/to/file
For platforms using Upstart, the service configuration file will be /etc/init/n2jslee.conf
.
For platforms using systemd, the service configuration file will be /etc/systemd/system/n2jslee.service
.
Several configuration files must be created for your specific environment and business requirements, as set out in the following sections. If you do not want to use the default names for certain configuration files, the service configuration file must be updated accordingly with the updated file names.
The shortest possible series of commands to configure an empty, running JSLEE instance is to follow the next few instructions.
- Set the
hazelcast-if
interface.
Edit the /etc/hosts
configuration file. A default Red Hat 8 version of this file would include:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Assign the name hazelcast-if
to the correct interface. For example if the interface for your server
is 10.50.2.4
, this might be configured in /etc/hosts/
as:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.50.2.4 hazelcast-if
- Copy in the minimal example files:
cd /opt/nsquared/jslee/etc/server/
cp -p logback-example.xml logback.xml
cp -p server-minimal-example.json server.json
cd /opt/nsquared/jslee/etc/hazelcast/
cp -p hazelcast-example.xml hazelcast.xml
- Edit the Hazelcast configuration file:
vi /opt/nsquared/jslee/etc/hazelcast/hazelcast.xml
and update the following configuration:
- Set all ${hazelcast-ip} to be the interface (IP address) to use for cluster intercoms.
- Set all ${hazelcast-group} to be the unique group name for this instance of hazelcast.
- Start the JSLEE:
systemctl enable n2jslee
systemctl start n2jslee
- Verify the JSLEE is running:
ps -ef | grep '[j]slee'
- Monitor the JSLEE log:
tail -100f /opt/nsquared/jslee/log/server.log
Basic Server Configuration
By default, the system will use the following main configuration file:
/opt/nsquared/jslee/etc/server/server.json
This file is not created automatically at installation time and must exist before the SLEE service will start. To create it, replace it with one of the provided example configuration files, e.g.:
cd /opt/nsquared/jslee/etc/server
cp -p server-minimal-example.json server.json
Alternately, the server configuration file used can be updated to a non-default value in the service configuration file, as described above.
Regardless of the file creation method, the main server configuration file should be updated before use. If the minimal example file is used as a base, the SLEE will be executable (after the below post-installation configuration is completed), but will have no useful functionality. Refer to the specific documentation for each application and functional module for the configuration required for each.
The port used for cluster message communications in the cluster configuration must be
accessible on all servers in the cluster. Please ensure your local firewall
rules allow access to the configured port. The default cluster configuration uses
port 33000
, but this can be altered as required.
Logging Configuration
By default, the system will use the following logging configuration file:
/opt/nsquared/jslee/etc/server/logback.xml
This file is not created automatically at installation time and must exist before the SLEE service will start. To create it, replace it with one of the provided example configuration files, e.g.:
cd /opt/nsquared/jslee/etc/server
cp -p logback-example.xml logback.xml
Alternately, the logging configuration file used can be updated to a non-default value in the service configuration file, as described above.
Note that log rotation is not enabled by default. Please ensure you configure log rotation following your organisation’s policies for all file targets defined in your logging configuration file. If you are using the provided logging configuration example file, the only file produced will be:
/opt/nsquared/jslee/log/server.log
The provided logging configuration example file also specifies daily log rotation and compression with 30 days of logs kept. Refer to the execution logging examples for further details.
Cluster Configuration
The N-Squared SLEE uses the Hazelcast cluster management architecture to implement clustering. By default, the system does not have a cluster configuration file defined. However, the example server configuration definitions use the following cluster configuration file:
/opt/nsquared/jslee/etc/hazelcast/hazelcast.xml
Alternately, the cluster configuration file used can be updated as required
in the main server configuration file in the parameter cluster.config
.
This file is not created automatically at installation time and must exist before the SLEE service will start. To create it, replace it with one of the provided example configuration files, e.g.:
cd /opt/nsquared/jslee/etc/hazelcast
cp -p hazelcast-example.xml hazelcast.xml
At a minimum, the IP addresses in the file must be updated to be valid. Refer to the cluster configuration, other module documentation, and the official Hazelcast documentation for further details.
As a simplification, the example Hazelcast configuration file references hazelcast-ip
,
which can be set in the /etc/hosts
file to resolve to the correct hostname.
The port used for cluster management communications in the cluster configuration must be
accessible on all servers in the cluster. Please ensure your local firewall
rules allow access to the configured port. The default cluster configuration uses
port 6050
, but this can be altered as required.
Service Restart
Once all post-installation configuration above has been completed, the SLEE service can be started following the execution instructions.
Your N-Squared SLEE should now be available for service with the configuration you have applied.