Get Started with Cloud Foundry

With version 4.6.x of AppDynamics Application Performance Monitoring for VMware Tanzu tile, it is shipped with the Splunk AppDynamics extension buildpack, appdbuildpack, which can be used along with the standard buildpacks using the Cloud Foundry™ multiple buildpack workflow. The buildpack serves as a single point for Splunk AppDynamics support.

Note: The Java buildpack does not support the multi-buildpack approach. Therefore, Splunk AppDynamics support is implemented directly in the Java buildpack and the multi-buildpack approach is not used for Java applications.

Before You Begin

  • Cloud Foundry Command Line Interface (cf CLI) v6.38 or later is required to use multiple buildpacks. See Installing the cf CLI.
  • CloudFoundry Environment with Splunk AppDynamics Tile installed and configured with controller(s) information.
  • An application that you want to instrument. See Sample Applications.

Sample Applications

You can find sample applications demonstrating the multi-buildpack approach in the GitHub repository.

Splunk AppDynamics Buildpack Workflow

The following workflow demonstrates the workflow for using Splunk AppDynamics BuildPack. This is used for instrumenting applications running in cloud foundry (cf) environments.

Note: This document contains references to the Cloud Foundry™ documentation. Splunk AppDynamics does not own any rights and assumes no responsibility for the accuracy or completeness of such third-party documentation.
  1. Install or upgrade AppDynamics Application Performance Monitoring for VMware Tanzu tile version v4.6.x or later.
    See Install and Configure Splunk AppDynamics for VMware Tanzu. When the AppDynamics APM for VMware Tanzu tile is installed, a buildpack with the name appdbuildpack is displayed in your list of cf environment buildpacks:
    $ cf buildpacks
    Getting buildpacks...
    buildpack                position          enabled   locked   filename                                             stack
    dotnet_core_buildpack           1          true      false    dotnet-core_buildpack-cached-cflinuxfs2-v2.2.0.zip
    hwc_buildpack                   2          true      false    hwc_buildpack-cached-windows2016-v3.0.2.zip          windows2016
    appdbuildpack                   25         true      false    appdynamics_buildpack-v4.5.513.zip
  2. Verify if the appdynamics service is present in the environment along with the service plans created during the tile installation.
    $ cf marketplace -s appdynamics
    service plan                   description                    free or paid
    pcf-appd                       pcf-appd                       free
    pcf-appd-test                  pcf-appd-test                  free
  3. Create service instance with the following command.
    In this example, the service instance is appdynamics_service_instance:
    $ cf create-service appdynamics pcf-appd appd
    Note: Non Tile Workflow: For Cloud Foundry environments that do not support tiles, perform the following:
    1. Download Splunk AppDynamics Buildpack from AppDynamics Application Performance Monitoring for VMware Tanzu and upload it to your environment using the cf create -buildpack command.
    2. Create the user-provided service (for example, appdynamics_service_instance) as mentioned in Splunk AppDynamics VMware Tanzu Tile FAQs, then continue with step 4.
  4. Edit the application manifest.yml with the following details:
    See the Workflow Table for sample buildpacks.
    1. In services section, bind to the Splunk AppDynamics service instance (in this example it is appdynamics_service_instance)
    2. In the buildpacks section, include the appdbuildpack and standard buildpack specific to the application framework or language
    3. In theenv section, set these environment variables:
      • APPD_AGENT to the type of the application you are instrumenting (in this example it is .NET Core application)
      • (Optional) APPD_AGENT_HTTP_URL to download specific agent bits from an HTTP location
      • (Optional) APPD_CONF_HTTP_URL to download custom configuration files, corresponding to the Splunk AppDynamics agent, from an HTTP location
      • (Optional) APPD_BASIC_AUTH_USERNAME and APPD_BASIC_AUTH_PASS to provide basic authentication credentials to download specific agent bits from an HTTP location.
      cloudfoundry-apps/cf-NET-sample/ViewEnvironment (master)$ cat manifest.yml
      ---
      applications:
      - name: cf-net-application-sample
      memory: 2G
      buildpacks:
      - appdbuildpack          # appdynamics buildpack (required)
      - dotnet_core_buildpack  # language specific buildpack
      services:
      - appdynamics_service_instance   # appdynamics service instance (required)
      env:
      APPD_AGENT: dotnetcore  # type of agent needed for instrumentation (required)
      APPD_AGENT_HTTP_URL: https://www.nuget.org/api/v2/package/AppDynamics.Agent.Distrib.Micro.Windows/4.5.7 # download url (optional)
      APPD_CONF_HTTP_URL: http://appdconf.apps.lawndale.cf-app.com/dotnetcore/1/  # url where configuration files are present (optional)
      APPD_BASIC_AUTH_USERNAME: temp_user # basic auth username (optional)
      APPD_BASIC_AUTH_PASS: dummy # basic auth password (optional)
  5. Push your application by using the cf CLI command.
    cloudfoundry-apps/cf-NET-sample/ViewEnvironment (master)$ cf push

Splunk AppDynamics Agent Values

The following table lists the agent values:

