Deploying a .NET Application in Pivotal
The following steps outline the workflow:
Before You Start
- Create a Pivotal Web Services account OR set up Pivotal Cloud Foundry PaaS.
- Install the cf command line interface. Go to the Pivotal Documentation and search for "install cf cli".
Log In to Pivotal
Open a CLI or command-prompt window.
- Log in to the PCF apps manager using the following command:
cf login -a <apps-manager-link> -u <username> -p <password>
Download and Build the Buildpack
Download a fork of Cloud Foundry HWC buildpack version 2.3.14 for deploying .NET full framework applications with AppDynamics monitoring.
- Go to: https://github.com/Appdynamics/hwc-buildpack, then click Download.
- Follow the instructions under Building the Buildpack.
Push the Application
- cd to the root directory of the .NET application you want to deploy.
Push the application and the Cloud Foundry .NET buildpack:
cf push <.net-app-name-in-pivotal> -b <buildpack_name> -s windows2012R2
Bind the Application with an AppDynamics Service Instance
Set Up the Service Plan
- Log in to the Pivotal Ops Manager.
- If the AppDynamics Service Broker tile does not appear in the Installation Dashboard, click Import a Product in the left-side menu and import the AppDynamics tile.
- Double-click on the AppDynamics tile in the Installation Dashboard.
- In the Settings tab, click AppDynamics Controller Configuration (left menu). Then click Add (right side of the page).
- Enter the following Service Plan options. All these fields are required.
- Controller configuration name
- Controller configuration description
- Account Name – The account name used to access the Controller
Account Access Key – In the Controller, click the gear icon
and choose License > Account > Access Key.
If the Account Access Key includes a one or more '$' characters, append a second '$' to every '$' included in the key string and surround the entire string with single quotes(').
- Controller Host
- Controller Port
- Click Save to save the changes and return to the Installation Dashboard.
- In the Installation Dashboard, click Apply Changes (right pane) and wait for all the changes to get applied.
Bind the Service Plan to the Application
- Log in to the Pivotal Apps Manager.
- Click Marketplace (left menu) and click AppDynamics under Services.
- Under Service Plans, select the service plan that you set up in the Ops Manager. Then click SELECT THIS PLAN.
- In the Instance Configuration area, select the space where you app resides under Add to Space.
- Under Bind To App, select the name of your app, then click Create.
- Restart the application.
Verify the Buildpack was Deployed
You can verify that the buildpack has been deployed successfully by viewing the logs.
cf logs <app_name> --recent
Verify the Application in the Controller
- Generate load on the application by refreshing it a few times.
- Log in to the Controller web UI, navigate to the Metric Browser, and verify that the application is getting detected and monitored.