Deploying in Docker Containers / Kubernetes

Deploying in Docker Containers / Kubernetes

Overview

The best way to deploy in Docker or Kubernetes is to use the official Profound.js Docker image as the base for a custom image. For details, see https://hub.docker.com/r/profoundlogic/profoundjs.

Floating licenses suit containers well, because a seat is claimed when the container starts and released when it stops, rather than being locked to a particular machine.

Docker

The floating license authorization code and user data are set with environment variables when starting the container:

docker run --name pjs -d -p 8081:8081 \ --env PJS_FLOATING_AUTHORIZATION=plls_api_xxx \ --env PJS_FLOATING_USER_DATA=my_user_data \ my_custom_image

Kubernetes

To deploy in Kubernetes, the envFrom field of a Pod specification can be used to set the necessary environment variables from a Kubernetes ConfigMap or Secret. See the Kubernetes documentation for information on setting environment variables in containers.

Seat Activation and Deactivation Behavior

The container attempts to request a seat when it starts up, and deactivates the seat automatically when the container is stopped using normal methods – such as docker stop – or if the container is restarted by Docker or Kubernetes because the process crashed.

Floating seat deactivation will not work automatically if the container is force killed – for example with docker kill or kubectl delete pod --force. In that case the seat is reclaimed only after the heartbeat expires, or by deactivating it manually (see Listing and Manually Deactivating Seats).

Before deploying in a production environment, test first to confirm that your containers can communicate properly with the licensing server for seat activation and deactivation (see Communication with Profound Logic Licensing Server).