Third-Party Libraries¶
QIE can leverage 3rd party libraries to enable functionality that is not natively supported by the engine. On a normal non-container installation these libraries are stored in the QIE home directory in a folder called 'lib'. Once the jar files have been placed in this folder they can be activated in the "System Config" page of QIE.
Because each container is stateless the process for adding 3rd party libraries is different. By default, when the QIE_CONTAINERMODE variable is set to true, you do not activate 3rd party libraries in the "System Config" page. Instead QIE automatically activates all 3rd party libraries found in the 'lib' folder.
Options For Loading 3rd Party Libraries¶
Since the official containers do not contain the 3rd party libraries by default, there are three general options that can be used to get the 3rd party libraries onto your running containers.
Mount Folder¶
The first and preferred method of loading 3rd party libraries is to create a folder on the host system (or in the case of a cloud environment the cloud system) and place all the desired libraries into this folder.
Mount the system folder to the /java/qie/lib directory on the container. The mounting process differs for each environment (local Kubernetes vs. AWS vs. Azure etc.). Follow the steps for mounting a folder provided by the docker manager you are using.
Pros:¶
-
Is the most common way to add files to a docker container.
-
All docker environments have documentation for how to mount files to the container.
Cons:¶
- Some environments can be complicated to configure and require a technical understanding of how to do it.
Create New Image¶
The second method for loading 3rd party libraries is to create a new docker image based on the official QIE image. In the image DockerFile use the official QIE image and then copy the additional files to the /java/qie/lib folder of the new image.
Pros:¶
- For many who are familiar with Docker, this is a very simple and easy task.
Cons:¶
-
The new image must be hosted in your own container repository. Usually this means creating a DockerHub account or setting up your own container registry.
-
Before upgrading to a new release of QIE, a new custom image must be created and uploaded to the container repository.
Using InitContainers (Kubernetes Only)¶
The last option is to use an Init Container to pull the libraries from a hosted website and place them on a local volume that is shared by both the init container and the QIE container. It is mounted to the /java/qie/lib folder on the QIE container and mounted to the /lib folder on the init container. When the pod is started, Kubernetes executes the init container first allowing it to download the desired libraries to the /lib folder. Once it is done, then Kubernetes starts the QIE container.
All the 3rd party libraries must still be placed on a web server that the init container can call and download the files from.
Pros:¶
- Can be done if all you have is a web server available to you and you do not have the technical knowledge to mount a folder or create your own image.
Cons:¶
-
Files must be stored on a web server.
-
Starting the pod takes longer because every time a new pod is generated, the init container must download the libraries to the shared mounted volume.