Skip to main content
Skip table of contents

Creating and Running a Custom Docker Image

Installing Fiorano platform and making changes in the installer

  1. Click the link below, download the latest Fiorano Installer and install the same:
    https://www.fiorano.com/resources/product_downloads
  2. Use ConfigDeployer from $FioranoHome/esb/tools to set up AGS server1 profile by modifying Cassandra DataStore URL, FESPrimary URL, FESSecondary URL with the customized IP (IP refers to the Cluster IP in Kubernetes which redirects requests to the pods in a deployment) 10.96.0.20 and the ports 9042, 2147 and 2148 respectively.
  3. The postgres driver must be added to the $FioranoHome/esb/server/bin/server.conf as "/postgresql-9.1-902.jdbc4.jar" in the Fiorano Sources for postgres to connect.
  4. Extract the stripInstaller.tar.gz and run the script in the format as mentioned in the Readme file to reduce the size of the installer.
  5. Place a copy of the installer in the folder ams_build and ags_build to create separate AGS and AMS images.
  6. Refer to the Creating Docker Image from the Fiorano setup section below and make changes in the Dockerfile as necessary.

Creating a Docker Image from the Fiorano Setup

Configure the Cluster IP of AMS to the AGS configuration correctly before creating the image; for steps, click here.

Create a folder with the following structure and place Dockerfile

  • Working directory
    • Fiorano
      • 12.1.0
    • Dockerfile
    • Postgres Driver

Contents of DockerFile

For creating ESB servers

CODE
FROM store/oracle/serverjre:1.8.0_241-b07
WORKDIR /
ADD Fiorano Fiorano
EXPOSE 8080 1980 1847 2047 1947 1880 1867 2067
CMD ./Fiorano/12.1.0/esb/server/bin/server.sh -mode fes -profile esb -nobackground

To create Docker image of AMS servers

CODE
FROM store/oracle/serverjre:1.8.0_241-b07
WORKDIR /
ADD Fiorano Fiorano
ADD postgresql-9.1-902.jdbc4.jar postgresql-9.1-902.jdbc4.jar
EXPOSE 8080 1980 1847 2047 1947 1880 1867 2067 9042 7000 7001 7199 5432 1981
CMD Fiorano/12.1.0/esb/server/bin/server.sh -mode ams -profile server1 -nobackground

To create Docker image of AGS servers

CODE
FROM store/oracle/serverjre:1.8.0_241-b07
WORKDIR /
ADD Fiorano Fiorano
ADD postgresql-9.1-902.jdbc4.jar postgresql-9.1-902.jdbc4.jar
EXPOSE 8080 1980 1847 2047 1947 1880 1867 2067 9042 7000 7001 7199 5432 1981
CMD Fiorano/12.1.0/esb/server/bin/server.sh -mode ags -profile server1 -serverName `echo $SERV_NAME | tr - _` -serverGroupName serverGroup1 -nobackground
  • The variable $SERV_NAME is passed as an environment variable from Kubernetes at the time of deployment for starting gateway servers. Hence use the same variable name from deployment.
  • All the servers must be run in foreground mode or may result in containers crashing.
  • Pulling an oracle JRE in the Docker file might request login which requires to create a user account in the Docker hub, otherwise, substitute java:8 in place of store/oracle/serverjre:1.8.0_241-b07 in Dockerfile.
  • Ensure that while running CMD command the path is the same as the folder structure.

Create the Docker image from the setup 

Open the terminal to the folder with Dockerfile and execute the command:

CODE
docker build -t <Image_name>

Example

CODE
$ docker build -t fiorano_ags 


Save the Docker image to a tar file

CODE
docker save <Image_name_from_docker_build> > <Name_of_tarfile>.tar

Example

CODE
$ docker save fiorano_ags > fioranoAGSv12_1.tar

Likewise, Docker images can be built and saved for Fiorano AGS, AMS, and ESB servers as per requirement.

References and Side Note for Docker

PurposeCommand

To pull Cassandra and postgres images

Images can be saved as mentioned in the section above.

docker pull cassandra
To remove all stopped containers, all dangling images, and all unused networks
docker system prune
To lists all containers
docker ps -a 
To list all Docker imagesdocker images 
To remove all dangling imagesdocker image prune
To remove all imagesdocker image prune -a


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.