@CloudExpo Authors: Elizabeth White, Yeshim Deniz, Liz McMillan, Ram Sonagara, Pat Romanski

Related Topics: @CloudExpo, Open Source Cloud, @DevOpsSummit

@CloudExpo: Blog Feed Post

Getting Started with @Pivotal Cloud Foundry & @AppDynamics | @CloudExpo [#Cloud]

The primary objective of a platform should be to provide a high-level of automation

Getting Started with Pivotal Cloud Foundry and AppDynamics
By Jamie O'Meara

The primary objective of a platform should be to provide a high-level of automation. This provides easy management of applications and services, while delivering consistent and error-free deployment of applications. While this high level automation provides a critical foundation, additional specialized services can be added to increase manageability of the applications deployed on the platform. To assist operators in this pursuit the Pivotal Cloud Foundry platform provides a number of integrated services out-of-the-box, including AppDynamics, New Relic, and CloudBees Jenkins. This blog will focus on the “out-of-the-box” integration between Pivotal Cloud Foundry and AppDynamics.

Pivotal Cloud Foundry Buildpacks and Agent Integration
A buildpack in Pivotal Cloud Foundry provides the framework and runtime support for your application. As applications are deployed or “pushed”, the platform detects the language and includes the appropriate versions of the runtime, as well as any additional application infrastructure. The buildpack also contains the AppDynamics agent, with numerous versions to support different deployments. To successfully deploy the agent we need to provide the proper configuration based on the environment during the deployment.

To create the proper configuration a User Provided Service (UPS) is created. A UPS is an external service created for an organization and space and is bound to an application in Pivotal Cloud Foundry. Once the service is bound to the application and the application is restaged, a process to prepare an application for deployment, the AppDynamics agent has the proper configuration to register with the AppDynamics controller and to transmit metrics to the designated endpoint.

A common practice in AppDynamics is to create a logical model representing different layers of an application. AppDynamics uses the application name, tier name and node name to align the deployed applications with the AppDynamics logical model. The Pivotal Cloud Foundry platform, specifically the buildpacks and UPS, provide the mechanism to align deployed applications to the logical model.

The diagram below depicts the Spring Trader application deployed on Pivotal Cloud Foundry. Spring Trader includes three Spring-based applications that are designed to represent a simple trading platform. The deployment artifacts include a web UI component written in Spring MVC, a RESTful API component that provides portfolio and trade data via a persistent store and RabbitMQ, and an asynchronous service for quote generation. Each of these applications are deployed into their own container, and each have their own UPS to define a tier within AppDynamics. This deployment aligns the applications to the AppDynamics logical model using the application and tier name.


To establish a deeper understanding let’s walk through the process and commands required to create the user-provided service and applications on Pivotal Cloud Foundry.

Configure and Push Applications onto Pivotal Cloud Foundry
Before we can “cf push” the application, we need to create a user-provided service in the organization and space where we deploy our applications. In the example below, we use the Cloud Foundry CLI to create the user-provided service providing the required information in name/value format. Notice the application and tier name are configured, and we have created three different user-provided services to represent different tiers in our application.

cf cups app-dynamics-ST-web -p '{"account-name":"myacct","account-access-key":"key","host-name":"myacct.saas.appdynamics.com ","port":"80","tier-name":"web","application-name":"SpringTrader"}'

cf cups app-dynamics-ST-rest -p '{"account-name":"myacct","account-access-key":"key","host-name":"myacct.saas.appdynamics.com ","port":"80","tier-name":"rest","application-name":"SpringTrader"}'

cf cups app-dynamics-ST-asynch -p '{"account-name":"myacct","account-access-key":"key","host-name":"myacct.saas.appdynamics.com ","port":"80","tier-name":"asynch","application-name":"SpringTrader"}'

With our services defined, let’s deploy the Spring Trader application. Using the command line, issue the following commands:

## Create required managed services for deployment
cf create-service p-rabbitmq standard tradermessaging
cf create-service p-mysql 100mb-dev tradersql

## Deploying Rest component, binding services and restaging application
### Note the -b option to use the latest Java buildpack from github.com/cloudfoundry/java-buildpack
cf push -p dist/spring-nanotrader-services-1.0.1.BUILD-SNAPSHOT.war -b https://github.com/cloudfoundry/java-buildpack.git --no-start stfront
### Binds Services
cf bind-service stfront tradersql
cf bind-service stfront tradermessaging
cf bind-service stfront app-dynamics-ST-rest
### Specify which JVM version to use in the Java Buildpack
cf set-env stfront JBP_CONFIG_OPEN_JDK_JRE '[version: 1.7.0_+]'
### Specify which AppDynamics agent to use in the Java Buildpack
cf set-env stfront JBP_CONFIG_APP_DYNAMICS_AGENT '[version: 4.0.1_+]'
cf restage stfront.

## Deploying Web UI component, binding services and restaging application.
cf push -p dist/spring-nanotrader-web-1.0.1.BUILD-SNAPSHOT.war -b https://github.com/cloudfoundry/java-buildpack.git --no-start stweb
### Bind services
cf bind-service stweb app-dynamics-ST-web
cf set-env stweb JBP_CONFIG_OPEN_JDK_JRE '[version: 1.7.0_+]'
cf restage stweb

## Deploying the asynch service component, binding services and restaging application.
cf push -p dist/spring-nanotrader-asynch-services-1.0.1.BUILD-SNAPSHOT.war -b https://github.com/cloudfoundry/java-buildpack.git --no-start stback
### Bind services
cf bind-service stback stsql
cf bind-service stback tradermessaging
cf bind-service stback app-dynamics-ST-asynch
cf set-env stback JBP_CONFIG_OPEN_JDK_JRE '[version: 1.7.0_+]'
cf restage stback

As the “cf restage” command is executed the output will show which pieces are required to create the application and prepare it for the container. In the example below, you’ll see the AppDynamics agent is added to the container along with OpenJDK and the Tomcat server. If the AppDynamics agent is not included, verify the user-provider service is properly configured and its bound to the application.


Once the commands are complete you should see the applications deployed in Pivotal Cloud Foundry Apps Manager. You should also see the user-provided services, with an application bound to each service. A number of applications can be bound to the user-provided service, but in our example its one per service.



We’ve successfully deployed our applications and bound AppDynamics services to each application instance. Let’s review the AppDynamics dashboard to understand how our application maps to the AppDynamics logical model.

The AppDynamics Model and Dashboards
In the home dashboard below you’ll notice the Spring Trader application. This application is made up of three independent applications in Pivotal Cloud Foundry.


If we click into the Spring Trader application, we’ll see the app servers and you’ll notice how each application instance uses the tier name to represent different layers of the Spring Trader application. In our example we have the web, rest and asynch tiers. If you expand each tier you’ll see the node names, in this case node name is “0” for the first instance of the application. Node names are configurable, but I prefer to use the default node names as they align with the Pivotal Cloud Foundry application instance sequence number. As we scale different tiers to support new workloads, the new application instances will register with the AppDynamics controller, each with a sequential node name.


By supporting the logical model in Pivotal Cloud Foundry, we can use the application dashboard to review transactions across the different applications.


Troubleshooting AppDynamics Agents in Pivotal Cloud Foundry
During my initial installation, I had misconfigured the user-provided service which prevented the agent from registering with the AppDynamics controller. As a result, I needed to troubleshoot the agent configuration and review its logs. The good news is Pivotal Cloud Foundry makes this extremely easy. To access the agent logs, or any other buildpack information, just issue a “cf files stfront” command similar to the image below replacing “stfront” with your application name.


The logs are located on app/.java-buildpack/app_dynamics_agent/ver4.0.1.0/logs and each instance of your application will have its own log. At the top of the agent log you can find AppDynamic JVM arguments used to configure the agent. If you configure application security groups in Pivotal Cloud Foundry you’ll need to modify the policy to allow egress traffic for the controller port. In the example below, you can see all logs available for review and each file can be output to the screen by issuing the “cf files” command with a full path to the file.

“cf files stfront app/.java-buildpack/app_dynamics_agent/ ver4.0.1.0/logs/agent.2015_03_31__14_26_55_0.log”


As we’ve shown,  Pivotal Cloud Foundry makes the delivery and management of applications extremely easy and error free. Working with our partners to create an ecosystem of integrated services for customers delivers tremendous value, and provides an elegant transition to the delivery of cloud native applications while preserving and integrating with existing solutions.

The post Getting Started with Pivotal Cloud Foundry and AppDynamics appeared first on Application Performance Monitoring Blog | AppDynamics.

Read the original blog entry...

More Stories By AppDynamics Blog

In high-production environments where release cycles are measured in hours or minutes — not days or weeks — there's little room for mistakes and no room for confusion. Everyone has to understand what's happening, in real time, and have the means to do whatever is necessary to keep applications up and running optimally.

DevOps is a high-stakes world, but done well, it delivers the agility and performance to significantly impact business competitiveness.

@CloudExpo Stories
Predicting the future has never been more challenging - not because of the lack of data but because of the flood of ungoverned and risk laden information. Microsoft states that 2.5 exabytes of data are created every day. Expectations and reliance on data are being pushed to the limits, as demands around hybrid options continue to grow.
Poor data quality and analytics drive down business value. In fact, Gartner estimated that the average financial impact of poor data quality on organizations is $9.7 million per year. But bad data is much more than a cost center. By eroding trust in information, analytics and the business decisions based on these, it is a serious impediment to digital transformation.
Daniel Jones is CTO of EngineerBetter, helping enterprises deliver value faster. Previously he was an IT consultant, indie video games developer, head of web development in the finance sector, and an award-winning martial artist. Continuous Delivery makes it possible to exploit findings of cognitive psychology and neuroscience to increase the productivity and happiness of our teams.
The IoT Will Grow: In what might be the most obvious prediction of the decade, the IoT will continue to expand next year, with more and more devices coming online every single day. What isn’t so obvious about this prediction: where that growth will occur. The retail, healthcare, and industrial/supply chain industries will likely see the greatest growth. Forrester Research has predicted the IoT will become “the backbone” of customer value as it continues to grow. It is no surprise that retail is ...
Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
Business professionals no longer wonder if they'll migrate to the cloud; it's now a matter of when. The cloud environment has proved to be a major force in transitioning to an agile business model that enables quick decisions and fast implementation that solidify customer relationships. And when the cloud is combined with the power of cognitive computing, it drives innovation and transformation that achieves astounding competitive advantage.
How is DevOps going within your organization? If you need some help measuring just how well it is going, we have prepared a list of some key DevOps metrics to track. These metrics can help you understand how your team is doing over time. The word DevOps means different things to different people. Some say it a culture and every vendor in the industry claims that their tools help with DevOps. Depending on how you define DevOps, some of these metrics may matter more or less to you and your team.
Evan Kirstel is an internationally recognized thought leader and social media influencer in IoT (#1 in 2017), Cloud, Data Security (2016), Health Tech (#9 in 2017), Digital Health (#6 in 2016), B2B Marketing (#5 in 2015), AI, Smart Home, Digital (2017), IIoT (#1 in 2017) and Telecom/Wireless/5G. His connections are a "Who's Who" in these technologies, He is in the top 10 most mentioned/re-tweeted by CMOs and CIOs (2016) and have been recently named 5th most influential B2B marketeer in the US. H...
DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City. Digital Transformation (DX) is a major focus with the introduction of DXWorldEXPO within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of bus...
DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one location.
Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
@DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the world's largest enterprises - and delivering real results.
DXWorldEXPO LLC announced today that Dez Blanchfield joined the faculty of CloudEXPO's "10-Year Anniversary Event" which will take place on November 11-13, 2018 in New York City. Dez is a strategic leader in business and digital transformation with 25 years of experience in the IT and telecommunications industries developing strategies and implementing business initiatives. He has a breadth of expertise spanning technologies such as cloud computing, big data and analytics, cognitive computing, m...
DXWorldEXPO LLC announced today that Kevin Jackson joined the faculty of CloudEXPO's "10-Year Anniversary Event" which will take place on November 11-13, 2018 in New York City. Kevin L. Jackson is a globally recognized cloud computing expert and Founder/Author of the award winning "Cloud Musings" blog. Mr. Jackson has also been recognized as a "Top 100 Cybersecurity Influencer and Brand" by Onalytica (2015), a Huffington Post "Top 100 Cloud Computing Experts on Twitter" (2013) and a "Top 50 C...
Cloud-enabled transformation has evolved from cost saving measure to business innovation strategy -- one that combines the cloud with cognitive capabilities to drive market disruption. Learn how you can achieve the insight and agility you need to gain a competitive advantage. Industry-acclaimed CTO and cloud expert, Shankar Kalyana presents. Only the most exceptional IBMers are appointed with the rare distinction of IBM Fellow, the highest technical honor in the company. Shankar has also receive...
Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities - ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups.
The standardization of container runtimes and images has sparked the creation of an almost overwhelming number of new open source projects that build on and otherwise work with these specifications. Of course, there's Kubernetes, which orchestrates and manages collections of containers. It was one of the first and best-known examples of projects that make containers truly useful for production use. However, more recently, the container ecosystem has truly exploded. A service mesh like Istio addr...
Cloud Expo | DXWorld Expo have announced the conference tracks for Cloud Expo 2018. Cloud Expo will be held June 5-7, 2018, at the Javits Center in New York City, and November 6-8, 2018, at the Santa Clara Convention Center, Santa Clara, CA. Digital Transformation (DX) is a major focus with the introduction of DX Expo within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive ov...
DXWorldEXPO | CloudEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
The dynamic nature of the cloud means that change is a constant when it comes to modern cloud-based infrastructure. Delivering modern applications to end users, therefore, is a constantly shifting challenge. Delivery automation helps IT Ops teams ensure that apps are providing an optimal end user experience over hybrid-cloud and multi-cloud environments, no matter what the current state of the infrastructure is. To employ a delivery automation strategy that reflects your business rules, making r...