Logo

dev-resources.site

for different kinds of informations.

How to run Apache SkyWalking on AWS EKS and RDS/Aurora

Published at
12/13/2022
Categories
skywalking
observability
demo
aws
Author
guoyuecn
Categories
4 categories in total
skywalking
open
observability
open
demo
open
aws
open
Author
8 person written this
guoyuecn
open
How to run Apache SkyWalking on AWS EKS and RDS/Aurora

Original link:https://skywalking.apache.org/blog/2022-12-13-how-to-run-apache-skywalking-on-aws-eks-rds/

Introduction

Apache SkyWalking is an open source APM tool for monitoring and troubleshooting distributed systems, especially designed for microservices, cloud native and container-based (Docker, Kubernetes, Mesos) architectures. It provides distributed tracing, service mesh observability, metric aggregation and visualization, and alarm.

In this article, I will introduce how to quickly set up Apache SkyWalking on AWS EKS and RDS/Aurora, as well as a couple of sample services, monitoring services to observe SkyWalking itself.

Prerequisites

AWS account

We can use the AWS web console or CLI to create all resources needed in this tutorial, but it can be too tedious and hard to debug when something goes wrong. So in this artical I will use Terraform to create all AWS resources, deploy SkyWalking, sample services, and load generator services (Locust).

Architecture

The demo architecture is as follows:

Image description

As shown in the architecture diagram, we need to create the following AWS resources:

  • EKS cluster
  • RDS instance or Aurora cluster

Sounds simple, but there are a lot of things behind the scenes, such as VPC, subnets, security groups, etc. You have to configure them correctly to make sure the EKS cluster can connect to RDS instance/Aurora cluster otherwise the SkyWalking wonโ€™t work. Luckily, Terraform can help us to create and destroy all these resources automatically.

I have created a Terraform module to create all AWS resources needed in this tutorial, you can find it in the GitHub repository.

Create AWS resources

First, we need to clone the GitHub repository and cd into the folder:

git clone https://github.com/kezhenxu94/oap-load-test.git
Enter fullscreen mode Exit fullscreen mode

Then, we need to create a file named terraform.tfvars to specify the AWS region and other variables:

cat > terraform.tfvars <<EOF
aws_access_key = ""
aws_secret_key = ""
cluster_name   = "skywalking-on-aws"
region         = "ap-east-1"
db_type        = "rds-postgresql"
EOF
Enter fullscreen mode Exit fullscreen mode

If you have already configured the AWS CLI, you can skip the aws_access_key and aws_secret_key variables. To install SkyWalking with RDS postgresql, set the db_type to rds-postgresql, to install SkyWalking with Aurora postgresql, set the db_type to aurora-postgresql.

There are a lot of other variables you can configure, such as tags, sample services count, replicas, etc., you can find them in the variables.tf.

Then, we can run the following commands to initialize the Terraform module and download the required providers, then create all AWS resources:

terraform init
terraform apply -var-file=terraform.tfvars
Enter fullscreen mode Exit fullscreen mode

Type yes to confirm the creation of all AWS resources, or add the -auto-approve flag to the terraform apply to skip the confirmation:

terraform apply -var-file=terraform.tfvars -auto-approve
Enter fullscreen mode Exit fullscreen mode

Now what you need to do is to wait for the creation of all AWS resources to complete, it may take a few minutes. You can check the progress of the creation in the AWS web console, and check the deployment progress of the services inside the EKS cluster.

Generate traffic

Besides creating necessary AWS resources, the Terraform module also deploys SkyWalking, sample services, and Locust load generator services to the EKS cluster.

You can access the Locust web UI to generate traffic to the sample services:

open http://$(kubectl get svc -n locust -l app=locust-master -o jsonpath='{.items[0].status.loadBalancer.ingress[0].hostname}'):8089
Enter fullscreen mode Exit fullscreen mode

The command opens the browser to the Locust web UI, you can configure the number of users and hatch rate to generate traffic.

Observe SkyWalking

You can access the SkyWalking web UI to observe the sample services.

First you need to forward the SkyWalking UI port to local

kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=skywalking -l component=ui -o name) 8080:8080
Enter fullscreen mode Exit fullscreen mode

And then open the browser to http://localhost:8080 to access the SkyWalking web UI.

Observe RDS/Aurora

You can also access the RDS/Aurora web console to observe the performance of RDS/Aurora instance/Aurora cluste.

Test Results

Test 1: SkyWalking with EKS and RDS PostgreSQL

Service Traffic

Image description

Image description

RDS Performance

Image description

Image description

Image description

SkyWalking Performance

Image description

Image description

Image description

Image description

Image description

Test 2: SkyWalking with EKS and Aurora PostgreSQL

Service Traffic

Image description

Image description

RDS Performance

Image description

Image description

Image description

SkyWalking Performance

Image description

Image description

Image description

Image description

Image description

Clean up

When you are done with the demo, you can run the following command to destroy all AWS resources:

terraform destroy -var-file=terraform.tfvars -auto-approve
Enter fullscreen mode Exit fullscreen mode
demo Article's
30 articles in total
Favicon
Using Disposable Emails for a Demo
Favicon
Profylix
Favicon
Demo: Automating GitHub Repo Configuration and Security with Minder
Favicon
How to do great live demos โ€” and why theyโ€™re important to get right
Favicon
Flems.io
Favicon
Three Tips for Your Next (Software) Demo
Favicon
Using Valibot for Recursive Schema Validation
Favicon
Demo: Minder, a software supply chain security platform from Stacklok
Favicon
asdsadasd
Favicon
Building an Anime Recommendation System with PySpark in SageMaker
Favicon
Demo Highlight: Acey-Deucey
Favicon
Demo Highlight: Asteroids
Favicon
Writting Simple OnceCell
Favicon
How to build a demo project
Favicon
Playing around with Ultra HDR
Favicon
Odoo CRM Demo
Favicon
Odoo Demo
Favicon
demo
Favicon
Demo Highlight: 2dVis
Favicon
Pimcore Demo installed locally but can not log into Admin using the credentials set at the time of installation
Favicon
Learn how to access webcam and take photo with JavaScript
Favicon
Futuristic Dial Button โ˜Ž
Favicon
Python SEO Keyword Research Tool: Google Autocomplete, People Also Ask and Related Searches
Favicon
Enterprise Power BI Series
Favicon
Dropshipping Research Tool Demo in Python
Favicon
How to run Apache SkyWalking on AWS EKS and RDS/Aurora
Favicon
New js framework
Favicon
Top 10 trending github repos for Java developers in this week๐Ÿธ.
Favicon
Floating Islands WebGL demo ๐Ÿ‡บ๐Ÿ‡ฆ
Favicon
ReactJS Demo Project - Party Planner Web App - Github

Featured ones: