Instana U

 View Only

Automate Instana Synthetic PoP Deployment with AWS CloudFormation

By Hai Jun Xu posted Tue June 06, 2023 09:12 PM

  

Co-Authors: 

Hai Jun Xu (xuhjbj@cn.ibm.com) - Developer for Instana Synthetic PoP

Rong Zhu Shang (shangrz@cn.ibm.com) - Developer for Instana Synthetic PoP

Jun Shi Wang (wjunshi@cn.ibm.com) - Developer for Instana Synthetic PoP

Li Jing Mu (lijingmu@cn.ibm.com) - Developer for nstana Synthetic PoP
Rui Yin (yinrui@cn.ibm.com) - Tech lead for Instana Synthetic

About AWS CloudFormation

AWS CloudFormation is a service that helps you model and set up your AWS resources so that you can spend less time managing those resources and more time focussing on applications that run on AWS. You need to create a template that describes all the AWS resources that you want (like Amazon EC2 instances or EKS instances), and CloudFormation takes care of provisioning and configuring those resources for you. You don't need to create and configure AWS resources individually.

About Instana Synthetic monitoring 

Instana Synthetic monitoring, also known as proactive monitoring, can simulate actions that a user takes on an application from different locations, and continuously monitors at a specific interval for performance characteristics, such as availability and response time. As of now, it is built on the Instana product and provides a fully integrated solution with other Instana capabilities. It allows you to create Synthetic tests to monitor an application.
Synthetic PoP (Point of Presence) is the agent, where the Synthetic tests are executed. Synthetic PoP needs to be deployed in a Kubernetes cluster. 

Using Synthetic PoP on AWS 
In this post, we propose an automation method to deploy the Instana Synthetic PoP on public cloud with AWS CloudFormation.

For deployment of the application on public cloud, you need to think about the complexity of the deployment and also the cost of the required resources. We provide a simple way to deploy Instana Synthetic PoP (PoP) in AWS by using the cloud formation.Take the following steps to implement the automation deployment of the PoP on AWS.
AWS CloudFormation is used to automate the deployment of Synthetic-PoP on AWS Cloud.


Prerequisite

You need to get the AWS CLI and IAM user credentials, which are used to access the AWS EC2 instance and deploy the Instana Synthetic PoP.

 To automate the deployment of the PoP on AWS, do the following:

      1.    Install AWS CLI by using this link.

   https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

      2.    Set up your AWS credentials (IAM user).

  Create IAM users by using the following link to AWS guide: https://docs.aws.amazon.com/cli/latest/userguide/cli-authentication-user.html


  You can automate the deployment of Synthetic-PoP by doing the following

         1.     You can download and modify the template file named synthetic-pop-ec2.yml, which is included in this box link

         If you want to modify AWS resources and input customized synthetic-pop parameters, please refer to the CloudFormation Documentation PoP Deployment


         2.     Sign in to the AWS CloudFormation UI. Click the Create stack button:


3.  Click the Upload a template file. Click Choose file with synthetic-pop-ec2.yml.
     

 4.  Click View in Designer, and the main components are shown in the Designer view. 

In above Designer view, there are defined four AWS Resources such as HTTPSecurityGroup, SSHSecurityGroup, ElasticIp and KubernetesInstance. You can also modify and add other AWS Resources as needed. For example, to the kubernetesInstance resource, you can also install other related kubernetes distributions supported by Synthetic PoP.  


Edit and validate the template. After validation, go to next step.

5. Create a stack with your parameters.

Input the Stack name and other parameters required by Synthetic PoP as shown in the following screenshot:

   

After inputting the parameters click Next button. This takes you to Step 3. In Stack failure options, click Roll back all stack resources.

6. Click Next button to go to Step 4. Click Submit button to view the stack Events as shown in the following screenshot:


Note: The Events tab shows the status during the stack creation, which helps to  check any error while processing the information.You'll see the synthetic-pop stack created with 4 Resources in the dashboard.


7. Check the Synthetic-PoP from EC2 instance.

 7.1. Click the Instance ID of KubernetsInstance link to get the EC2 access information.

7.2. Click Connect to instance to get the access methods:

7.3. Run the following commands to check if the Instana Synthetic PoP is deployed  successfully. 

[ec2-user@ip-172-31-82-82 ~]$ kubectl get pods -n syn

NAME                                                                      READY   STATUS    RESTARTS   AGE

synthetic-pop-redis-6f7cf6b5fb-d4d7w                                      1/1     Running   0          12m

synthetic-pop-controller-57497bd49b-szfc9                                 1/1     Running   0          12m

synthetic-pop-http-playback-engine-c9c5767b4-2fqbj                        1/1     Running   0          12m

synthetic-pop-javascript-playback-engine-7b5b479bc8-6qkpf                 1/1     Running   0          12m

 

8. Delete the stack:

     To remove the synthetic-pop stack and all the related resources, click the Delete button.

     Note: The Resources are deleted as shown in the following screenshot


Conclusion:

As a Site Reliability Engineers (SREs), we can use CloudFormation to achieve automated deployment of Synthetic PoP on AWS cloud, which greatly improves the operational tasks efficiencies.  

Next: 

If want to know how to monitor Synthetic PoP's health, please reference to this blog: Monitoring Synthetic PoP by Using Instana host agent.


#synthetic-pop

Permalink