Skip to content

Overview

A tour through each component to show its functionality

  • Packaging (QPacker)
  • Orchestration (Helm & Kubernetes)
  • REST client (Kurl) and server
  • Logging (QLog)
  • Object storage
  • Google Cloud Platform (BigQuery)

Find more detail in the corresponding sections of this site.

Installing Kx Cloud Edition

To install the Kx Cloud Edition on Linux, you will need your license key. This could be distributed as either a k4.lic or kc.lic file that you can install in either

  • $QLIC
  • $HOME/.qp.licenses/
  • Or you can base64-encode it for automated/simplified installation bash KDB_LICENSE_B64="$(base64 < /path/to/kc.lic)"

Native installer

KXCE comes with a simple native script installer for Linux based operating systems. Run the script providing the appropriate license highlighted above

tar xzf KxCloudEdition@@VERSION@@.tgz
@@SKIP ln -sf KxCloudEdition@@VERSION@@ KxCloudEdition
sh KxCloudEdition/code/kdb/qce-install.sh --license="$KDB_LICENSE_B64"

Confirm that KDB+ can be run with the command qce and ensure the version is correct.

user@instance:~$ qce
KDB+cloud 4.0 2021.02.02 Copyright (C) 1993-2021 Kx Systems
m64/ 4()core 24576MB username server xxx.xxx.xxx.xxx EXPIRE 2022.01.22 email@kx.com KXCE #?????????

q)

RPM Package

Alternatively an RPM package is provided for suitable RPM-based systems for automatic installation. These will not install the license file for you; the environment variable QLIC should be set to the license directory when using it.

Manual installation

If you would like to integrate the Kx Cloud Edition into an existing application, you can use the included code/kdb/l64.zip in a manner similar to existing kdb+ installations.

KXCE Images

In addition KX Cloud can be run from a container image. This allows it to be - Run in docker - Run in docker-compose - Used as a base image for custom applications built on KXCE

As well as a base64 encoded license, it will be necessary to authentiucate docker with the Kx container registry registry.dl.kx.com

docker login -u <username> -p <password> registry.dl.kx.com

!!! note It is also possible to mount the license as a volume in Docker and set the environment variable QLIC appropriately

Run in Docker

Kx Cloud Edition can be run simply from docker with the command

docker run --rm -it -e KDB_LICENSE_B64="$KDB_LICENSE_B64" \
    registry.dl.kx.com/qce:2.0.0

If required, scripts and content can be passed into the container and loaded by Kx Cloud Edition

init.q

mkdir code
echo 'show "Launching custom script called init.q"' > code/init.q
docker run --rm -it -e KDB_LICENSE_B64="$KDB_LICENSE_B64" \
    -v $(pwd)/code:/opt/kx/code \
    registry.dl.kx.com/qce:2.0.0 code/init.q

Output

INFO: Get kdb+ license [kc.lic] from KDB_LICENSE_B64 environment variable
INFO: testing and installing kc.lic
INFO: successful
RUN [/tini q startq.q code/init.q]
KDB+ 4.1t 2021.06.12 Copyright (C) 1993-2021 Kx Systems
m64/ 4()core 24576MB username server xxx.xxx.xxx.xxx EXPIRE 2022.01.22 email@kx.com KXCE #?????????

"Launching custom script called init.q"
q)

Run with Docker compose

Similarly Kx Cloud Edition can be configured and run with docker compose

docker_compose.yml

version: "3.7"
services:
  registry:
    image: registry.dl.kx.com/qce:2.0.0
    environment:
      - KDB_LICENSE_B64=$KDB_LICENSE_B64
    # Expose port 5000 locally
    ports:
      - 5000:5000
    volumes:
      - ./code:/opt/kx/code
    command: -p 5000 code/init.q

Run with the command

docker-compose up

Output

Creating network "qceapp2_default" with the default driver
Creating qceapp2_registry_1 ... done
Attaching to qceapp2_registry_1
registry_1  | INFO: Get kdb+ license [kc.lic] from KDB_LICENSE_B64 environment variable
registry_1  | INFO: testing and installing kc.lic
registry_1  | INFO: successful
registry_1  | RUN [/tini q startq.q -p 5000 code/init.q]
registry_1  | "Launching custom script called init.q"

Custom images

Finally the Kx Cloud Edition image can be utilised to build custom images with a Dockerfile.

Dockerfile

FROM registry.dl.kx.com/qce:2.0.0

WORKDIR /opt/kx

COPY code /opt/kx/code

ENTRYPOINT [ "/opt/kx/startq.sh", "code/init.q" ]
# BUILD
docker build -t custom-kdb-image:latest .
# RUN
docker run --rm -it -e KDB_LICENSE_B64="$KDB_LICENSE_B64" custom-kdb-image:latest

Output

INFO: Get kdb+ license [kc.lic] from KDB_LICENSE_B64 environment variable
INFO: testing and installing kc.lic
INFO: successful
RUN [/tini q startq.q code/init.q]
KDB+ 4.1t 2021.06.12 Copyright (C) 1993-2021 Kx Systems
m64/ 4()core 24576MB username server xxx.xxx.xxx.xxx EXPIRE 2022.01.22 email@kx.com KXCE #?????????

"Launching custom script called init.q"
q)

Now we will explore the features of Kx Cloud Edition in turn.