Here we are going to discuss on how to build a TIBCO BUsinessWorks container edition base image and a BW application using this image. Below are the things we will cover in this post
- Build BWCE Base image
- Create a simple BW application
- Deploy the application in a container
How to build a BWCE base image?
To build the base image, first, you need to download TIBCO BusinessWorks Container Edition runtime (bwce-runtime-<version>.zip). This package is included in Tibco Container Edition which can be download from TIBCO edelivery portal . After installing the contained edition, go to your BWCE_HOME/<version>/docker directory. you can use this location itself to build the base image or you can copy the entire folder (docker) to any location which you prefer.
Now copy bwce-runtime-<version>.zip to BWCE_HOME/<version>/docker/resources/bwce-runtime folder. No need to unzip the file. once this done open your command-line tool and go to BWCE_HOME/<version>/docker directory and run the docker build command as below.
F:\Cloud\docker>docker build -t tibco/bwce:latest .
If all config and setting are good, you will get an output like below.
F:\Cloud\docker>docker images
So the base image build was successful and now we can use it to build any TIBCO BW application image and run in containers.
How to build a BWCE application from the base image?
Here I am using a very simple BW process which has a timer and log activity.
Export the ear file for this in any directory you prefer. Then create file with name Dockerfile and add the below line to it. Make sure there is no extension in the file name.
FROM tibco/bwce:latest ADD sampleProject_1.0.0.ear /
As you can see, we are using the previously built base image and adding the ear file to the same. One this file is created, got to the directory in command-line tool and run the docker build command.
F:\Study\Cloud\sampleProject>docker build -t bwce/simpleapp:1.0.0 .
We are all set to run this application. You can use the docker run command as below.
F:\Study\Cloud\sampleProject>docker run bwce/simpleapp:1.0.0
to see the container details, run the below command
F:\Study\Cloud\sampleProject>docker ps
Hope this helped you to understand how to build a base image and a BW application. This is a very basic one which doesn’t use EMS or DB. To add these functionalities we need to extend the base image with the necessary plugins. We will discuss that in another post.