Skip to content

Quick start

A tour through each component to show its functionality

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

Details in the corresponding sections of this site.

Install KX Insights Core

To install the KX Insights Core on Linux, you will need your license key. This is distributed as either a kx.lic, kc.lic or k4.lic file that you can install in either

  • $QLIC
  • $HOME/.qp.licenses/

Alternatively you can pass the license file location to the installer via --license-file.

Native installer

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

tar xzf KxCloudEdition-3.1.0.tgz
ln -sf KxCloudEdition-3.1.0 KxCloudEdition
sh KxCloudEdition/code/kdb/qce-install.sh --license-file="/path/to/license/file"

Confirm that KX Insights Core can be run with the command qce and ensure the version is correct.

$ qce
KDB+ 4.0 Cloud Edition 2022.07.01 Copyright (C) 1993-2022 Kx Systems
l64/ 8(24)core 6118MB <REDACTED> <REDACTED> 127.0.1.1 EXPIRE 2023.02.18 <REDACTED> KOD KXCE <REDACTED>

RPM package

Alternatively a RPM package is provided for suitable RPM-based systems for automatic installation.

License file

These will not install the license file for you. Set environment variable QLIC to the license directory when using it.

Manual installation

To integrate KX Insights Core into an existing application, use the included code/kdb/l64.zip in a manner similar to existing kdb+ installations.

KX Insights Core images

The KX Insights Core can also be run from a Docker container. 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 license file, you need to authenticate Docker with the KX container registry registry.dl.kx.com.

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

Run in Docker

The command to run in docker depends on the type of license file you have been issued:

kx.lic

docker run --rm -it -e KDB_KXLICENSE_B64="$(base64 -w0 /path/to/kx.lic)" \
    registry.dl.kx.com/qce:3.1.0

kc.lic

docker run --rm -it -e KDB_LICENSE_B64="$(base64 -w0 /path/to/kc.lic)" \
    registry.dl.kx.com/qce:3.1.0

k4.lic

docker run --rm -it -e KDB_K4LICENSE_B64="$(base64 -w0 /path/to/k4.lic)" \
    registry.dl.kx.com/qce:3.1.0

Scripts and content can be passed into the container and loaded by KX Insights Core.

$ mkdir code
$ echo 'show "Launching custom script called init.q"' > code/init.q
$ docker run --rm -it -e KDB_LICENSE_B64="$(base64 -w0 /path/to/kc.lic)" \
    -v $(pwd)/code:/opt/kx/code \
    registry.dl.kx.com/qce:3.1.0 code/init.q
INFO: Get kdb+ license [kc.lic] from KDB_LICENSE_B64 environment variable
KDB+ 4.0 Cloud Edition 2022.07.01 Copyright (C) 1993-2022 Kx Systems
l64/ 8(24)core 6118MB <REDACTED> <REDACTED> 127.0.1.1 EXPIRE 2023.02.18 <REDACTED> KOD KXCE <REDACTED>

"Launching custom script called init.q"
q)

Run with Docker Compose

Set license env variable

kx.lic

export KDB_KXLICENSE_B64="$(base64 -w0 /path/to/kx.lic)"

kc.lic

export KDB_LICENSE_B64="$(base64 -w0 /path/to/kc.lic)"

k4.lic

export KDB_K4LICENSE_B64="$(base64 -w0 /path/to/k4.lic)"

Configure docker-compose.yml

version: "3.7"
services:
  registry:
    image: registry.dl.kx.com/qce:3.1.0
    environment:
      # Uncomment appropriate license env variable (see above)
      # - KDB_KXLICENSE_B64=$KDB_KXLICENSE_B64
      # - KDB_LICENSE_B64=$KDB_LICENSE_B64
      # - KDB_K4LICENSE_B64=$KDB_K4LICENSE_B64
    # Expose port 5000 locally
    ports:
      - 5000:5000
    volumes:
      - ./code:/opt/kx/code
    command: code/init.q -p 5000

and run

$ docker-compose up
Creating network "kdb_default" with the default driver
Creating kdb_registry_1 ... done
Attaching to kdb_registry_1
registry_1  | INFO: Parse kdb+ license [kc.lic] from KDB_LICENSE_B64 environment variable
registry_1  | "Launching custom script called init.q"

Custom images

Use the KX Insights Core image to build custom images with a Dockerfile

FROM registry.dl.kx.com/qce:3.1.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="$(base64 -w0 /path/to/kc.lic)" custom-kdb-image:latest
INFO: Get kdb+ license [kc.lic] from KDB_LICENSE_B64 environment variable
KDB+ 4.0 Cloud Edition 2022.07.01 Copyright (C) 1993-2022 Kx Systems
l64/ 8(24)core 6118MB <REDACTED> <REDACTED> 127.0.1.1 EXPIRE 2023.02.18 <REDACTED> KOD KXCE <REDACTED>

"Launching custom script called init.q"
q)