As customers and partners are making the transition of their applications from monoliths to microservices using Platform as a Service (PaaS) providers such as RedHat OpenShift v3, AppDynamics has made a significant investment in providing first-class integrations with such providers.
OpenShift v3 has been significantly re-architected from its predecessor OpenShift v2 where cartridges have been replaced with docker images and gears with docker containers. The complete set of differences can be found here.
AppDynamics integrates its agents with RedHat OpenShift v3 using the Source-to-Image (S2I) methodology. S2I is a tool for building reproducible Docker images. It produces ready-to-run images by injecting application source into a Docker image and assembling a new Docker image. The new image incorporates the base image (the builder) and built source and is ready to use with the docker run command. S2I supports incremental builds, which re-use previously downloaded dependencies, previously built artifacts, etc.
Workflow
The overall workflow for using the AppDynamics with RedHat OpenShift v3 s shown below:
Step 1: is already provided for by RedHat.
To perform Steps 2 and 3, we have provided the S2I scripts in the following GitHub repository and instructions on how to build enhanced builder images for JBoss Wildfly and EAP servers.
https://github.com/Appdynamics/sti-wildfly
Let’s explore this with an actual example and use the sample https://github.com/jim-minter/ose3-ticket-monster
application.
Prerequisites:
– Ensure OC is installed (https://docs.openshift.com/enterprise/3.0/cli_reference/get_started_cli.html#installing-the-cli)
– Ensure sti is installed (https://github.com/openshift/source-to-image)
– Ensure you have a dockerhub account (https://hub.docker.com/)
Step 2: Create an AppDynamics builder image
$ git clone https://github.com/Appdynamics/sti-wildfly.git
$ cd sti-wildfly
$ make build VERSION=eap6.4
Step 3: Create an Application image
$ s2i build -e “APPDYNAMICS_APPLICATION_NAME=os3-ticketmonster,APPDYNAMICS_TIER_NAME=os3-ticketmonster-tier,APPDYNAMICS_ACCOUNT_NAME=customer1_xxxxxxxxxxxxxxxxxxf,APPDYNAMICS_ACCOUNT_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxx,APPDYNAMICS_CONTROLLER_HOST=xxxx.saas.appdynamics.com,APPDYNAMICS_CONTROLLER_PORT=443,APPDYNAMICS_CONTROLLER_SSL_ENABLED=true” https://github.com/jim-minter/ose3-ticket-monster appdynamics/sti-wildfly-eap64-centos7:latest pranta/appd-eap-ticketmonster
$ docker tag openshift-ticket-monster pranta/openshift-ticket-monster:latest
$ docker push pranta/openshift-ticket-monster
Step 4: Deploy the Application into OpenShift
$ oc login 10.0.32.128:8443
$ oc new-project wildfly
$ oc project wildfly
$ oc new-app –docker-image=pranta/appd-eap-ticketmonster:latest –name=ticketmonster-demo
Now you should be able to login to the controller and see the ticketmonster application on the application dashboard:
See a live demo of Red Hat OpenShift v3 with AppDynamics from AppSphere ’15 below.
If you’re already using RedHat OpenShift v3 but are new to AppDynamics, here’s where you can sign-up for a free trial: https://portal.appdynamics.com/account/signup/signupForm/