In this article we will demonstrate how to;
Note: It is assumed that the user already has the ICP 18.104.22.168 (or higher) cluster configured in their environment.
Create a Docker image for ACE, IIB
Here, we illustrate the steps for an ACE image, but a similar procedure would apply to IIB as well.
- Download the Docker package (zip file) for ACE from Github.
- After unpacking the zip file, you will find the Dockerfile in the directory structure as follows:
- Suppose you want to customize this Docker image by including certain bar files and have them deployed when the Docker container is started. So, copy the bar files in the above directory and edit the Dockerfile as shown in the example below by adding the COPY command to copy the bars to a temporary location and define the mqsibar command to deploy the bars to the Integration Server work directory.
- Now, build the Docker image.
- Upon successful building of the Docker image, you should see the message:
- You can verify the newly created Docker image by running it locally.
- Access your Integration Server using the Admin Console. To get the port mapping information, run following command:
We see that the admin port 7600 is mapped to 32769. So now we can access the ACE Admin Console using
You should see the Integration Server and deployed Application as shown below:
- In order to be able to push this docker image to IBM Cloud Private (ICP), tag your image with ICP cluster information.
- Push the image to the ICP repository
- Navigate to the ICP admin console and find the Docker image at ICP -> Catalog -> Images
Creating the Helm chart
- Download the base code of the Helm package for ACE from Github
- Unpack the downloaded zip file (ace-helm-master.zip) and navigate to subdirectory to get the Chart.yaml file.
- Edit the Chart.yaml file to give a unique name to the Helm chart that you want to create. For example,
- Edit the values.yaml to provide the name of the Docker image that you just pushed to the local ICP repository in step (9) in the section above. For example:
- To verify that the Helm chart directory name/structures are correct, run the lint command as shown below. Please make sure that the name of the top level directory where the Helm package files are stored, matches with the name of the chart specified in the Chart.yaml file.
- Now package the Helm chart.
- Load the Helm chart in the ICP catalog.
- In the ICP admin console, under the Catalog menu filter by ‘local-charts’. You should be able to see the chart that we have just published.
Creating ACE deployment using Helm charts
- In the ICP catalog, find the Helm package that you published as shown in the section above.
- Click the ‘Configure’ button and fill in the details. The Image repository and the image tag will be pre-filled as it comes from the values.yaml that we had updated in the section above.
- Click Install. The deployment process begins.
- Navigate to Workloads -> Helm releases. From the list, click on the Helm release that you just deployed in the step above. You would be able to see the Services, Deployment and PoD details.
- Click on Service name and it will provide further information like the WebUI and Integration Server Listener.
- The console log of your PoD can be viewed by navigating to the Deployments -> PoD -> Logs section. In the image below, we can see that the Integration Server has been started successfully.
Configuring Auto Scaling policy for Deployment
When the load on your integration server increases due to an increased volume of messages, one of the impacts you would observe is the CPU utilization and the throughput rate. In such cases you may want to scale up your integration flows horizontally to cater for the additional load so that the CPU utilization is within limits and eventually improving the message throughput rate. Also, when the peak load time is over and the message volumes are less, you would want to scale down the number of integration servers to save on CPU and memory resources. So, in a nutshell, the auto-scaling policy is required to scale-up or scale-down the number of integration servers based on certain parameters. Currently, the ICP platform provides auto-scaling based on the %CPU utilization for a given deployment.
- To define a scaling policy, go to Configuration -> Scaling Policies in the ICP admin console menu.
- Click ‘Create Policy’. It will open up a dialog box. Enter the details as shown below.
- Provide a Name to your policy.
- Select the Namespace that you want this to be applied to.
- Under Scale target, provide the name of the Deployment to which you want to apply this policy. You can find the exact name of your Deployment by navigating through Workloads –> Deployments list from the left hand panel in the ICP admin console.
- Set a value for Minimum replications which is the no. of copies of your PoD that you want to be running.
- Set a value for Maximum replications which is the no. of copies of your PoD that you want to scale to when the CPU utilization exceeds the threshold.
- Define the value for Target CPU which is the threshold value of % CPU Utilisation value of a Deployment above which you want the auto scaling policy to get triggered to spawn additional PoDs up to Maximum defined ones.
It would show when the replicas have scaled up and scaled down. In our example as shown below, we ran a load test for our integration flow. The Replicas scaled up from 1 to 3 when CPU utilization increased beyond the defined threshold of 10% and it scaled down to an initial value of 1 after the load test was over.
The scaling policy can be dynamically changed by clicking under Action and then select either Edit to update the policy to set a different CPU threshold or number of replicas or select Remove to delete/detach the policy from the Deployment.