Using Win QPacker
A packaging utility for deploying kdb+ applications to the cloud
Windows Requirements
Win qpacker installs and runs within the Windows Subsystem for Linux. Therefore a working WSL environment is required for win qpacker to run. These are the components required :
Windows 10, version 1093 or higher
Docker Desktop (2.3.0.2 or or higher)
WSL2 feature enabled in Windows
WSL2 enabled distro installed
Latest Linux kernel update package
WSL Integration enabled in Docker Desktop
Docker Desktop for Windows. This gives an overview of the installation steps.
https://docs.docker.com/desktop/windows/wsl/
WSL2 feature enabled in Windows
https://docs.microsoft.com/en-us/windows/wsl/install
Latest Linux kernel update package
https://docs.microsoft.com/en-gb/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package
WSL Dependencies
The Core packages here are required in your chosen WSL distro (Ubuntu by default).
Core:
Linux
Docker
jq (Linux JSON parser) Version 1.6+
zip/unzip
cpio
OpenSSL
Optional:
base64
Docker Compose
Docker Basics
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.htm
Your host should have access to the internet to pull Docker images, or access should be configured to allow Docker through a proxy.
Installation
Double clicking on the Win-QPacker.exe will start the installation.
Choose the WSL distro into which you want to install qpacker and click Install.
The install with and start and report when Installed, you can then exit the installation.
Usage
Run Win QPacker from the start menu or right click context menu. Behavior will be the same as the standard qpacker. Git and environment variable setup can be shared between the windows host and WSL as detailed below.
Git configuration in WSL
If you have existing credentials in your Windows installation you can use these from within WSL to simplify your setup. Run the command below in bash to set this up:
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-manager.exe"
Environment variables in WSL
QPacker behavior can be customized by setting environment variables. These can be setup in the Windows shells (cmd or Powershell) or in the WSL environment (e.g. bash)
e.g. in a WSL bash shell we enable debugging via
export QPDEBUG=1
in Win QPacker Powerhsell this is
$env:QPDEBUG=1
Running
A QPacker shell will be installed and available from the start menu.
and also from the right click context menu.
There is an option to run qpacker in either Powershell or a WSL shell. Note, the qp commands will only be available from here and not from a standard CMD or Powershell shell.
Once in the shell, qp will behave just like qp on Linux. The only difference is that qp doctor in Powershell will perform windows specific checks. Refer to the qpacker documentation for details.
Licenses
QPacker will generate an on-demand license the first time it runs a build step that requires one.
For this, configure your global Git user.name
and user.email
c.f. Git configuration in WSL above.
git config --global user.name "FIRST_NAME LAST_NAME"
git config --global user.email "MY_NAME@example.com"
QPacker passes these details to the license-generation script and you receive an email with an activation link: click it.
Copy the license provided as part of the EAP to your ~/.qp.licenses
folder. QPacker will look there to determine which license should be used.
Alternatively if you already have a license you wish to use it can be passed to QPacker via an environment variable containing a base64 encoding of the license file, e.g.
export KDB_LICENSE_B64=$(base64 -w0 kc.lic)
or for k4.lic style licenses
export KDB_K4LICENSE_B64=$(base64 -w0 k4.lic)
\Removal
Win QPacker can be removed by double clicking the same executable used for the installation or from the Add\Remove dialog in the Control Panel.