Welcome!

Open Source Cloud Authors: Vaibhaw Pandey, Stackify Blog, John Walsh, Liz McMillan, 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.

image04

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.

image05

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.

image01

image08

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.

image00

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.

image02

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

image06

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.

image07

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”

image03

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.

@ThingsExpo Stories
"Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
Large industrial manufacturing organizations are adopting the agile principles of cloud software companies. The industrial manufacturing development process has not scaled over time. Now that design CAD teams are geographically distributed, centralizing their work is key. With large multi-gigabyte projects, outdated tools have stifled industrial team agility, time-to-market milestones, and impacted P&L stakeholders.
Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In th...
"Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"MobiDev is a software development company and we do complex, custom software development for everybody from entrepreneurs to large enterprises," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
"IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
"Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
In his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objectively discuss how DNS is used to solve Digital Transformation challenges in large SaaS applications, CDNs, AdTech platforms, and other demanding use cases. Carl J. Levine is the Senior Technical Evangelist for NS1. A veteran of the Internet Infrastructure space, he has over a decade of experience with startups, networking protocols and Internet infrastructure, combined with the unique ability to it...
It is of utmost importance for the future success of WebRTC to ensure that interoperability is operational between web browsers and any WebRTC-compliant client. To be guaranteed as operational and effective, interoperability must be tested extensively by establishing WebRTC data and media connections between different web browsers running on different devices and operating systems. In his session at WebRTC Summit at @ThingsExpo, Dr. Alex Gouaillard, CEO and Founder of CoSMo Software, presented ...
"There's plenty of bandwidth out there but it's never in the right place. So what Cedexis does is uses data to work out the best pathways to get data from the origin to the person who wants to get it," explained Simon Jones, Evangelist and Head of Marketing at Cedexis, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
WebRTC is great technology to build your own communication tools. It will be even more exciting experience it with advanced devices, such as a 360 Camera, 360 microphone, and a depth sensor camera. In his session at @ThingsExpo, Masashi Ganeko, a manager at INFOCOM Corporation, introduced two experimental projects from his team and what they learned from them. "Shotoku Tamago" uses the robot audition software HARK to track speakers in 360 video of a remote party. "Virtual Teleport" uses a multip...
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, whic...
SYS-CON Events announced today that Evatronix will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
Leading companies, from the Global Fortune 500 to the smallest companies, are adopting hybrid cloud as the path to business advantage. Hybrid cloud depends on cloud services and on-premises infrastructure working in unison. Successful implementations require new levels of data mobility, enabled by an automated and seamless flow across on-premises and cloud resources. In his general session at 21st Cloud Expo, Greg Tevis, an IBM Storage Software Technical Strategist and Customer Solution Architec...
To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
An increasing number of companies are creating products that combine data with analytical capabilities. Running interactive queries on Big Data requires complex architectures to store and query data effectively, typically involving data streams, an choosing efficient file format/database and multiple independent systems that are tied together through custom-engineered pipelines. In his session at @BigDataExpo at @ThingsExpo, Tomer Levi, a senior software engineer at Intel’s Advanced Analytics gr...
When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things’). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing? IoT is not about the devices, it’s about the data consumed and generated. The devices are tools, mechanisms, conduits. In his session at Internet of Things at Cloud Expo | DXWor...