When delivering AppDynamics Cloud workshops, the provisioning and configuration of these lab environments can be an extremely tedious and time-consuming challenge for SE's. To solve that problem, the AppDynamics Cloud Kickstart project delivers a set of artifacts to automate the build, deployment, and configuration portion of these pre-workshop activities using open source tooling.
Although there are many tools available to accomplish the project's automation goals, it was decided to standardize on Packer and Terraform from HashiCorp. This is primarily due to their capability for building and deploying software platforms to multi-cloud environments, as well as having a high level of adoption within the developer community.
Packer is an open source tool for creating identical machine images for multiple platforms from a single source configuration. Packer is lightweight, runs on every major operating system, and is highly performant. A machine image (or immutable VM image) is a single static unit that contains a pre-configured operating system and installed software which is used to quickly create new running machines.
As part of this project, Packer is used to create immutable VM images consisting of a standardized installation of CentOS 7.9 with a set of common software. These static images are later used by Terraform when standing-up the infrastructure and compute resources needed by workshop participants. Currently, these VMs consist of the following types:
- LPAD VM: A 'Launchpad' VM with pre-configured tooling for Kubernetes and Serverless CLI Operations.
- APM-Platform VM: An APM Platform stand-alone VM designed for Application Performance Monitoring. It consists of the AppDynamics Enterprise Console, Controller, and Events Service.
For SE-lead workshops, these VM images are built and maintained by AppDynamics. However, all of the artifacts used to build the images are present in this project, so customers are free to customize and build their own VM images if desired.
Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions. The infrastructure Terraform can manage includes low-level components such as compute instances, storage, and networking, as well as high-level components such as DNS entries, SaaS features, etc.
In this project, Terraform is used to automate the deployment of the Lab infrastructure, including VPCs, subnets, security groups, load balancers, and VMs using templates. The SE can also specify the number of environments needed (one for each participant) as well as the lab sequence start number, such as Lab01, Lab02, Lab03, etc.
To configure the AppDynamics Cloud workshop environments, the first step is to set-up your local environment by installing the needed software.
You install Packer and Terraform on a control node, usually your local laptop, which then uses the cloud CLI and/or SSH to communicate with your cloud resources and managed nodes.
The following open source software needs to be installed on the host macOS machine:
- Homebrew 4.3.17
- Git 2.46.0
- Packer 1.11.2
- Terraform 1.9.5
- jq 1.7.1
Perform the following steps to install the needed software:
-
Install the Homebrew 4.3.17 package manager for macOS 64-bit. Paste the following into a macOS Terminal prompt:
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
-
Install Git 2.46.0 for macOS 64-bit.
$ brew install git
-
Install Packer 1.11.2 for macOS 64-bit.
$ brew tap hashicorp/tap $ brew install hashicorp/tap/packer
-
Install Terraform 1.9.5 for macOS 64-bit.
$ brew tap hashicorp/tap $ brew install hashicorp/tap/terraform
-
Install jq 1.7.1 for macOS 64-bit.
$ brew install jq
-
Validate installed command-line tools:
$ brew --version Homebrew 4.3.17 $ brew doctor Your system is ready to brew. $ git --version git version 2.46.0 $ packer --version 1.11.2 $ terraform --version Terraform v1.9.5 $ jq --version jq-1.7.1
-
Configure Git for local user:
$ git config --global user.name "<first_name> <last_name>" $ git config --global user.email "<your_email>" $ git config --global --list
To build the AppD Cloud Kickstart immutable VM images, the following open source software needs to be installed on the host Windows machine:
- Git 2.46.0 for Win64
- Packer 1.11.2
- Terraform 1.9.5
- jq 1.7.1
Perform the following steps to install the needed software:
-
Install Git 2.46.0 for Windows 64-bit.
-
Install Packer 1.11.2 for Windows 64-bit.
Create suggested install folder and extract contents of ZIP file to:
C:\HashiCorp\bin
-
Install Terraform 1.9.5 for Windows 64-bit.
Create suggested install folder and extract contents of ZIP file to:
C:\HashiCorp\bin
-
Install jq 1.7.1 for Windows 64-bit.
Create suggested install folder and rename binary to:
C:\Program Files\Git\usr\local\bin\jq.exe
-
Set Windows Environment
PATH
to:PATH=C:\HashiCorp\bin;C:\Program Files\Git\usr\local\bin;%PATH%
-
Reboot Windows.
-
Launch Git Bash.
Start Menu -- > All apps -- > Git -- > Git Bash -
Validate installed command-line tools:
$ git --version git version 2.46.0.windows.1 $ packer --version 1.11.2 $ terraform --version Terraform v1.9.5 $ jq --version jq-1.7.1
-
Configure Git for local user:
$ git config --global user.name "<first_name> <last_name>" $ git config --global user.email "<your_email>" $ git config --global --list
-
Create a folder for your AppD Cloud Kickstart project:
$ mkdir -p /<drive>/projects $ cd /<drive>/projects
-
Get the code from GitHub:
$ git clone https://github.com/CiscoDevNet/AppD-Cloud-Kickstart.git $ cd AppD-Cloud-Kickstart
The AppDynamics Cloud Kickstart project currently supports VM image builds for Amazon AWS, Microsoft Azure, and Google Cloud Platform (GCP). Click on a link below for platform-specific instructions and a Bill-of-Materials.
- AWS Build and Deploy: Instructions
- Azure Build and Deploy: Instructions
- GCP Build and Deploy: Instructions