DevOps Automation

 View Only

Bringing DevOps to IBM App Connect Enterprise (ACE) and API Connect (APIC) using UrbanCode Deploy

By Randall Langehennig posted Thu March 30, 2023 09:39 AM

  

Bringing DevOps to IBM App Connect Enterprise (ACE) and API Connect (APIC) using UrbanCode Deploy

Authors: Randy Langehennig and Joel Gomez

Date: March 31, 2023, v1.5

Overview

IBM has been a leader in the integration space for many years.   IBM provides solutions like IBM App Connect Enterprise (ACE) that routes, transforms, and enriches messages from one location to any other location.   The product supports a wide range of protocols like IBM MQ, JMS 1.1 and 2.0, HTTP and HTTPS, web services (SOAP and REST), File, Enterprise Information Systems (including SAP and Siebel), and TCP/IP.  

IBM also provides solutions like IBM API Connect (APIC) which is a management solution for the entire API lifecycle.   The APIC solution helps our clients create, manage, secure, socialize and monetize APIs while also helping to power digital transformation on premises and across clouds.    The solution leverages a powerful, enterprise-grade API gateway to manage cybersecurity risks and help protect your data across a multi-cloud environment.

In this blog, we will explore a scenario showing how IBM UrbanCode Deploy (now IBM DevOps Deploy) can help you meet the challenge of deploying software throughout the enterprise by providing capabilities that improve both deployment speed and reliability.  

A Deeper Dive with App Connect Enterprise (ACE)

To take a little deeper dive, we will review the use of App Connect Enterprise (ACE) to create the backend logic of our API.   Many developers in this space leverage an IDE toolkit to develop and build their BAR files.  

Since we are looking to adopt DevOps best practices, our developer is committing the source code to a git repository and will leverage a Jenkins pipeline to build a BAR file from the source code.  Here is our Jenkins pipeline that is called ‘ace-ivt-backend-pipeline’:

The ‘ace-ivt-backend-pipeline’ shown above will build our Broker Archive file and then push the immutable artifact for deployment to IBM UrbanCode Deploy:

The build step of this process will run on a build target that has the “IBM App Connect Enterprise for Developerstoolkit downloaded to my Linux host.   You can download this from: https://www.ibm.com/docs/en/app-connect/12.0?topic=enterprise-download-ace-developer-edition-get-started

In this example, I have ACE 12.0.7.0 downloaded to a Linux host.   The build will run the following commands to perform the build in a headless mode: 

        source '/downloads/ace-developer/ace-12.0.7.0/server/bin/mqsiprofile'

        ibmint package --input-path . --output-bar jgr-cp4i-aceivt.bar

The output of the build step will look like this:

After the build completes, the pipeline will run unit tests against the API using the built-in AppConnect capabilities and the deployable artifact is pushed to IBM UrbanCode Deploy using the build tag as the version label for a new component version as shown below:

If you view the contents of 3.0.38 in UCD, you will find the BAR file and a link back to the Jenkins pipeline:

In IBM UrbanCode Deploy (UCD), we have created a component process to deploy our BAR using a UCD ACE plugin as shown below:

This process can be made abstract using properties and can become a template in UCD that allows for reusability and quick on-boarding of new components.   Here is the Deploy step that leverages properties:

As you deploy the BAR file using IBM UrbanCode Deploy, you will be able to track what versions have been deployed to each target environment in your software development lifecycle.   Here is an example of how UCD tracks inventory so you can see what is currently deployed in each environment, when did it get deployed there, what was deployed prior, and much more:

We will review an example deployment after we cover the API Connect aspect of this solution.

A Deeper Dive into API Connect (APIC)

Now that the backend of the API has been deployed, we can now publish our API to API Connect which manages access to the APIs we develop.  

When a developer, Sharon, checks in their changes, the deploy can be initiated automatically to a DEV catalog automatically using UrbanCode Deploy.   As shown above, a publish/deployment will go to the API Manager and the API Gateway.  

In order to perform the publish of an API, our target UrbanCode Deploy (UCD) Agent must have the APIC toolkit installed which will be used to perform the publish.   You can leverage any system that can connect to your APIC environment.  

To download the APIC toolkit, you will go to the API Manager and you will find a ‘Download toolkit’ button as shown below:

A window will be displayed with the download instructions for each platform:

I downloaded the ‘CLI only’ for a Linux platform, downloaded the toolkit credentials, and ran the commands as directed in the instructions.

API Connect Terminology

In API Connect, a Product provides a method by which you can group APIs into a package that is intended for a particular use.  Additionally, a product will contain Plans, which can be used to differentiate between different offerings. 

In API Connect, a product will be deployed to a Catalog.   A catalog target typically corresponds to a DEV, QA, or PRODUCTION stage of your software development lifecycle.   For example, you may be developing new APIs for developers that you deploy products to a Test catalog and then your APIs that are ready for PRODUCTION usage are deployed to a Production catalog.   Here is an example of a Test catalog with Products published to it:

As a developer, you can check in YAML files that describe your product which includes details around the API and the plans.   Here is an example of a product YAML:

You can configure a Jenkins pipeline to package up your product and api definitions in YAML format and integrate this with IBM UrbanCode Deploy (UCD) for automated deployment in a similar way you did for your ACE BAR file.  

