Deploying IBM App Connect with a single command

Introduction

In my last blog, I described how to deploy IBM API Connect using the command line. I showed the sequence of commands, then provided a script that does it all.

API Connect is just one of the components of the Cloud Pak for Integration. Besides, this Cloud Pak provides the following capabilities:

  • App Connect
  • MQ
  • Event Streams
  • DataPower Gateway
  • Aspera

In this blog, I will describe the steps required to deploy the App Connect Dashboard using the command line.

Step-by-Step instructions

First, let’s define some environment variables that will help us in the process:

export SCC=ibm-anyuid-hostpath-scc
export PROJECT=ace
export NAME=<app-connect-dashboard-name>
export IMAGE_SECRET=prod-secret

Switch to the AppConnect project

First, let’s configure the OpenShift context to the AppConnect project:

oc project $PROJECT

Associated the Security Context Constraint with the Service Account

First, we need to associate the Security Contact Constraint to the project Service Accounts:

oc adm policy add-scc-to-group $SCC system:serviceaccounts:$PROJECT

Download the Pak Entitlement script

As we are using the IBM Container Registry to pull the container images, we need to set the image pull secret.

Assuming you have a valid entitlement key, we need to fetch the key first.

The good news is that there is a github repository with a script that shows the key.

So, run the following commands to download the script and add to your path:

curl https://raw.github.ibm.com/CloudPakOpenContent/cloudpak-entitlement/master/pak-entitlement.sh?token=AAAslythPohyzFwjlgwEmZFFna3_T2K4ks5d3-uwwA%3D%3D > pak-entitlement.sh
chmod a+x ./pak-entitlement.sh
sudo mv ./pak-entitlement.sh /usr/local/bin

Obtain the Entitlement Key

Now run the following script to set the entitlement key:

ENTITLEMENT_KEY=$(pak-entitlement.sh show-key Integration)
echo Key: $ENTITLEMENT_KEY

Define the image secret

Next, we need to wrap the entitlement key in a docker registry secret:

oc delete secret $IMAGE_SECRET
oc create secret docker-registry $IMAGE_SECRET \
--docker-server=cp.icr.io --docker-username=ekey \
--docker-password=$ENTITLEMENT_KEY

Find the ICP Proxy route

Okay, we are almost there. Next step is to discover the ICP Proxy route:

ROUTE=$(oc get route icp-proxy -n kube-system \
-o jsonpath='{@.status.ingress[0].host}')
echo Route: $ROUTE

Deploy the Helm chart

We are now ready to deploy the AppConnect chart, using these variables we set so far:

helm install https://github.com/IBM/charts/blob/master/repo/entitled/ibm-ace-dashboard-icp4i-prod-2.2.0.tgz?raw=true \
--name $NAME --tls --set image.pullSecret=$IMAGE_SECRET \
--set persistence.storageClassName=ibmc-file-bronze --set ssoEnabled=false \
--set tls.hostname=$ROUTE

That’s it!

It took us some bending to define the variables required to deploy this chart, but we could do it!

Single command install

Now that we went through all the steps required to deploy the scripts, let’s use a script that incorporated all these steps:

git clone https://github.com/patrocinio/cloud-paks-resilience.git
cd cloud-paks-resilience/Integration

Then, run the following script:

./deploy_appc.sh <app-connect-dashboard-name>

Pretty simple.

Photo by Edu Lauton on Unsplash

Conclusion

In this blog, I showed how to deploy App Connect using a sequence of commands, then I introduced a script that does all the steps.

Give it a try and let me know the result.

Bring your plan to the IBM Garage.
Are you ready to learn more about working with the IBM Garage? We’re here to help. Contact us today to schedule time to speak with a Garage expert about your next big idea. Learn about our IBM Garage Method, the design, development and startup communities we work in, and the deep expertise and capabilities we bring to the table.

Schedule a no-charge visit with the IBM Garage.

--

--

Principal Solutions Architect, Strategic Accounts, AWS

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store