As customers and partners are making the transition of their applications from monoliths to microservices using Platform as a Service (PaaS) providers such as Pivotal Cloud Foundry (PCF), AppDynamics has made a significant investment in providing first-class integrations with such providers. Pivotal Cloud Foundry helps enterprises make the transition to cloud native enterprise with a complete platform for delivering software rapidly, consistently and reliably at scale.
PCF continues to be amongst the fastest growing open source PaaS platform ever (launched in 2014). It uses a flexible approach called language buildpacks to dynamically assemble and configure a complete runtime environment for executing a particular class of applications. Once an application is deployed into PCF, it automatically supports vertical and horizontal application tier scaling. AppDynamics has been a pioneer member of the Cloud Foundry Foundation since it’s inception in 2014.
Here’s an overview of the Pivotal Cloud Foundry architecture:
The AppDynamics PCF Service Broker Tile
We have now added a new AppDynamics Service Broker PCF Product tile. This tile automates the BOSH deployment and configuration of AppDynamics agents and controller for PCF applications. Cloud Foundry BOSH is an open source tool chain for release engineering, deployment and lifecycle management of large scale distributed services.
This tile is available on the Pivotal Network: https://network.pivotal.io/products/p-appdynamics
The overall workflow for using the AppDynamics Service Broker tile is shown below:
Step 1: Import the AppDynamics Service Broker Tile into the PCF Ops Manager
Step 2: Configure the AppDynamics Service Broker Tile in PCF Ops Manager and create Service Plans
From the Service Broker Application tab, one or more service plans can then be added. Each service plan will correspond to a pre-provisioned AppDynamics license, that was either purchased or obtained on a trial basis.
Application administrators/managers or Application developers who are the users PCF to build and manage their applications will find these service plans listed in Services Marketplace in Apps Manager.
Next, the Machine Agent Extension for PCF OPS Metrics tab can be configured as shown below:
Step 3: Deploy application using the appropriate language buildpack using “cf push” CLI.
For new applications, use the cf push command to deploy your application, using the appropriate language buildpack:
- Java:$ cf push APPNAME -p <artifact> -b https://github.com/cloudfoundry/java-buildpack
- PHP:$ cf push APPNAME -p <artifact> -b https://github.com/AppDynamics/php-buildpack
- Node.js:$ cf push APPNAME -p <artifact> -b https://github.com/AppDynamics/nodejs-buildpack
- WebSphere Liberty:$ cf push APPNAME -p <artifact> -b https://github.com/Appdynamics/ibm-websphere-liberty-buildpack
Then create a AppDynamics Service instance either using the CLI or in PCF Apps Manager Services Marketplace using a Service Plan and bind that instance to a PCF Application by re-deploying it using “cf restage” CLI.
Using CF CLI:
$ cf marketplace -s appdynamics
Getting service plan information for service appdynamics as admin…
service plan description free or paid
Gold Service Plan for Gold free
Demo-Staging Service Plan for Demo-Staging free
Demo1 Service Plan for Demo1 free
$ cf create-service appdynamics Demo-Staging adsvc
$ cf bind-service APPNAME adsvc
Using PCF Apps Manager
This can also be achieved by using the PCF Apps Manager UI as shown below. After deploying application on Pivotal, to bind an application to a service, either select already existing service or click on Add from Marketplace.
Once the service instance is bound to your application, you can then redeploy it using the CLI ‘cf restage’ as shown below:
$ cf restage APPNAME
Once this is done, you should be able to start monitoring the PCF application on the AppDynamics controller. As an example, we used the spring-music application and by following the above steps, we were able to see the following application dashboard in the AppDynamics Controller:
For more detailed instructions on getting started, configure the PCF and monitor applications deployed in the PCF environment, please visit: http://docs.pivotal.io/appdynamics/index.html
Monitoring the PCF infrastructure
In addition, PCF administrators can monitor PCF Ops Metrics using AppDynamics Machine agent by configuring the controller tab and adding the JMX details.
To check PCF Ops metrics, check for an application named AppDynamicsPCFOpsMetrics in the controller UI. To see the metrics, select Home > AppDynamicsPCFOpsMetrics > Metric Browser > Application Infrastructure Performance > MachineAgentTier > Custom Metrics > CF. This lists all underlying components of PCF such as the DEA, Cloud Controller, Router, etc.
Alternatively, a subset of these PCF infrastructure metrics can be plotted on a Custom Dashboard such as the one shown below:
If you’re already using Pivotal Cloud Foundry but are new to AppDynamics, here’s where you can sign-up for a free trial: https://portal.appdynamics.com/account/signup/signupForm/