On this page:
On this page:
To continue, you must have
- an AWS account
- the Elastic Beanstalk console open
eb(the Elastic Beanstalk CLI) installed
After you complete this demo, the next step is to deploy manually rather than running the script. See Deploying applications manually.
Choose monitoring and debugging options
Depending on the Controller you intend to use for monitoring, you can monitor the example application
- with or without Analytics
- if monitoring with Analytics, with or without Server Visibility enabled
|Analytics||Server Visibility||Tutorial Target Directory|
|yes||yes OR no|
Create a VPC and a Key Pair
In the AWC console:
- Create a Virtual Private Cloud (VPC), or decide which pre-existing VPC to use.
- Unless using the default VPC, note the ID of your chosen VPC.
If you want to SSH into EC2 instances:
- Create a Key Pair, or decide which pre-existing Key Pair to use.
- Note the name of your chosen Key Pair.
Construct the test.sh command
To deploy applications with Elastic Beanstalk, you need to know the variable settings for every AppDynamics Agent your application needs. This tutorial uses the Java Agent only, which keeps the list of required settings short.
In a text editor, create a string that begins with
Append the script options and environment variable settings to the command string, as described in the table below. See the example command string below the table.
The completed string is your
|Script option||Environment variable||Notes|
The simplest possible
test.sh command (no Analytics, no Server Visibility, no SSH) might look something like this:
A note about security
Do 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 or may not be considered acceptable even for testing, depending on practices at your organization. See Best Practices for Managing AWS Access Keys.
Set up the demo and the CLI
All file paths in these examples begin with the home directory, designated by the ~ character. Replace the ~ with whatever filesystem location you prefer.
In a terminal:
- Git clone the demo repo.
cdinto the tutorial target directory as described above.
- (Optional) Create a virtual environment.
Run the demo script
In a terminal, still in the tutorial target directory.
- Run the following command:
- Run your
- When prompted, provide options you omitted from the command, if any.
Verify that the EC2 Node is Registered with the Controller
In the Controller, you should see the example application under Applications.
Verify that the Application is Running in the Cloud
In the Elastic Beanstalk console, you should see the example application under All Applications and the environment you named at launch.
- Click the URL (at bottom right in the screenshot above).
- The Spring Music example application should open in a browser.
- Use the + button to add albums to the web page.
- This is required to generate load for AppDynamics to monitor.
Monitor your Cloud Application with AppDynamics
You should be able to view the example in the Flow Map, and (if applicable) Analytics Agent and/or Server Visibility screens.
Deploying applications manually