In this video, you'll get an introduction to
Amazon Elastic Kubernetes Service (Amazon EKS) Observability Accelerator.
With this solution, you can easily deploy and configure an application-specific observability environment,
use Terraform to create Amazon Managed Service for Prometheus and Amazon Managed Grafana resources,
and conduct end-to-end monitoring of applications.
We’ll begin by cloning a GitHub repository inside our AWS Cloud9 environment.
This repository contains a collection of Terraform modules
that aim to make it easier and faster to adopt Amazon EKS.
The modules can be used to configure and manage complete EKS clusters that are fully bootstrapped
with the operational software needed to deploy and operate workloads.
Next, let’s open the directory we just created
and navigate to the folder containing the Terraform modules.
Now let's initialize the directory.
To deploy the Terraform modules, we’ll need a couple of variables.
First, let's navigate to Amazon Managed Grafana to create an API key.
We'll select this existing workspace and sign in.
Let's add the API key.
We'll provide a name and assign the Admin role.
Next, we'll make the key valid for one day.
This is the only time that the key will appear here, so let’s copy it for use in our deployment.
Next, let’s return to Amazon Managed Grafana to get the Grafana endpoint for our workspace.
Now let’s return to our Cloud9 environment.
For demonstration purposes, we've already updated the API key
and endpoint in the dev.tfvars file, as you can see here.
Alternatively, you can update the variables in a variables.tf file.
Next, let’s run terraform plan to create a preview of
the changes that Terraform will make in our infrastructure.
We can see the different modules that will be created.
The Terraform modules will create a namespace called opentelemetry-operator-system
and deploy the AWS Distro for OpenTelemetry (ADOT) Collector,
which will scrape the Java JMX metrics from the application running on our EKS cluster
and ingest these metrics into Amazon Managed Service for Prometheus.
Now we’ll apply the Terraform modules to deploy an
end-to-end monitoring solution for a sample JMX application.
First, the modules will deploy an EKS cluster.
We can monitor the status of the cluster from the Amazon EKS console.
The cluster has a status of “Creating.”
The modules will also deploy an Amazon Managed Service for Prometheus workspace.
We can check the status of that workspace in the Amazon Managed Service for Prometheus console.
The workspace has not been created yet.
Let’s return to our Cloud9 environment to monitor the command execution.
The EKS cluster has been created.
Let’s go to Amazon Elastic Kubernetes Service to confirm that it’s active.
We can see that the cluster is now active.
Next, let's check the status of the Amazon Service for Prometheus workspace.
The workspace has been created successfully.
Let’s return to our Cloud9 environment.
The Terraform modules have finished deploying.
Now let’s confirm that a few remaining resources were created.
The ADOT Collector has been deployed and is running in the opentelemetry-operator-system namespace.
The remote-write endpoint for the workspace has also been created,
enabling the JMX metrics to be automatically ingested
into the workspace in Amazon Managed Service for Prometheus.
Let’s go to our Amazon Managed Grafana workspace
to confirm that the data source was created successfully.
As you can see, the remote-write endpoint has been
configured as the data source for the Grafana dashboard.
It may take a few minutes for the dashboard to be generated.
Meanwhile, let's go back to our Cloud9 environment to deploy a sample JMX application.
In order to do that, we'll first navigate to the appropriate directory path and deploy an example
application from the AWS open telemetry collector repository by running the git clone command.
After this command is executed, you should see the open telemetry test framework directory.
Let's navigate to this directory and find the appropriate location within this directory
to run our authentication against our Amazon Elastic Container Registry (Amazon ECR) repository.
Next, we’ll authenticate to the Amazon Elastic Container Registry (Amazon ECR) repository.
Let’s create a new repository.
Next, we’ll create a Docker image and push it to the Amazon ECR repository.
Now let's deploy the sample application.
First, we'll export a few environment variables.
Next, we’ll download the YAML file with the sample metrics.
This file has a namespace called “javajmx-sample” and contains a deployment file for the sample application.
Load generators will help collect a diverse set of metric information.
Now let's apply the configuration file.
All of the traffic generator pods are running.
Now let’s return to the Amazon Managed Grafana console to see if the dashboard has been created.
The dashboard has been created and is collecting information about Java virtual machine (JVM)
CPU usage, JVM memory pool used, JVM threads used, JVM class loading, and more.
By deploying the EKS Observability Accelerator using Terraform modules,
we were able to achieve end-to-end observability without any manual configurations.
You’ve just seen an introduction to Amazon EKS Observability Accelerator.
You can learn more about this topic in the description and links for this video.
Thanks for watching. Now it’s your turn to try.