Developers
Developers
Developers
Kx Platform
Deployment Guide 4.2 (v5)
1
Kx Platform Deployment Guide
About Kx
Kx was founded in 1993 by Arthur Whitney and Janet Lustgarten to address a
simple problem: the inability of traditional relational database technology to
keep up with escalating volumes of data. This problem is even more acute
today, as data records already number in the trillions and are escalating
exponentially. Businesses however, need immediate access to real-time and
historical data for a whole range of applications. From research through
trading, smart meter data analysis, web site analytics, customer behaviours
and a plethora of other applications, all need a high-velocity analytics
platform.
Since the company’s inception, Kx’s singular goal has been to provide its
customers with the fastest, most efficient, and most flexible tools for
processing real-time and historical data. This focus has enabled us to
become the worldwide leader in high-volume, high-performance databases.
Contact
North American Office (NY): +1 (212) 447 6700
2
Kx Platform Deployment Guide
Documentation
All rights reserved. No part of this document may be reproduced, stored in a
retrieval system or transmitted in any form or by any means, without the prior
written permission of First Derivatives plc, except in the case of brief
quotations embodied in critical articles or reviews.
Kx has made every effort in the preparation of this document to ensure the
accuracy of the information. However, the information contained in this
document is provided without warranty, either express or implied. Kx will not
be held liable for any damages caused or alleged to be caused either
directly or indirectly by this document.
3
Kx Platform Deployment Guide
Contents
About Kx ................................................................................................................................... 2
Contact ................................................................................................................................. 2
Documentation ....................................................................................................................... 3
About this document .......................................................................................................... 3
Contents ................................................................................................................................... 4
Introduction .............................................................................................................................. 6
Installation Pre-requisites ......................................................................................................... 7
Downloading the Release Bundle ...................................................................................... 11
Deploying the Release ......................................................................................................... 12
Transferring Release to Deployment Host....................................................................... 12
Running the Installer .......................................................................................................... 13
Interacting with the Deploy ................................................................................................. 17
Deployment Footprint ....................................................................................................... 17
Install Location ................................................................................................................ 17
Log Files............................................................................................................................ 17
Data Location................................................................................................................. 18
Scripts ............................................................................................................................... 19
Control Web UI ................................................................................................................... 20
Dashboards for Kx .............................................................................................................. 23
Analyst ................................................................................................................................. 24
Restarting Single Host Deploy .............................................................................................. 26
Upgrading a Deploy ............................................................................................................. 29
Updating Licenses ................................................................................................................. 33
Appendix A – install.sh additional options ......................................................................... 35
Appendix B – Deployment Configurations ........................................................................ 36
1. Multi Host Control and Web clustered deploy ....................................................... 38
Control Master/Slave Deploy ....................................................................................... 39
............................................................................................................................................. 39
Web Cluster Deploy ....................................................................................................... 43
Completing the deploy ................................................................................................. 44
4
Kx Platform Deployment Guide
5
Kx Platform Deployment Guide
Introduction
This Deployment Guide will describe the steps required to install the Platform Kx
Bundle. This bundle contains the software components which make up the core
platform and include the Dashboard Visualization layer (an example of which is
given below).
6
Kx Platform Deployment Guide
Installation Pre-requisites
Software/Licensing
Desktop
Server
7
Kx Platform Deployment Guide
8
Kx Platform Deployment Guide
Nodejs 8.11.1+
Google Chrome 65.0.3325.181+
KDB License
KDB licenses are tied to the hostname of a machine and specifically the hostname
in FQDN (<HOSTNAME>.<DOMAINNAME>) format. When run on a machine which is
incorrectly configured you will get a “host” error when running the q binary.
In order for KDB+ to run, the hostname in the license file must be present as an alias
to a network interface in the /etc/hosts file on the box. The network interface aliased
will be used for inter process communication so it must be one which is accessible by
all hosts wishing to connect to the system. The format of the entry in /etc/hosts
should be as follows:
<INTERFACE IP><FQDN><HOSTNAME>
For example if a host with IP address 10.190.1.232 is called kdbdev and is on the
firstderivatives.com domain then the /etc/hosts file should look like this:
9
Kx Platform Deployment Guide
Delta License
Control for Kx is licensed via the .delta.lic file. The file contains an encoded
hostname string which is matched to the hostname of the deployed server via the
following checks.
Control for Kx determines the FQDN of the host by parsing the /etc/hosts file and
checking each valid FQDN against the hostname in the license file for a match.
Once a match is found it is checked against the values in the failover.csv (written by
the installer).
Default Ports
The various software components are pre-configured to use a set of default ports.
The ports below are required to be free on the box for each installation.
10
Kx Platform Deployment Guide
https://nexus.firstderivatives.com/nexus/content/repositories/KxReleases/PlatformKx/latest
NB: You will be prompted to enter your nexus login credentials in order to
access the page.
Once the page has loaded you will see the following:
You will see packages for 3 different OS’s (RHEL65, RHEL70, and MS Windows)
You will need to download the GA.tgz which matches your OS (RHEL6/RHEL7) and
also the latest Patch Version (e.g. P2.tgz) (each patch release contains all previous
patches since the GA).
For Example:
PlatformKx-4.0.2-RHEL65-GA.tgz
PlatformKx-4.0.2-RHEL65-P2.tgz
PlatformKx-4.0.2-RHEL70-GA.tgz
PlatformKx-4.0.2-RHEL70-P2.tgz
11
Kx Platform Deployment Guide
This section deals with deploying the release, the deployment layout in this example
is a Non Clustered Single Host deploy. For details relating to Multi Sever Clustered
deploys please see Appendix B in this doc.
Using your SCP Client scp the downloaded bundle into your target deploy host as
shown in the screenshot below:
Using the SSH Client untar the KxPlatform package using the following command:
tar –xvfPlatformKx-4.0.2-RHEL65.tgz
PlatformKx-4.0.2-RHEL65
12
Kx Platform Deployment Guide
Using the SCP Client drag the two license files (k4.lic and .delta.lic) into the
root directory of the untarred folder created above
The Bundle installer (install.sh) wraps the main installation script (installDeltaXML.sh)
by configuring the install through on screen prompts and generates an installation
profile (scripts/install.config.run)which is loaded by installDeltaXML.sh. Once the
bundle has been copied, unpacked and the licenses are in place it’s time to run the
installer as follows:
$ cd EvalKx-4.2.0S1-RHEL65-SNAPSHOT
$ ./install.sh
The script will print to the terminal. The first prompt will be for the location of the
deployment. The default is $USER/kxinstall. If you wish to deploy to a non-default
directory enter it at the prompt otherwise hit enter.
=============================================================
== install.sh [2.1.0] ==
=============================================================
Platform install directory [/home/estuart/kxinstall] :
Before the deploy configuration continues a pre deploy script called checkHost.sh
will be run. The script will collect information about the deploy host. If the host is not
configured correctly or if there are missing dependencies i.e. Java 1.8 is not installed
then the deploy will fail.
13
Kx Platform Deployment Guide
You can disable the pre deploy check by running install.sh with the -h flag as follows:
+-----------------------------------------------------------+
Running Pre Deploy Script [checkHost.sh]
+-----------------------------------------------------------+
The script will print to the terminal. For Deploy Mode select option 1 (Single Host
Deploy):
+-----------------------------------------------------------+
Running Pre Deploy Script [checkHost.sh]
+-----------------------------------------------------------+
[1] Single
[2] Control
[3] Web Server
[4] Daemon
+-----------------------------------------------------------+
Select Mode [1-4] : 1
The script will prompt you for a free port to be used by the Control process. The
default port is 2001 you can either hit return and accept the default or enter a new
value (see below)
Default Port
Custom Port
If either the Default port or the port you select is currently in use by another process
on the deploy host you will be prompted to enter a new port (see below)
At this point you may be prompted to enter the number of CPU cores you wish to run
KDB+ on. This depends 2 factors, the number of cores on the box (see Max: value
below) and the number of cores your KDB+ License (k4.lic) supports. In the example
below I am installing on a 10 CPU Core host but my license file only covers the use of
10 cores.
14
Kx Platform Deployment Guide
OPTION 1 - HTTP
+------------------------------------------------+
[1] HTTP
[2] HTTPS
+------------------------------------------------+
Select App Server Deploy Type [1-2] : 1
+------------------------------------------------+
OPTION 2 - HTTPS
+------------------------------------------------+
[1] HTTP
[2] HTTPS
+------------------------------------------------+
Tomcat Java Keystore [/home/estuart/.keystore] :
Tomcat Java Keystore Password [changeme] : password1
App Server HTTPS port [8443] :
Now you can configure the port by pressing enter to use the default (8080) or by
entering your own port. In this case I used the default 8080 port.
OPTION 1 - HTTP
+------------------------------------------------+
App Server HTTP port [8080] :
+------------------------------------------------+
OPTION 2 – HTTPS
+------------------------------------------------+
App Server HTTPS port [8443] :
+------------------------------------------------+
TLS Encryption
If the bundle release version supports TLS Encryption you will be prompted here to
enable it. TLS configuration is dealt with in Appendix D - TLS Configuration. For this
example we will proceed without encryption:
Encryption
Deploy with TLS/SSL Encryption Enabled [no] :
License Files
The installer will now prompt you for the location of you k4/kc license files for KDB+
and then for the location of your delta license (.delta.lic). In the example below
both files are in a directory called licenses in the user home dir (~/licenses).
This completes the deploy configuration, the script should now deploy the packages
Running Deploy
Installing [15] Packages
[****************]
Once deployment is complete the bundle installer will bring up the system. On
successful installation you will see the following:
Installation complete.
15
Kx Platform Deployment Guide
+-----------------------------------------------------------+
Kx Platform Startup
[estuart@web-a.fd.firstderivatives.com]
+-----------------------------------------------------------+
Starting Control .....done
Starting Daemon .....done
Starting App Server .....done
Starting Workflow [DS_STARTALL_FXEVAL] .....done
Starting Workflow [DS_launch_AT_A] .....done
Starting Workflow [DS_launch_html5eval] .....done
+-----------------------------------------------------------+
Delta Control:
[http://control-a.fd.com:8080/control]
Dashboards:
[http://control-a.fd.com:8080/dashboards/quickview]
Analyst:
[http://control-a.fd.com:8080/analyst]
+-----------------------------------------------------------+
Finished.
Post Deploy
Once the deploy has completed the post deploy env script called checkEnv.sh will
be run which will create a TGZ file with details of the deploy. The TGZ can be found
inside the bundle directory and it will be named something like KX-INSTALL-LOGS-
20180117-103731.tgz.
If you deploy with TLS Enabled an additional validation script called validateCerts.sh
will be run. The output from this and the checkEnv.sh script will be printed to the
screen and all log files will be include inside the TGZ above.
If you do not wish to run the post deploy validation as part of your deploy then run
the install.sh with the -n flag as follows:
$ ./install.sh -n
=============================================================
== install.sh [2.1.0] ==
=============================================================
Skip Env Check
16
Kx Platform Deployment Guide
Deployment Footprint
The Deployment Footprint comprises of the main directories within the deploy and
include locations of scripts and log files.
Install Location
The default location for a Kx Platform deploy is in a directory called kxinstall inside
the deployment users home dir. i.e.
~/kxinstall
Directory Contents
Log Files
Control and process log filers can be found at the following location
/home/xxx/kxinstall/delta-data/DeltaControlData/logdir/
Inside here there is several important logs such as the main Control log=
DeltaControl.log and the Daemon log= DeltaControlDaemon.log.
/home/xxx/kxinstall/delta-bin/software/Tomcat_7_0_73/latest/logs
The tomcat log directory contains the log files for all Kx Platform web applications
such as Dashboards and Control UI.
17
Kx Platform Deployment Guide
Data Location
The delta-data folder contains all the data associated with the platform along with
the process log files. By default the delta-data directory lives at the same level as the
delta-bin directory inside the deploy.
If you wish to specify a different location for the delta-data dir (i.e. in order to put it
on a different disk/partition) then you will need to uncomment the following inside
the bundle install config (scripts/install.config) or add the following to a custom install
config (passed in via -p).
The delta-data dir location will now be created at the path specified by delta-data-
dir in the install configuration.
18
Kx Platform Deployment Guide
Scripts
Scripts which are used to start and stop various components within the deploy can
be found at the following location
/home/xxx/kxinstall/delta-bin/bin
A description and usage of the main scripts can be found in the table below.
NB for instructions on how to start-up and shutdown the deploy please see section
Shutdown and Start-up of Single Host Deploy
Script Description
startup.sh Main start script which controls the start-up of all of the
components within the environment.
shutdown.sh Main shutdown script which controls the shutdown of
all the components within the environment
The details of the other scripts are given below. These scripts are typically only run
when the solution is deployed on multiple hosts see Appendix B
Script Description
19
Kx Platform Deployment Guide
Control Web UI
The Control Web UI was introduced in version 4.0.0 and replaces the previous Eclipse
DCUI Desktop client.
To log in to Control Web UI follow the link provided by the start-up output in the
previous section, an example of which is seen below:
Upon navigating to the following link you will be presented with the following screen
Delta Control:
[http://kx-deploy.firstderivatives.com:8080/control]
20
Kx Platform Deployment Guide
On successful log in you will be presented with the following screen. This screen
shows the Process Library Status Viewer, you can see from the screen shot below
that workflows are already running
Also inside the Web UI you will notice a navigation menu. From here you can do
many things, such as start and stop workflows and create new users.
21
Kx Platform Deployment Guide
To view a workflow, click on the workflow tab and then select a workflow such as
DS_launch_AT_A
Currently you can see this workflow is started as the workflows are a bright green
colour. To stop a workflow simply select the red square (the stop button) and the
workflow will stop, to start it up again click the green button
22
Kx Platform Deployment Guide
Dashboards for Kx
To log in to Dashboards follow the link provided by the start-up output in the previous
section, an example of which is seen below:
Dashboards:
[http://kx-deploy.firstderivatives.com:8080/dashboards/quickview]
Upon navigating to the link you will be presented with the following screen
23
Kx Platform Deployment Guide
Analyst
To access Analyst follow the link provided by the start-up output in the previous
section, an example of which is seen below:
Analyst:
[http://kx-deploy.firstderivatives.com:8080/analyst]
Upon following the link you will be provided with the following login screen, Logon
with the Username and password:
Username: Administrator
Password: password
24
Kx Platform Deployment Guide
Upon clicking the logon button you will be presented with another screen, select the
number of Workspace CPU Slaves and click ok
When this is done you will need to create a workspace, to do this click the create
workspace button and then enter a name for it
When a workspace has been created, click on the open workspace and Analyst will
start open successfully
25
Kx Platform Deployment Guide
In order to shut down the deploy you should go to the kxinstall directory and
navigate to the main bin directory as follows.
$ cd ~/kxinstall/delta-bin/bin
Once here you should run the shutdown script. This can be done with the following
command:
$ ./shutdown.sh
The output of the above command should look something like this:
Kx Platform Shutdown
[kxuser@kx-deploy.firstderivatives.com]
+-----------------------------------------------------------+
Stopping App Server .....done
Stopping Workflow [DS_launch_MS_A] .....done
Stopping Workflow [DS_launch_ALERT_A] .....done
Stopping Workflow [DS_launch_OPS_A] .....done
Stopping Workflow [DS_launch_REPORT_A] .....done
Stopping Workflow [DS_launch_AT_A] .....done
Stopping Workflow [ALL] .....done
Stopping Remaining Processes .....done
Stopping Daemon .....done
Stopping Control .....done
+-----------------------------------------------------------+
Finished.
You can check that the processes have been shut down using the “ps” command if
you know the install directory (default in $HOME/kxinstall. To do this run the “ps”
command as follows.
If the running the command above gives no output as above then the environment
has been successfully shutdown. If there are still processes running they should be
killed using the “kill” command.
26
Kx Platform Deployment Guide
Then in order to start up the deploy again, you can use the ./startup.sh from the
same directory. The output should look something like this:
Kx Platform Startup
[kxuser@kx-deploy.firstderivatives.com]
+-----------------------------------------------------------+
Starting Control .....done
Starting Daemon .....done
Starting App Server .....done
Starting Workflow [DS_launch_MS_A] .....done
Starting Workflow [DS_launch_ALERT_A] .....done
Starting Workflow [DS_launch_OPS_A] .....done
Starting Workflow [DS_launch_REPORT_A] .....done
Starting Workflow [DS_launch_AT_A] .....done
+-----------------------------------------------------------+
Delta Control:
[http://kx-deploy.firstderivatives.com:8080/control]
Dashboards:
[http://kx-deploy.firstderivatives.com:8080/dashboards/quickview]
Analyst:
[http://kx-deploy.firstderivatives.com:8001/analyst]
+-----------------------------------------------------------+
Finished.
Using the “ps” command you can check that the 3 main processes have been
started.
Control
Daemon
Tomcat
27
Kx Platform Deployment Guide
28
Kx Platform Deployment Guide
Upgrading a Deploy
Upgrade packages for the Kx Platform deploy are delivered via the nexus download
site. There are 2 types of upgrade release:
Patch Release
Major / GA Release
Patch Release
There can be several patch releases subsequent to each Major release and it is
important to keep your platform installation up to date with the most recent patch.
The table above shows that there have been five patches released since the GA or
Major Release of version 4.0.2. The latest patch release (Patch 5 (P5)) above also
contains all of the previous patch releases (in this case Patches 1-4 + Patch 5).
29
Kx Platform Deployment Guide
Major / GA Release
The table above gives the links to the GA release 4.0.3. In order to perform a fresh
deploy of the 4.0.3 release or upgrade a previous deploy to version 4.0.3 you must
download both the GA and the latest patch release. In this case 4.0.3 and 4.0.3
Patch 1.
Patch bundles contain only the packages which have changed since the GA was
released and they can be untarred over the top of an existing GA bundle download
when doing a clean deploy. See below both the GA and the Patch untar into the
same directory name PlatformKx-4.0.3-RHEL70
30
Kx Platform Deployment Guide
PlatformKx-4.0.3-RHEL70/packages/Java_1_8_0_6080_linux_x64.tgz
PlatformKx-4.0.3-RHEL70/packages/KDBPlus_3_5_0_20170907.tgz
PlatformKx-4.0.3-RHEL70/packages/Tomcat_7_0_73_403_9499.tgz
Upgrading a Deploy
Before attempting to upgrade a deploy it is important that you perform the following
pre-upgrade steps to avoid the loss of Data or Configuration from your existing
deploy.
The deploy should be shutdown using either the shutdown.sh script (in the case of a
single host deploy) or using the component shutdown scripts (stopDeltaControl.sh,
stopDeltaControlDaemon.sh etc) in the case of a multi host deploy (Appendix B –
Deployment Configurations: Restarting Multi-Host Deploy)
Once the shutdown scripts have been executed a final check should be performed
at OS level on all hosts in the deploy to ensure the processes have successfully
terminated.
You can check that the processes have been shut down using the “ps” command if
you know the install directory (default in $HOME/kxinstall. To do this run the “ps”
command as follows.
31
Kx Platform Deployment Guide
If the running the command above gives no output as above then the environment
has been successfully shutdown. If there are still processes running they should be
killed using the “kill” command.
Upgrade steps
Once the deploy has been successfully shutdown you can now proceed with the
upgrade. In order to upgrade the release bundles must be copied to all hosts in the
environment and the install.sh script should be run inside the untarred release
bundle(s) on each host as follows. NB if you are using a non-default deploy location
you must enter it at the “Platform install directory” prompt below.
$ ./install.sh
=============================================================
== install.sh [2.0.5] ==
=============================================================
Platform install directory [/home/ddempsey/kxinstall] :
+-----------------------------------------------------------+
Warn: Detected KX installation in [/home/ddempsey/kxinstall]
This tells us that the installer has found an existing deploy, enter yes to proceed with
the upgrade:
The installer will proceed with the upgrade. The upgrade process involves copying all
or some of the packages from the bundle into your deploy location (by default
$USER/kxinstall) and then updating the version variables in the delta.profile to match
the version of the newly deployed packages. Where packages contain Control for
Kx entities (analytics, instances, workflows etc) an additional step is run to import the
contents of these packages into the Control instance (Appendix I – Control Package
Import)
Running Deploy
Installing [2] Packages
[***]
+-----------------------------------------------------------+
Installation complete.
+-----------------------------------------------------------+
If your deploy fails you should consult the installation script log, found in the scripts
directory (e.g. scripts/ installDeltaXML.20180123_120538.log) and the
DeltaControl.log, found in the main platform log file directory (delta-
data/DeltaControlData/logdir/DeltaControl.log) in the deploy location.
32
Kx Platform Deployment Guide
Updating Licenses
When the licenses expire you will be require to update each license in your deploy.
Licenses live inside the main deploy dir at the following path delta-bin/config
The Delta License is a hidden file (filename starts with a “.”) so in order to view the
licenses in the directory you need to run:
$ ls -a delta-bin/config/
. .. .delta.lic delta.xml failover.csv footer.txt k4.lic ssl-certs
startup_workflows.txt tls-certs webserver-packages.txt
e.g. fd-10Jul15.lic.zip
e.g. .FD-10Jul15-delta.lic
33
Kx Platform Deployment Guide
Updating Licenses
34
Kx Platform Deployment Guide
The following table outlines additional arguments that can be added when running
the install.sh script:
NB if you load a custom install.config file the install.sh will no longer prompt you for
the Single / Multi server or TLS configuration. This should be configured in your custom
install.config and if accept defaults is off the installDeltaXML.sh script will prompt you
for options.
35
Kx Platform Deployment Guide
There are several deployment options for the Kx Platform. The Platform can be
thought of as series of layers which can be spread across multiple hosts in order to
provide resilience and traffic segregation (e.g. Web traffic VS application traffic).
Evaluation deploys will typically only use 1 host which will have all layers deployed
on it. The table below describes the three main layers in a Kx Platform Deploy.
Layer Description
Control Control process provides centralised configuration and process
control.
Web The web layer consists of a series of UI Applications installed into
an Apache Tomcat web server
Application Typically consists of a series of Stream components (TP, RDB HDB
etc) which are responsible for processing and providing access to
the data within the system.
Daemon Process
Control is used to configure and to run all processes and layers within the system. In
order to configure and run processes on a remote host (i.e. a separate Web or
Application host) a lightweight Daemon process is deployed which connects back
to Control. The Daemon typically runs on each Host in the deploy.
36
Kx Platform Deployment Guide
Pre Deploy
Before running the deploy we need to ensure that we have a set of free ports on
each server that we can use. For Control we will use the same port on the
Master/Slave hosts. The default port value is 2001, to check if this is free on each
Control host run:
If the port is free there will be no output but if a process is listening on the port then
you will see something like this.
If any of the ports above are in use the installer will select alternative values.
37
Kx Platform Deployment Guide
Host Details
control-a.fd.com Runs Master Control, Daemon and Stream KDB+ Processes
control-b.fd.com Runs Slave Control, Daemon and Stream KDB+ Processes
Web-a.fd.com Runs Master Daemon and Tomcat (Including Dashboards)
Web-b.fd.com Runs Slave Daemon and Tomcat (Including Dashboards)
The diagram below shows what this deploy would look like and the following section
describes how this deploy type can be achieved using the bundle installer.
control-a.fd.com control-b.fd.com
web-a.fd.com web-b.fd.com
You will do this in two sections; a control master/slave deploy and a web server
cluster deploy.
38
Kx Platform Deployment Guide
control-a.fd.com control-b.fd.com
web-a.fd.com web-b.fd.com
This section deals with the installation of the Master Control Instance. To deploy the
Master Control node you need to first select option [2]: Control
+----------------------------------------+
Running Pre Deploy Script [checkHost.sh]
+----------------------------------------+
[1] Single
[2] Control
[3] Web Server
[4] Daemon
+-----------------------------------------------------------+
Select Mode [1-4] : 2
+-----------------------------------+
Configure Control Clustering[yes]:
+-----------------------------------+
You will now be prompted for the port for Control. This should be the same port on
both the Master/Slave hosts and so must be free to use. (see Pre Deploy above).
Host Configuration
!! THE SAME PORT MUST BE USED FOR EACH CONTROL INSTANCE IN THE CLUSTER!!
Please enter free port to be used by Control [2001] : 2017
39
Kx Platform Deployment Guide
The next section deals with the host configuration, here we will enter details of the 4
hosts within the deploy. We will be prompted for hostnames, NB these must be in
FQDN form. we will also be prompted for the number of CPU cores on each host to
allow the installer to taskset our software appropriately across all available cores.
The current host is the Master Control host and so we need to enter the hostname of
the Slave Control Host
Master
Is this the [Master Control] Node [yes] : yes
FQDN of [Slave Control] node : control-b.fd.com
Slave
Is this the [Master Control] Node [yes] : no
FQDN of [Master Control] node : control-a.fd.com
From here we move on to the taskset configuration of the Control Cluster. In this
case we are entering the number of CPU Cores on which we are licensed to run
KDB+ on both of the control hosts. A value of 10 Cores will result in Control and the
Daemon running on Core 0 with the platform process instances being run across
cores 1-9. Do this on both Master and Slave.
The web server is configured via Control and so we must now enter the hostname
and the number of CPU cores on the webserver host. Here enter 5 cores on both
Master and Slave.
The TLS configuration is dealt with in Appendix D. In this case we are deploying
without TLS. And with a normal KDB+ license see below:
Encryption
Deploy with TLS/SSL Encryption Enabled [no] :
+-----------------------------------------------------------+
KDB+ License Type
+-----------------------------------------------------------+
Please enter location of a kx license file (k4.lic) [dir]: /home/estuart/licences
+-----------------------------------------------------------+
Running Deploy
Installing [8] Packages
[*********]
+-----------------------------------------------------------+
Installation complete.
Install.sh Finished
40
Kx Platform Deployment Guide
When deploying a Control node note that no processes are started up at the end of
the deploy. Details of how to bring up a multi-host deploy are dealt with at the end
of this section.
If you are using the install script (installDeltaXML.sh) directly or passing a non-default
install.config file into the install.sh wrapper script (via -i) then you can configure the
above deploy layout as follows:
# control-a.fd.com
# Delta Control server bind port
# Delta Control UI connects to DC on this port
DELTACONTROL_PORT=2017
41
Kx Platform Deployment Guide
# control-b.fd.com
# Delta Control server bind port
# Delta Control UI connects to DC on this port
DELTACONTROL_PORT=2017
42
Kx Platform Deployment Guide
web-a.fd.com web-b.fd.com
For both master and slave select Web Server to start the deploy
+----------------------------------------------+
Running Pre Deploy Script [checkHost.sh]
+----------------------------------------------+
[1] Single
[2] Control
[3] Web Server
[4] Daemon
+----------------------------------------------+
Select Node Type [1-4] : 3
+----------------------------------------------+
The next part is to configure the web deploy. Start this by saying you are doing a
Control Cluster. When entering the FQDN of the control master and slave enter the
nodes from the previous Control Master/Salve section:
+----------------------------------------------+
Configuring Web Server Deploy
Is this Deploy connecting to a Control Cluster [no] : yes
FQDN of Master Control Node : control-a.fd.com
FQDN of Slave Control Node : control-b.fd.com
Now enter a free control cluster port to use:
Control Cluster Port : 2017
+----------------------------------------------+
43
Kx Platform Deployment Guide
You now have two options. 1) HTTP or 2) HTTPS. Do this on both master and slave. If
you choose the HTTPS option
OPTION 1 - HTTP
+------------------------------------------------+
[1] HTTP
[2] HTTPS
+------------------------------------------------+
Select App Server Deploy Type [1-2] : 1
+------------------------------------------------+
OPTION 2 - HTTPS
+------------------------------------------------+
[1] HTTP
[2] HTTPS
+------------------------------------------------+
Select App Server Deploy Type [1-2] : 2
+------------------------------------------------+
Tomcat Java Keystore [/home/estuart/.keystore] :
Tomcat Java Keystore Password [changeme] : password1
App Server HTTPS port [8443] :
Now you can configure the port by pressing enter to use the default (8080) or by
entering your own port. In this case I used the default 8080 port.
OPTION 1 - HTTP
+------------------------------------------------+
App Server HTTP port [8080] :
+------------------------------------------------+
OPTION 2 – HTTPS
+------------------------------------------------+
App Server HTTPS port [8443] :
+------------------------------------------------+
You can finish the deploy and on successful deploy you should see the following:
Encryption
Deploy with TLS/SSL Encryption Enabled[no] :
+------------------------------------------------+
Running Deploy
Installing [9] Packages
[*********]
+------------------------------------------------+
Installation complete.
+------------------------------------------------+
Kx Platform Startup
[estuart@web-a.fd.com]
+------------------------------------------------+
Starting Daemon . . .done
+------------------------------------------------+
Finished.
Install.sh Finished.
44
Kx Platform Deployment Guide
Master
+-----------------------------------------------------+
Kx Platform Startup
[estuart@control-a.fd.com }
+-----------------------------------------------------+
Starting Control . . .done
Starting Daemon . . .done
+-----------------------------------------------------+
Finished.
Slave
+-----------------------------------------------------+
Kx Platform Startup
[estuart@control-b.fd.com }
+-----------------------------------------------------+
Starting Control . . .done
Starting Daemon . . .done
+-----------------------------------------------------+
Finished.
Finally, you can start the necessary workflows from this point such as App Server:
If you are using the install script (installDeltaXML.sh) directly or passing a non-default
install.config file into the install.sh wrapper script (via -i) then you can configure the
above deploy layout as follows:
45
Kx Platform Deployment Guide
46
Kx Platform Deployment Guide
Control-a.fd.com
Web-a.fd.com
Control deploy
Like previous, first the control side of the deploy will be demonstrated. Select the
control option after running install.sh
We are not doing a cluster so enter ‘no’ for the next part:
+-----------------------------------------------------------+
Configure Control Clustering [yes] : no
+-----------------------------------------------------------+
+-----------------------------------------------------------+
Node Configuration
Please enter free port to be used by Control [2001] : 2017
47
Kx Platform Deployment Guide
Encryption
Deploy with TLS/SSL Encryption Enabled [no] :
On success you should see the following:
+-----------------------------------------------------------+
Running Deploy
Installing [8] Packages
[*********]
+-----------------------------------------------------------+
Installation complete.
install.sh Finished.
48
Kx Platform Deployment Guide
If you are using the install script (installDeltaXML.sh) directly or passing a non-default
install.config file into the install.sh wrapper script (via -i) then you can configure the
above deploy layout as follows:
# control-a.fd.com
# Delta Control server bind port
# Delta Control UI connects to DC on this port
DELTACONTROL_PORT=2017
49
Kx Platform Deployment Guide
[1] Single
[2] Control
[3] Web Server
[4] Daemon
+-----------------------------------------------------------+
Select Node Type [1-4] : 3
We are not deploying a cluster so say no to the following. Press enter:
+-----------------------------------------------------------+
Configuring Web Server Deploy
Is this Deploy connecting to a Control Cluster [no] : no
Just as for the control deploy we had to fill in details of the web server, we now need
to fill in details of the control deploy on the web server deploy like follows:
OPTION 1 - HTTP
+------------------------------------------------+
[1] HTTP
[2] HTTPS
+------------------------------------------------+
Select App Server Deploy Type [1-2] : 1
+------------------------------------------------+
OPTION 2 - HTTPS
+------------------------------------------------+
[1] HTTP
[2] HTTPS
+------------------------------------------------+
Select App Server Deploy Type [1-2] : 2
+------------------------------------------------+
Tomcat Java Keystore [/home/estuart/.keystore] :
Tomcat Java Keystore Password [changeme] : password1
App Server HTTPS port [8443] :
Now you can configure the port by pressing enter to use the default (8080) or by
entering your own port. In this case I used the default 8080 port.
OPTION 1 - HTTP
+------------------------------------------------+
App Server HTTP port [8080] :
+------------------------------------------------+
OPTION 2 – HTTPS
+------------------------------------------------+
App Server HTTPS port [8443] :
+------------------------------------------------+
Similarly, we won’t be using TLS encryption so just press enter for the next part:
Encryption
50
Kx Platform Deployment Guide
Encryption
Deploy with TLS/SSL Encryption Enabled [no] :
Running Deploy
Installing [9] Packages
[**********]
+-----------------------------------------------------------+
Installation complete.
+-----------------------------------------------------------+
Kx Platform Startup
[estuart@web-a.fd.com]
+-----------------------------------------------------------+
Starting Daemon .....done
+-----------------------------------------------------------+
Finished.
install.sh Finished.
+-----------------------------------------------------------+
Starting Control .....done
Starting Daemon .....done
Starting App Server .....done
Starting Workflow [DS_STARTALL_FXEVAL] .....done
Starting Workflow [DS_launch_AT_A] .....done
Starting Workflow [DS_launch_html5eval] .....done
+-----------------------------------------------------------+
Finished.
Install Config Configuration
If you are using the install script (installDeltaXML.sh) directly or passing a non-default
install.config file into the install.sh wrapper script (via -i) then you can configure the
above deploy layout as follows:
# web-a.fd.com
# Delta Control server bind port
# Delta Control UI connects to DC on this port
DELTACONTROL_PORT=2017
51
Kx Platform Deployment Guide
52
Kx Platform Deployment Guide
Control-a.fd.com Control-b.fd.com
This Deploy is very similar the previous deploy, where the only difference is that we
don’t use separate boxes to host the web server side.
[1] Single
[2] Control
[3] Web Server
[4] Daemon
+-----------------------------------------------------------+
Select Node Type [1-4] : 2
Since this is a cluster deploy, say yes by pressing enter to the following:
53
Kx Platform Deployment Guide
You can now configure the control side of the deploy by entering the master and
slave host names and a free port to use:
Master
Node Configuration
!! THE SAME PORT MUST BE USED FOR EACH CONTROL INSTANCE IN THE CLUSTER!!
Please enter free port to be used by Control [2001] : 2017
Using port [2017] for Control
Is this the [Master Control] Node [yes] :
FQDN of [Slave Control] Node : control-b.fd.com
Slave
Node Configuration
!! THE SAME PORT MUST BE USED FOR EACH CONTROL INSTANCE IN THE CLUSTER!!
Please enter free port to be used by Control [2001] : 2017
Using port [2017] for Control
Is this the [Master Control] Node [yes] : no
FQDN of [Master Control] Node : control-a.fd.com
From here we move on to the taskset configuration of the Control Cluster. In this
case we are entering the number of CPU Cores on which we are licensed to run
KDB+ on both of the control hosts. A value of 10 Cores will result in Control and the
Daemon running on Core 0 with the platform process instances being run across
cores 1-9.
Number of [Licensed KDB+] [CPU cores] on [Control] Node(s) : 10
This is the part where this deploy differs from the previous deploy. You must specify
the details of the web server nodes a and b, a being the same as the master control
node and b being the same as the slave control node. Do the following on both
master and slave:
Encryption
Deploy with TLS/SSL Encryption Enabled [no] :
Upon successful deploy you should see the following on both master and slave:
Running Deploy
Installing [15] Packages
[****************]
+-----------------------------------------------------------+
Installation complete.
install.sh Finished.
54
Kx Platform Deployment Guide
+-----------------------------------------------------------+
Starting Control .....done
Starting Daemon .....done
Starting App Server .....done
Starting Workflow [DS_STARTALL_FXEVAL] .....done
Starting Workflow [DS_launch_AT_A] .....done
Starting Workflow [DS_launch_html5eval] .....done
+-----------------------------------------------------------+
Finished.
Install Config Configuration
If you are using the install script (installDeltaXML.sh) directly or passing a non-default
install.config file into the install.sh wrapper script (via -i) then you can configure the
above deploy layout as follows:
55
Kx Platform Deployment Guide
Shutdown
The shutdown of a Multi Host deploy is done in the reverse order with the AppServer
and Workflows being brought down before the Control layer.
The following scripts should be run in turn on the Control Master Host:
$ ./stopAppServer.sh
$ ./stopWorkflows.sh
$ ./stopAllProcesses.sh
Once the above scripts have successfully run its time to bring down the Daemon on
each Host in the deploy. This is done by running the stopDeltaControlDaemon.sh
script.
With the daemons stopped the last step is to bring down the Control Cluster. When
doing this you always stop the Slave Control instance first.
On control-b.fd.com run:
$ ./stopDeltaControl.sh
Once this is complete logon to control-a.fd.com and run the same script:
$ ./stopDeltaControl.sh
56
Kx Platform Deployment Guide
Start-up
When dealing with a Multi Host Deploy the order in which the various components
are brought up is very important. The following section will give the order in which to
bring up the components on each Host using the Deployment above as an
example.
Control Layer
With Control deployed in a failover cluster the Control instance on host control-
a.fd.com is our preferreed Master. When starting up a pair of clustered Control
instances the Master should be started first and the Slave should be started second.
control-a.fd.com
$ ./startDeltaControl.sh
Sourcing [../delta.profile]
Sourcing [../delta_user.profile]
Sourcing [../delta.instance.profile]
KDB+ license valid
Starting Delta Control 4.1.0 on port 2001 using KDB+ 3.5.0
Delta Control [PID:32052] started successfully
control-b.fd.com
$ ./startDeltaControl.sh
Sourcing [../delta.profile]
Sourcing [../delta_user.profile]
Sourcing [../delta.instance.profile]
KDB+ license valid
Starting Delta Control 4.1.0 on port 2150 using KDB+ 3.5.0
Delta Control [PID:32105] started successfully
57
Kx Platform Deployment Guide
Daemons
With the Control layer running the Daemons should now be started on each host in
the deploy. This is done using the startDeltaControlDaemon.sh in the bin directory.
Example output from running this script is given below.
$ ./startDeltaControlDaemon.sh
Sourcing [../delta.profile]
Sourcing [../delta_user.profile]
Sourcing [../delta.instance.profile]
/home/ddempsey/kxinstall/delta-bin/software/DeltaControl_4_1_0/jcore/Daemon
Daemon running as pid 32193
Delta Daemon [PID:32193] started successfully
NB on the web host above the Daemon will have been brought up as part of the
initial deploy.
App Server
With the Daemon processes running we can now start the AppServer process which
runs inside Tomcat. This is done by running the start startAppServer.sh script on the
Master Control Host
NB the AppServer can take a few minutes to become fully operational. Once it is
accessible via the URL the system start-up is complete.
Workflows
Once the Daemons and AppServer are running we can now bring up the system
processes via the startWorkflows.sh script which is run on the Master Control Host.
Below the script is run without arguments, this will start-up all workflows in the
startup_workflows.txt file within the delta-bin/config directory.
58
Kx Platform Deployment Guide
The additional workflows for each bundle type are given below:
Platform Bundle
Workflow Description
DS_launch_MS_A Messaging Service: Process instance which aids discovery
for publishers and subscribers within the system
DS_launch_ALERT_A Alerts Eco-System: Process instances required to configure
and generate alerts
DS_launch_OPS_A Operations Eco-System. Process instances to store and
provide access to monitoring statistics
DS_launch_REPORT_A Reporting Eco-System: Process instances required to
configure and generate reports
DS_launch_AT_A Action Tracker Eco-System: Process instances required to
create, transition and store action tracker items
Eval Bundle
Workflow Description
DS_STARTALL_FXEVAL Starter workflow which starts FX Eval process instances, Alert
Eco-System and Reporting Eco-System.
DS_launch_AT_A Action Tracker Eco-System: Process instances required to
create, transition and store action tracker items
DS_launch_html5eval Starts dashboard eval stats engine
59
Kx Platform Deployment Guide
KDB+ version 3.4 onwards supports SSL/TLS connections. The Kx platform supports TLS
from version 4.0.2 onwards on both Linux and Windows.
Certificates / Keys:
In order to use TLS you need to provide the following certificates and key files.
Name Description
server-crt.pem Server certificate file
server-key.pem Server key file
ca.pem Certificate Authority file
Place the files above in a known location on each deploy host. When prompted to
Deploy with TLS/SSL Encryption Enabled answer yes.
Encryption
Deploy with TLS/SSL Encryption Enabled [no] : yes
Client Certs
By default TLS configuration omits the Client certificate but If you wish to include your
client Certificate in the TLS deploy you can do so by answering yes to the prompt
below. You will then be asked for the location of your client-crt.pem file. In this
example we will accept the Default option of no.
Next enter the location of your certificate files (in the example below all the required
certificate files are in the users home directory in a sub directory called certs). Each
certificate file will be copied into the scripts directory inside the bundle so avoid
prompting for future upgrades.
TLS/SSL Certificates
Location of server certificate file (server-crt.pem]) [dir] : ~/certs
60
Kx Platform Deployment Guide
The script will check the current directory, the scripts directory and any directory you
provide when prompted for each of the required certificate files. Any files which are
not found in these locations will be prompted for. In the example below the
certificate directory has been provided but the ca.pem is not present so the script
prompts for the location of this file:
If you are passing your own custom install config file into the install.sh script (via -p)
then you’ll need to either:
In order to do this, add the following lines to your custom install config which will tell
the installer you want to deploy with TLS enabled and where it can find your .pem
files:
# TLS
tls-encryption-enabled=1
ssl-server-cert-file=server-crt.pem
ssl-server-key-file=server-key.pem
ssl-ca-cert-file=ca.pem
You can now run the deploy as normal and it will be TLS enabled.
If you answer yes to enable TLS encryption you will then be prompted for the
location of the required .pem files listed in the table above.
[tls-encryption-enabled]
Install with TLS encryption enabled [no]: yes
+-----------------------------------------------------------+
please enter location of file [server-crt.pem]:
You will then see the following and the install will complete with TLS enabled.
61
Kx Platform Deployment Guide
With TLS on you will see the following line in the delta.profile
export DELTACONTROL_TLS=ON
The certificates provided above will have been copied into the [delta-bin/config/tls-
certs] directory as follows:
$ ls ~/kxinstall/delta-bin/config/tls-certs/
ca.pemkeystore.jks server-crt.pem server-key.pem
If you are using the install script (installDeltaXML.sh) directly or passing a non-default
install.config file into the install.sh wrapper script (via -i) the you can configure TLS as
follows:
#============================================================
# TLS CONFIGURATION
#============================================================
tls-encryption-enabled=1
ssl-server-cert-file=/path/to/server-crt.pem
ssl-server-key-file=/path/to/server-key.pem
ssl-ca-cert-file=/path/to/ca.pem
#tls-include-client-certificate=1
#ssl-client-cert-file=client-crt.pem
62
Kx Platform Deployment Guide
If TLS was not enabled at deploy time it can be enabled post deploy using the
following steps.
Certificates / Keys:
In order to use TLS you need to provide the following certificates and key files.
Name Description
server-crt.pem Server certificate file
server-key.pem Server key file
ca.pem Certificate Authority file
The certificates above should be copied into the tls-certs dir inside the deploy
(delta-bin/config/tls-certs).
Generating Keystore
Once the certificates above are in place you need to use them to create a Java
Keystore which will be used by the App Server to connect to the TLS enabled KDB+
processes including Control for Kx.
In order to create the keystore you must have openssl (1.0.1+) installed and a Java
JRE/JDK 1.8 on your PATH.
To create the keystore cd into the delta-bin/config/tls-certs directory and run the
following commands.
You should now a Java Keystore named keystore.jks inside the tls-certs dir.
$ ls -1
all.pem
ca.pem
keystore.jks
server-crt.pem
server-key.pem
Update delta.profile
With the certificates and keystore in place the next step is to enable TLS
63
Kx Platform Deployment Guide
export DELTACONTROL_TLS=ON
As an additional check ensure that this line is followed by the TLS environment
variables below. If they are not present add them.
export DELTACONTROL_TLS=ON
export DELTACONTROL_PERM_MAP=YES
export SSL_CERT_FILE=${DELTA_CONFIG}/tls-certs/server-crt.pem
export SSL_KEY_FILE=${DELTA_CONFIG}/tls-certs/server-key.pem
export SSL_CLIENT_CERT_FILE=${DELTA_CONFIG}/tls-certs/client-crt.pem
export SSL_CA_CERT_FILE=${DELTA_CONFIG}/tls-certs/ca.pem
export SSL_CA_CERT_PATH=${DELTA_CONFIG}/tls-certs/
export SSL_KEYSTORE_FILE=${DELTA_CONFIG}/tls-certs/keystore.jks
export SSL_KEYSTORE_PASS=changeit
export SSL_VERIFY_SERVER=YES
export SSL_VERIFY_CLIENT=NO
Restart Environment
The changes above will not take effect until the environment is restarted. This is done
by cd’ing into the delta-bin/bin directory and running shutdown.sh followed by
startup.sh.
If enabling TLS on a 4.1.0+ deploy there is an additional step required if you are using
HTTPS Tomcat connectors with TLS enabled back end. The additional step involves
exporting your certificates form the connector keystore (See Appendix E) and
importing it into your javax.net.ssl.trustStore (delta-bin/config/tls-certs/keystore.jks).
The steps required to do this are given below and they assume your connector
keystore is in your home dir (~/.keystore). cd into the delta-bin/config/tls-certs
directory and run the following commands.
The command above assumes the key you wish to export has the alias “tomcat” in
the connector keystore (~/.keystore) and that the password of that keystore is
changeit (-srcstorepass changeit).
64
Kx Platform Deployment Guide
In order to enable SSL on the Tomcat deploy you must provide a Java Keystore
which contains the required certificates,
You can generate a keystore using the following instructions from the tomcat docs
page:
https://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html
To install and configure SSL/TLS support on Tomcat, you need to follow these simple
steps.
1. Create a keystore file to store the server's private key and self-signed
certificate by executing the following command:
If you are using the bundle install config (scripts/install.config) change the app-
server-install-type to 2, uncomment the tomcat-keystore-file and tomcat-keystore-
password and update the path to the keystore and the keystore password.
#============================================================
# TOMCAT / APP SERVER OPTIONS
#============================================================
If you are using a custom install config then you need to add the 3 install options
above into your config
65
Kx Platform Deployment Guide
Tomcat URLs
Tomcat will use the TOMCAT_SECURE_PORT value as the port for your HTTPS/SSL
connector. The HTTP port (TOMCAT_PORT) will redirect to the HTTPS/SSL port.
https://<server>:<TOMCAT_SECURE_PORT>/
e.g.
https://kxplatform:8443/
http://<server>:<TOMCAT_PORT>/
e.g.
http://kxplatform:8080/
NB The HTTP connector will redirect the user to the HTTPS port.
66
Kx Platform Deployment Guide
From release 4.0.2 onwards the memory allocation for the App Server is controlled
via the following environment variables in the delta.profile.
For production deploys of App Server the recommend values for the JVM heap sizes
are:
APPSERVER_JVM_INITIAL_MEMORY = 1280
APPSERVER_JVM_MAX_MEMORY = 8192
These can be achieved by adding the following to the end of either the bundle
install config (scripts/install.config) or a custom install config (passed in via -p).
#============================================================
# NEW / CUSTOM CONFIGURATION
#============================================================
tomcat-install-type=2
If you wish to tune the memory allocation yourself then you can do this by adding
the following to the end of either the bundle install config (scripts/install.config) or a
custom install config (passed in via -p).
#============================================================
# NEW / CUSTOM CONFIGURATION
#============================================================
app-server-jvm-initial-memory=2560
app-server-jvm-max-memory=5120
67
Kx Platform Deployment Guide
As of 4.1.0, the platform support Single Sign On in the form of SAML. This allows the
platform to offload authorization to a third party Identity Provider (IDP)
Enabling SAML
1. Install platform as per normal. Install configuration file can be used to set the
ENV variables defined above if known. They can also be set post installation
as detailed below)
2. Update the delta.profile as appropriate:
a. Set ENV SPRING_PROFILES_ACTIVE to saml.
b. Provide unique SAML_SP_METADATA_ENTITY_ID.
c. Set the location of the SAML_IDP_METADATA_FILE. The IDP metadata
file can be retrieved from the IDP in use.
d. Set the APPSERVER_SPLASHPAGE to saml/index.jsp.
3. If using a TLS deploy; the default keystore and password can be set to the
same keystore and password used for inter process communication;
SAML_KEYSTORE_FILE=$SSL_KEYSTORE_FILE,
SAML_KEYSTORE_PASS=$SSL_KEYSTORE_PASS. Otherwise a unique keystore and
password can be generated and defined by these ENVs.
4. Modify the web.xml to enable Spring security filters. Located at …/delta-
bin/software/Tomcat_7_0_82/apache-tomcat-7.0.82/webapps/ROOT/WEB-
INF/web.xml. Uncomment the section titled ‘Added for SAML; uncomment’.
68
Kx Platform Deployment Guide
In addition, there are number of other ENV configuration values which can be set to
change the SAML setup
69
Kx Platform Deployment Guide
Upon authorization by the IDP, a user may or may not exist within the platform. It is
necessary post authorization that a user exists within the platform configuration to
enable UI sessions to be created, maintained and destroyed. The platform provides
the ability to auto create SSO users who do not exist on initial login and provide
default permissions through user groups. This is maintained by the config parameter
CONTROL_SSO:DEFAULT.
pKey pValue
createUser true/false. If true; the user will be auto created on
first login
70
Kx Platform Deployment Guide
KDB+ is typically licensed to run on a number of CPU cores. By default the q binary
will be run under taskset (Linux) or psrset (Solaris). On some Linux systems there is also
the option of running KDB+ under numactl (if enabled). This can be achieved by
adding the following to a custom install config (passed in via -p).
NB. When running with numactl any process instances kicked off by Control or the
Daemon can only use all or a subset of the CPU cores defined by kdb-cpu-affinity
(Control) and dcd-cpu-affinity (Daemon).
If the process instance is configured to use cores outside of this range you will see
the following in the process instance log file (delta-
data/DeltaControlData/logdir/<process.instance.log>)
The install config options above will result in Control being started using numactl as
follows:
The Daemon will also be run under numactl and the CPU core set is configured via
dcd-cpu-affinity above.
71
Kx Platform Deployment Guide
Control is a KDB+ database process which contains configuration and code. The
contents of Control are imported from a set of XML files delivered in the TGZ
packages within the release bundles. Importing the XML files into Control causes
their contents to be converted into Control entities which are stored in the
database. This import can be initiated via the Control Web UI or using the install
script (Auto Import).
As outlined in the single server deploy above, installing the Platform involves an
import step at the end. The process for importing packages is automated via the
install script but it is useful to understand how it works. The installation process for a
package which contains Control entities is defined below.
72
Kx Platform Deployment Guide
Using the Platform’s Stream package the steps above are outlined in an upgrade
from version 4.0.3 to version 4.1.0 of the Platform.
$ cd ~/kxinstall/packages/
$ ls -1
DeltaStream_4_0_3
DeltaStream_4_1_0
export DELTASTREAM_VERSION=4_1_0
export DELTASTREAM_HOME=${DELTA_PACKAGE_HOME}/DeltaStream_${DELTASTREAM_VERSION}
As a result after sourcing the delta.profile (part of Control start up) the
DELTASTREAM_HOME variable now gives the PATH to the new 4_1_0 package.
$ . delta.profile
$ echo $DELTASTREAM_HOME
/home/ddempsey/kxinstall/packages/DeltaStream_4_1_0
export
DELTA_IMPORT_PACKAGES=${DELTASTREAM_HOME}:${ANALYST_HOME}:${HTML5DASHBOARDSEVAL_HOME}
$ cd ~/kxinstall/
$ ls -1 checkpoint/
checkpoint_108
$ cd ~/kxinstall/delta-data/DeltaControlData/logdir/
$ grep "finished importing packages" DeltaControl.log
73
Kx Platform Deployment Guide
8. Control is shutdown.
The variables which control the auto import as seen above are:
DELTA_AUTO_IMPORT
When set to NO, Control starts up as normal and does not attempt to import any
packages. When DELTA_AUTO_IMPORT is set to YES Control imports each package
on the DELTA_IMPORT_PACKAGES list in turn.
DELTA_IMPORT_PACKAGES
List of package home directories. All packages whose locations are listed on this
Environment variable will be imported into Control when DELTA_AUTO_IMPORT = YES.
DELTA_PACKAGES_PATH
Dictates where packages can be saved to. Anything that attempts to save outside
those locations will be rejected.
DELTA_PACKAGES_DIR
DELTA_STARTUP_PACKAGES
74
Kx Platform Deployment Guide
Package Configuration
In order for a package to be able to import into Control it must contain the
following:
File Description
Control Entities XML files which define a set of Delta Control entities (instance,
task, configparam etc)
Package cfg and _export.cfg files which defined the set of entities which
Manifest Files should be imported into Control. Each entry in the .cfg file
corresponds to a XML file in the package.
NB if an entity exists as and XML file but is not defined in the .cfg
file it will not be imported into Control
Package _permissions.xml file which defines the permissions for each of the
Permissions entities when imported into Control
The files above are the bare minimum of content required for a package to be
imported into Control. In order for a package to be deployed using the install script it
requires additional content which is outside of the scope of this document.
75
Kx Platform Deployment Guide
Post 4.1.0 the Platform and Eval bundles will contain a pair of platform support
scripts.
Script Description
checkHost.sh Run checks on the host including Hostname/ FQDN. Check for
RPM prerequisites and required binaries
validateCerts.sh Run openssl client/server and validate the SSL certificates
provided.
checkEnv.sh Check the environment for log file errors and grab information
such as process lists and taskset values.
checkHost
When the bundle installer (install.sh) runs you will see the following output:
+-----------------------------------------------------------+
Running Pre Deploy Script [checkHost.sh]
+-----------------------------------------------------------+
This tells you that the installer found and ran the checkHost.sh script and that it ran
successfully will all validation steps passed.
76
Kx Platform Deployment Guide
validateCerts
If the platform is deployed with TLS enabled a script call validateCerts.sh will run post
deploy. This script runs the openssl client and server and provides the output to a log
file in platform-info/logs/openssl-client.log. See sample output below:
+----------------------------------------------------------+
Validate SSL Certificates
+----------------------------------------------------------+
Running SSL Certificate Validation Script
[validateCerts.sh
-c /home/ddempsey/kxinstall/delta-bin/config/tls-certs
-l platform-info/logs]
+===========================================================+
Certificate Directory [-c] set to [/home/ddempsey/kxinstall/delta-bin/config/tls-
certs]
Log Directory [-l] set to [platform-info/logs]
============================================================
== validateCerts.sh [1.0] ==
============================================================
+----------------------------------------------------------+
[ddempsey@control-a.fd.com]
[Fri 19 Jan 14:37:44 UTC 2018]
[validateCerts.log]
+----------------------------------------------------------+
Check OpenSSL Installed
+----------------------------------------------------------+
Found OpenSSL [/usr/bin/openssl]
Version [OpenSSL 1.0.1e-fips 11 Feb 2013]
+----------------------------------------------------------+
Get SSL Certificates
+----------------------------------------------------------+
Using certificate [/home/ddempsey/bundles/4.1.0/GA/PlatformKx-4.1.0-
RHEL70/scripts/server-crt.pem]
Using certificate [/home/ddempsey/bundles/4.1.0/GA/PlatformKx-4.1.0-
RHEL70/scripts/server-key.pem]
Using certificate [/home/ddempsey/bundles/4.1.0/GA/PlatformKx-4.1.0-
RHEL70/scripts/ca.pem]
+----------------------------------------------------------+
Run OpenSSL Server
+----------------------------------------------------------+
Starting SSL Server on port [44330]
[openssl s_server -accept 44330 -www
-key /home/ddempsey/bundles/4.1.0/GA/PlatformKx-4.1.0-RHEL70/scripts/server-
key.pem
-cert /home/ddempsey/bundles/4.1.0/GA/PlatformKx-4.1.0-RHEL70/scripts/server-
crt.pem
-CAfile /home/ddempsey/bundles/4.1.0/GA/PlatformKx-4.1.0-RHEL70/scripts/ca.pem]
Started OpenSSL Server [PID:12777]
+----------------------------------------------------------+
Run OpenSSL Client
+----------------------------------------------------------+
[openssl s_client -connect localhost:44330 < /dev/null > platform-
info/logs/openssl-client.log]
depth=1 C = US, ST = New York, L = Brooklyn, O = Example Brooklyn Company, CN =
examplebrooklyn.com
verify error:num=19:self signed certificate in certificate chain
verify return:0
DONE
+----------------------------------------------------------+
Kill OpenSSL Server
+----------------------------------------------------------+
Killed OpenSSL Server [PID:12777]
+----------------------------------------------------------+
Finished [validateCerts.sh].
77
Kx Platform Deployment Guide
checkEnv.sh
Once the deploy is complete the checkEnv script will be run to gather information
about the deploy. You will see the following output:
+----------------------------------------------------------+
Finished [checkEnv.sh].
+-----------------------------------------------------------+
install.sh Finished.
Script Output
The scripts above write output to the following directory scripts/platform-info. Once
the deploy is complete the output from the scripts is tarred up along with the install
log files into a TGZ such as the one below (KX-INSTALL-LOGS-20180119-143407.tgz):
$ ls
install.log install.sh KX-INSTALL-LOGS-20180119-143407.tgz packages README.txt
scripts tmp
Directory Description
platform-info/logs Output from the Platform Support scripts.
platform-info/<host>/env-info Environment information collected by checkEnv.sh
platform-info/<host>/host-info Host information collected by checkHost.sh
Reporting Issues
Should you experience problems with your environment post deploy you can run the
Platform support scripts independently of the install to collate the relevant host and
environment info. The scripts should be run on each affected host in the deploy and
the resulting TGZ should be sent with a detailed description of the issue to the FD
Support alias.
$ cd PlatformKx-4.1.0-RHEL70/scripts/
./runSupportScripts.sh
+----------------------------------------------------------+
Current install location [~/kxinstall]:
This will run the chekHost, checkEnv and validateCerts (if applicable) and generate
a time stamped TGZ named something like this KX-SUPPORT-LOGS-20171219-
152627.tgz.
78
Kx Platform Deployment Guide
The values given for Host, Port and Taskset can be defined in several ways. The
options are detailed below.
Auto Configuration
The following install script options are used to automatically configure the process
instances.
79
Kx Platform Deployment Guide
A csv file containing configuration details for process instances can be used as an
alternative to automatic configuration.
ds_ms_a,delta4.firstderivatives.com,4000,1-4
The CSV file is passed into the install script using the -i command line option. e.g.
Once the install completes you should see the following in the delta.instance.profile.
export ds_ms_a_HOST="delta4.firstderivatives.com"
export ds_ms_a_PORT="4000"
export ds_ms_a_TASKSET="1-4"
export dm_rte_bridge_a_HOST="delta1.firstderivatives.com"
export dm_rte_bridge_a_PORT="3000"
export dm_rte_bridge_a_TASKSET=""
80
Kx Platform Deployment Guide
This section describes the command line options which are available in the
installDeltaXML.sh script. For a complete list run:
./installDeltaXML.sh -?
81
Kx Platform Deployment Guide
This section contains the complete list of options which can be added to an
installation configuration file to be passed into the install script using the (-p)
command line options.
82
Kx Platform Deployment Guide
KDB+ Options
83
Kx Platform Deployment Guide
84
Kx Platform Deployment Guide
General Options
Install Config Option Values Details
85
Kx Platform Deployment Guide
Package Options
Install Config Option Values Details
86
Kx Platform Deployment Guide
87
Kx Platform Deployment Guide
88