Language Standard BuildPack APPD_AGENT value
.NET Framework (Windows) hwc_buildpack dotnet
.NET Core (Linux) dotnet_core_buildpack dotnet-linux
.NET Core (Windows) binary_buildpack dotnet-windows
Python python_buidpack python
GoLang go_buildpack golang
NodeJS nodejs-buildpack nodejs

Downloading Agent Bits

Splunk AppDynamics Buildpack provides a way to download specific agent bits by fetching binaries from custom download URLs. In addition to the default behavior of fetching agents from standard download points such as, appd dwnload server, pypi, nuget, and so on.

You can specify the APPD_AGENT_HTTP_URL as the download URL that is hosting Splunk AppDynamics Agent.

Note: If the download location requires basic authentication for downloading the Agent Bits, you can specify username and password by using APPD_BASIC_AUTH_USERNAME and APPD_BASIC_AUTH_PASS respectively.

Custom Configuration

Splunk AppDynamics Buildpack also provides a way to override basic configuration or add custom configuration files to the agent. The buildpack can fetch the configuration either locally or remotely. The buildpack fetches files with the same names that is used for a specific agent. To fetch remotely from a custom download point, host the configuration files corresponding to the agent on a HTTP server under a url and set APPD_AGENT_HTTP_URL to that URL.

Workflow Table

The following table describes the language/framework specific settings that can be applied while pushing the applications with appdbuildpack.

The column descriptions are as following:

  • APPD_AGENT Value: Value of the APPD_AGENT environment variable that needs to be set while pushing the application with appdbuildpack .
  • Configuration File Names: This list represents the names of files that will be picked by appdbuildpack when hosted locally or remotely.
    • When hosted remotely, these files should be present under URL specified by APPD_CONF_HTTP_URL.
    • When hosted locally, the files should be present under the appdynamics/conf folder, which is next to application bits.
  • Sample Manifest: An example buildpack to push an application with all the settings with appdbuildpack for instrumentation
Note: Here, we have used appdynamics_service_instance as the service instance, which is created before running the command from service broker service or user-provided service. See Cisco AppDynamics VMware Tanzu Tile FAQs.
APPD_AGENT Value Allowed Custom Configuration File Names Sample Manifest
DotNetCore (Linux) dotnetcore
  • AppDynamicsConfig.json
  • AppDynamicsAgentLog.json
edit manifest.yml
cloudfoundry-apps/cf-NET-sample/ViewEnvironment (master)$ cat manifest.yml
---
applications:
- name: cf-net-core
memory: 2G
buildpacks:
- appdbuildpack
- dotnet_core_buildpack
services:
- appdynamics_service_instance
env:
APPD_AGENT: dotnetcore
APPD_AGENT_HTTP_URL: <optional>
APPD_CONF_HTTP_URL: <optional>
APPD_BASIC_AUTH_USERNAME: <optional>
APPD_BASIC_AUTH_PASS: <optional>
DotNet (HWC) dotnet
  • AppDynamicsConfig.json
  • AppDynamicsAgentLog.json
edit manifest.yml
cloudfoundry-apps/cf-NET-sample/ViewEnvironment (master)$ cat manifest.yml
---
applications:
- name: cf-net
memory: 2G
buildpacks:
- appdbuildpack
- hwc_buildpack
services:
- appdynamics_service_instance   # appdynamics service instance (required)
env:
APPD_AGENT: dotnet
APPD_AGENT_HTTP_URL: <optional>
APPD_CONF_HTTP_URL: <optional>
APPD_BASIC_AUTH_USERNAME: <optional>
APPD_BASIC_AUTH_PASS: <optional>
Python python
  • appdynamics.cfg
edit manifest.yml
cloudfoundry-apps/cf-NET-sample/ViewEnvironment (master)$ cat manifest.yml
---
applications:
- name: cf-python
memory: 2G
buildpacks:
- appdbuildpack          # appdynamics buildpack (required)
- python_buildpack  # language specific buildpack
services:
- appdynamics_service_instance   # appdynamics service instance (required)
env:
APPD_AGENT: python  # type of agent needed for instrumentation (required)
APPD_AGENT_HTTP_URL: <optional>
APPD_CONF_HTTP_URL: <optional>
APPD_BASIC_AUTH_USERNAME: <optional>
APPD_BASIC_AUTH_PASS: <optional>
GoLang golang N/A because it is an SDK edit manifest.yml
cloudfoundry-apps/cf-NET-sample/ViewEnvironment (master)$ cat manifest.yml
---
applications:
- name: cf-net-application-sample
memory: 2G
buildpacks:
- appdbuildpack
- go_buildpack  # language specific buildpack
services:
- appdynamics_service_instance   # appdynamics service instance (required)
env:
APPD_AGENT: golang
APPD_AGENT_HTTP_URL: <optional>
APPD_CONF_HTTP_URL: <optional>
APPD_BASIC_AUTH_USERNAME: <optional>
APPD_BASIC_AUTH_PASS: <optional>
Note: Third party names, logos, marks, and general references used in these materials are the property of their respective owners or their affiliates in the United States and/or other countries. Inclusion of such references are for informational purposes only and are not intended to promote or otherwise suggest a relationship between Splunk AppDynamics and the third party.