Where the BAR file is the back-end logic of the API, the product that we publish to API Connect can be considered the front-end of the API.    IBM UrbanCode Deploy can orchestrate the deployment of both the back end and front-end logic for a consistent and repeatable deployment of your APIs.

Let’s review in UrbanCode Deploy how we will publish an API Product definition to a catalog.   Here is a view of an example process:

Notice that we are leveraging the API Connect plugin in UrbanCode Deploy and using the ‘Login’ and ‘Publish API Product Definitions’ steps to complete this work.

Let’s take a look at the Publish API Product Definitions step:

In UrbanCode Deploy, you can leverage properties that could be set at the Environment level (for example, the Catalog name can be different for each target environment), the component level, and the resource level.   Here is an example of properties set for this environment:

The use of properties allow you to make the deployment process abstract and reusable.  UrbanCode Deploy has some build in variables you can leverage as well such as ${p:environment.name}.   This property could be used to correspond to the catalog name. 

The step uses the YAML file that describes the API Product Definition which is downloaded to our target UCD Agent using the Download Artifacts step.  

A Deployment of the Backend and Frontend for an API

Now that we have reviewed both an ACE and API Connect deployment, let’s review an application process in UrbanCode Deploy.   An application process is a higher-level process that coordinates the deployment of multiple components in the correct sequence.   For our example deployment, we have setup an application process that will first deploy the backend logic of our API to ACE and then after this, update the frontend of the API with API Connect.    Here is what our application process looks like:

For this demo, I commit some code related to my ACE broker archive backend logic.   A Jenkins pipeline will execute which will build my new broker archive (BAR) and make UrbanCode Deploy aware of the new version.   

When this back-end API logic build completes, I have another pipeline that will trigger to build the front-end of the API as well.   This pipeline is setup to integrate with UrbanCode Deploy and create an UrbanCode Deploy Snapshot and it can automatically trigger the deployment to the DEV environment:

In UrbanCode Deploy, you can trigger the deployment into our DEV environment and view the deployment progress as shown below:

Following the deployment of the back-end logic to App Connect Enterprise, we can run automated tests to ensure that the API is working as expected using IBM Rational Testing capabilities.   Notice above that we are running an API test using Rational Integration Tester.    Here is the output log for the test that was executed:

IBM UrbanCode Deploy has plugins to support Rational Integration Tester, Rational Performance Tester, Rational Test Automation Server, and more that you can leverage to validate the back-end and front-end of the API are working as expected.   When the deployment completes, UrbanCode Deploy will update the inventory for the DEV environment to reflect the component versions we just deployed:

We can also validate the API is working as expected with some smoke tests or automated API tests using IBM Rational Testing solutions.   These tests could be triggered by UrbanCode Deploy plugin steps automatically as part of the process.   When a test passes, we can automatically add a status to the component version so that gate requirements are met which will allow you to deploy to the next environment (e.g. QA):

Here are the gates that are configured for our application to ensure good quality code progresses through the software development lifecycle:

Notifications

With UrbanCode Deploy, you can configure email notifications as well as Slack or Teams messages beginning with the 7.3 release of UrbanCode Deploy.  

In this example, I configure a webhook to send slack messages on start, pass, or fail of a deployment process.   The slack messages are sent to a channel that I had configured for our team’s awareness (without having to notify a larger audience across the organizations):

Summary

Integration is essential for our clients to connect applications and systems to unlock critical data quickly and securely.   App Connect Enterprise (ACE) and API Connect are two integration products that bring tremendous value to our clients.   In this blog, we have explored the use of IBM UrbanCode Deploy, which is a leader in the deployment space, to help standardize the process of deploying APIs to each environment in your development cycle.   The out-of-box plugins provided help you to quickly model deployments to support IBM’s integration space including excellent products like App Connect Enterprise, MQ, DataPower, and API Connect to name a few.   

I would like to take a moment to thank @Joel Gomez in helping me author this blog and for helping to provide a real working environment from which the content was built and tested in the IBM Cloud.   Please reach out to Joel if you have any follow-up questions as he has deep technical skills when it comes to our Integration portfolio.

I would also like to give a word of thanks to @Daniel Cappon for his assistance in setting up real API tests to verify the APIs exposed by the back-end logic of the BAR file as well as the API exposed securly through API Connect.   This demonstration environment leverages Rational Integration Tester and Rational Test Automation Server to verify the API is working properly as we progress through our software development lifecycle.

Finally, if you have any questions around IBM UrbanCode Deploy, please do not hesitate to reach out to IBM to learn more.  
IBM UrbanCode Deploy is a proven solution that can help to improve both deployment speed and reliability while providing an excellent trail of audit, team-based security, and governance features including the use of gates as we reviewed in this blog post.  Whether you are deploying software to the mainframe, to integration products, Liberty, or Kubernetes clusters, UrbanCode Deploy provides a single centralized solution to meet the deployment needs of our clients.


#UrbanCodeDeploy
#APIConnect
#AppConnectEnterprise(ACE)
#automation-featured-area-1
#automation-highlights
#automation-highlights-home

0 comments
1749 views

Permalink