Skip to content

Quick start

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)

Details in the corresponding sections of this site.

Install kdb+ Cloud Edition

To install the kdb+ Cloud Edition on Linux, you will need your license key. This is 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 or simplified installation:

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 as 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 ..

q)

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 kdb+ Cloud Edition into an existing application, use the included code/kdb/l64.zip in a manner similar to existing kdb+ installations.

KXCE images

The kdb+ Cloud Edition 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 base64 encoded license, you need to authenticate Docker with the KX container registry registry.dl.kx.com.

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

Mount the license as a volume in Docker

It is also possible to mount the license as a volume in Docker and set the environment variable QLIC accordingly.

Run in Docker

Run kdb+ Cloud Edition from Docker:

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

Scripts and content can be passed into the container and loaded by kdb+ Cloud Edition.

$ 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
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

Configure 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

and run

$ docker-compose up
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

Use the kdb+ Cloud Edition image to build custom images with a 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
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)