Message Image  

App Connect

App Connect Enterprise simple CI/CD deployment using Jenkins, Git, Nexus 

Tue July 28, 2020 09:35 AM


This article will provide guidance to teams who are looking to building a simple CI-CD for IBM App Connect Enterprise (ACE) bar file deployment onto On-Prem Integration Server.

The Scenario,
1) Developer commits the ACE project into the github repository.
2) Jenkins Build job pulls ACE projects from Github repository.
3) Jenkins Build job then creates bar files and uploads them into Nexus Artifactory
4) Tags the github project with the Jenkins build number.
5) Jenkins deploy jobs downloads bar files from Nexus, and deploys to ACE Integration Servers.


1) Github as source code repository.
2) Jenkins for build & deployment.
3) Nexus to store bar files.
4) Xvfb – required to run mqsicreatebar command

For this receipe I installed Jenkins, Nexus, Xvfb, and IBM AppConnect Enterprise on Redhat linux.


Jenkins Install

Jenkins install instructions,

Nexus Install

Nexus will be used as a repository to store ACE Bar files:

$ sudo mkdir /app && cd /app
$ sudo wget -O nexus.tar.gz

$ sudo tar -xvf nexus.tar.gz
$ sudo mv nexus-3* nexus
$ sudo adduser nexus
$ sudo chown -R nexus:nexus /app/nexus
$ sudo chown -R nexus:nexus /app/sonatype-work
$ sudo vi /app/nexus/bin/nexus.rc

Running nexus as a service:
sudo vi /etc/systemd/system/nexus.service
Add below lines:
[Unit] Description=nexus service

[Service] Type=forking
ExecStart=/app/nexus/bin/nexus start
ExecStop=/app/nexus/bin/nexus stop
Restart=on-abort [Install]
$ sudo ln -s /app/nexus/bin/nexus /etc/init.d/nexus
$ sudo chkconfig –add nexus
$ sudo chkconfig nexus on

$ sudo systemctl start nexus
sudo service nexus start
$ sudo service nexus status
$ tail -f /app/sonatype-work/nexus3/log/nexus.log (check nexus.log to make sure the service started successfully)

Open Nexus URL,
Create new repository, i created “raw (hosted)” repository, but you can use different one like Maven.
Settings > Repositories > Create Repository > raw (hosted > “generic”

The Bar files will be pushed to Nexus “repository/generic” repo.

Xvfb Install

$ sudo yum install Xvfb
Start Xvfb:
$ export DISPLAY=
/usr/bin/Xvfb :1 -screen 0 1024x768x24 &

Auto starting Xvfb during system reboot
vi /etc/rc.local
Xvfb :0 -screen 0 1024x768x24&

Jenkins Configuration

SSH to GitHub setup
On the Jenkins server,
generate ssh keypair, load the private key into Jenkins and public key to

$ sudo su -s /bin/bash jenkins
$ cd /var/lib/Jenkins
$ ssh-keygen
This generates id_rsa, and files under /var/lib/jenkins/.ssh folder.
$ cat .ssh/

1) – Add the public key,
Settings > SSH and GPG keys > New SSH Key > “jenkins-dpydalmq101” > paste contents.

2) Jenkins Url – Add the private key
> Credentials > System > Global Credentials (unrestricted) > Add Credentials > SSH Username with private key >
ID: jenkins-github
Description: Private key to connect from Jenkinks to
Username: jenkins
Private Key: < paste the private key (id_rsa) content generated above.

Jenkins > Global Tool Configuration

Manage Jenkins > Global Tool Configuration > Xvfb
Note: Make sure to install Xvfb plugin before configuring.

Jenkins – Build Job

1) Logon to Jenkins Url
2) Create Free Style job “New Item > Free style project”
3) Source Code Management > provide ACE Project Git Repository.

4) BUILD Section > Add build step > Execute Shell.

echo “Creating bar file”


echo “Creating bar file”
$ACE_HOME/tools/mqsicreatebar -data $WORKSPACE -b barfiles/${APP_NAME}.bar -cleanBuild -a ${APP_NAME} -deployAsSource -trace -v createbartrace.txt

echo “Setup mqsi command environment – mqsiprofile”
. $ACE_HOME/server/bin/mqsiprofile

# Override bar files.
mqsiapplybaroverride -b barfiles/${APP_NAME}.bar -p SB_REST2MQ_API_SIMPLE/properties/ -o barfiles/${APP_NAME}_DEV_${BUILD_NUMBER}.bar -r
mqsiapplybaroverride -b barfiles/${APP_NAME}.bar -p SB_REST2MQ_API_SIMPLE/properties/ -o barfiles/${APP_NAME}_QA_${BUILD_NUMBER}.bar -r

# Nexus Artifactory Upload
zip barfiles/${APP_NAME}_${BUILD_NUMBER}.zip barfiles/${APP_NAME}_DEV_${BUILD_NUMBER}.bar barfiles/${APP_NAME}_QA_${BUILD_NUMBER}.bar

# Upload using curl
curl -u admin:password –upload-file barfiles/${APP_NAME}_${BUILD_NUMBER}.zip \

# Git – tag the version
git tag -a ${BUILD_NUMBER} -m ‘Tagged by Jenkins build’
git push –tags

echo “… END …”

Post Build Step
Add a post build step to invoke deploy to Development jenkins job.

Save Jenkins Build Job.

Build Now

Check “console output”, make sure the build job ran successfully.

When successful, you should see the zip containing bar files should be uploaded to Nexus repository as below.

Check github repo, and make sure the project is versioned with the build number.

Deploying bar file to Development

Jenkins > Credentials >
Create a secret text ID for ACE webadmin id/password. Create the webadmin ID using mqsiwebuseradmin command.
$ mqsiwebuseradmin

ACE admin security configuration with queue-based authorization and LDAP authentication step-by-step

Create ACE WebAdmin “jenkins” secret text ID in Jenkins > Credentials.

Jenkins > New Item > Free Style Job > SB_RESTAPI_SIMPLE_DEPLOY_DEV

Build > Execute Shell

# Artifact download
curl -X GET -u admin:password “http://localhost:8081/repository/generic/com/ibm/esb/${APP_NAME}/${PARENT_BUILD_NUMBER}/${APP_NAME}.zip” -o ${APP_NAME}.zip

unzip -o ${APP_NAME}.zip
echo “DEPLOY bar file”

INTEGRATION_SERVER=SAMPLE (Create the Integration Server prior to running the job).

waidpass=`echo -n jenkins:$ACEWEB_ID_JENKINS_PASS | base64`

curl -k -X POST $ACE_WEBADMIN_URL/apiv2/servers/$INTEGRATION_SERVER/deploy \
–data-binary @barfiles/${APP_NAME}_DEV_${PARENT_BUILD_NUMBER}.bar \
-H “Content-Type: application/octet-stream” \
-H “Authorization: Basic $waidpass”

curl -X POST

echo “… END …”

Save, “Build Now” – check “console output”.

Similarly create Jenkins jobs for QA, and PROD and deploy, and files.

Project Interchange