Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
on
08-07-2019
01:37 PM
- edited on
11-09-2019
04:14 PM
by
Claudia.Landiva
This article walks you through deploying an example macOS application on AWS Elastic Beanstalk using a script provided by AppDynamics. The example application can then be monitored with the AppDynamics Java Agent. This exercise uses the Spring Music application and tutorial found on GitHub.
Review prerequisites and prepare options
Construct and deploy the script
To deploy the Spring Music sample application with AWS Beanstalk, you must have:
There are three options for you to monitor and debug an application on AppDynamics:
Java | Uses a Java agent only |
Java-Machine | Uses a Java agent that includes a Machine Agent for Server Visibility |
Java Machine Analytics | Uses a Java agent that includes Analytics, and can also optionally enable Server Visibility |
You’ll need to have the AppDynamics license that corresponds with your choices.
Depending on the Controller you intend to use for monitoring, you can monitor the example Java application with or without Analytics. The Analytics Dynamic Service extends your app server agent functionality to collect and forward data to the Analytics Agent.
If you do choose to monitor with Analytics, you can also decide whether or not to enable the Server Visibility module. Server visibility includes additional windows in the Controller UI that enable you to quickly see underlying infrastructure issues impacting your application performance.
Once you decide which monitoring and debugging option suits your purpose, use the table below to identify the corresponding tutorial target directory. You will need to input this directory path later on when you build your deployment script.
Analytics |
Server Visibility |
Path |
License |
no |
no |
|
|
no |
yes |
|
APM Advanced |
yes |
yes or no |
|
APM Peak |
For each directory, there is a folder called testing.
cd ./aws-elasticbeanstalk/<platform>-(machine)-(analytics)/testing
cd ./aws-elasticbeanstalk-master/java-machine-analytics/testing/test.sh
NOTE: If you deploy your own application, you’ll need to write your own script, or deploy your application manually. See Deploying applications manually.
Finally, decide whether or not to SSH into the EC2 instance on which the application runs. Development, test, and staging environments require this technique more often than production environments.
If you decide to SSH into EC2 instances, choose a pre-existing Key Pair, or create a new one. Note the name of your chosen Key Pair.
To deploy applications with AWS Elastic Beanstalk, you need to know the environment variable settings for every AppDynamics Agent your application needs.
A note about securityDo not use the procedure as described here, with your secret key entered at the command line in plain text, in a production environment. It may not even be considered acceptable for testing, depending on practices at your organization. See Best Practices for Managing AWS Access Keys. |
This exercise only uses the Java Agent, which keeps the list of required settings short
./test.sh
Script option |
Environment variable |
Notes |
-c |
<APPDYNAMICS_CONTROLLER_HOST_NAME> |
Fully-qualified domain name for the AppDynamics Controller with which you intend to monitor your application |
-p |
<APPDYNAMICS_CONTROLLER_PORT> |
Primary port used by the monitoring AppDynamics Controller (the Default is 8090) |
-K |
<APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY> |
Find the Controller under Settings > License > Account |
-E |
<APPDYNAMICS_ANALYTICS_EVENT_ENDPOINT> |
Include only if your Controller has Analytics Tells the Analytics plugin the target URL for the Events Service. The Analytics plugin sends data to the Events Service, not the Controller |
-g |
<APPDYNAMICS_AGENT_GLOBAL_ACCOUNT_NAME> |
Include only if your Controller has Analytics: See Controller details under Settings > License > Account |
-s |
<APPDYNAMICS_SIM_ENABLED> |
Note: Include and set to true only if you want to enable Server Visibility |
-r |
<REGION> |
Must be the code for the region shown in your AWS console. For example, if the console shows Ohio, the code is us-east-2 See the AWS documentation on Available Regions |
-a |
<APP_NAME> |
Choose a name for the example application |
-e |
<ENV_NAME> |
Choose a name for the new environment that the script creates |
-b |
<BASE_DIR> |
Specifies the local filesystem location from which the script should copy the sample application, after cloning it from GitHub |
-k |
<KEY> |
Include only if you want to use eb ssh, which allows you to log into the EC2 instance on which the script deploys the app For the value, use the name of your chosen Key Pair |
-i |
<INSTANCE> |
Optional—if not specified, AWS uses a default Must be t2.small or larger for this demo to run properly |
For example, a test.sh
command, without Analytics, without Server Visibility, and without SSH, might look something like this:
|
|
In a terminal, within the exercise target directory:
testing
test.sh
command. When prompted, provide any options you omitted from the command.To verify that the AWS EC2 node is properly registered with the Controller:
You should see the example application listed under Applications.
You should be able to view the example in the Flow Map, and (if applicable) Analytics Agent and/or Server Visibility screens.
After you successfully complete this exercise, if you want to deploy your own application, you’ll need to either create your own similar script or deploy it manually.
To deploy AppDynamics Agents within an AWS Elastic Beanstalk environment, see the README of the GitHub repository and the AWS Elastic Beanstalk documentation.
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form