Thursday, June 25, 2020

Observability for Testers : #Session 2

Exciting to be starting the second session of learning "Observability for Testers" 😎. We all were super excited as we had our instances on AWS ready from our previous session. Now that we have our instance it was ready for setting up the DIMA app on it which was one of the main goals for this session. 

The DIMA app is a web app which is built on a microservices architecture. This app allows to upload, display, manipulate and delete the images. This stack also includes the monitoring and observability tool like Kibana, Grafana, Prometheus and Honeycomb. Now that we know a little bit about the app let's start to understand what a microservices architecture is before we get deep dive into the DIMA app architecture. 

Microservices:

I had to give a short introduction about the microservices architecture to everyone. I picked up an easier analogy as an example to give an introduction to microservices architecture. This blogpost seemed to be very helpful that explains very well about introducing this term to someone completely new to this terminology. When I started to learn about microservices I read a lot of blogs by Martin Fowler. 

"Microservices architecture is an architectural style that structures an application as a collection of services. That are highly maintainable, testable, independently deployable and loosely coupled."
                                                                                                                                     
The above definition is from microservices.io. Let's consider an example of a university portal where they have different sections for undergraduate study, postgraduate study, International students, Jobs and courses which serves its own purposes. We can consider these different sections as a simple microservice that serves the business logic and functionality. When we think of building a new feature related to courses or jobs or even maybe for International students, it becomes easier to think of each service and build the functionality for the specific service. Of course, this definitely introduces complexity when we look for testing this as a single service and testing the integration of all these services. Because it doesn't matter whether its a monolith or a microservice or any other type of architecture, for the users it's a single application which they want to use it with ease. 
Few of the examples who use microservices are Netflix, Amazon and eBay. 


Image from https://martinfowler.com/articles/microservices.html
Image from https://martinfowler.com/articles/microservices.htmlAdd caption

Now that we went through a basic understanding of microservices, here's how the structure of DIMA app looks like. Here are the images of architecture and infrastructure took from Abby's GitHub repo.

 Architecture


We can see here there are different services including the GUI and the database : 

  • GUI
  • MongoDB
  • Image Orchestrator
  • Image Holder
  • Image Thumbnail
  • Image flip
  • Image Grayscale
  • Image Size
  • Image Rotator



With all these different services, we need to find out where the problem is so we can figure out what the problem is. So having monitoring and observability tools in place will help anyone to debug the issue. 

After having a little exposure to the architecture and stack we followed the instructions to set up the DIMA  app stack on our instances so we can then trigger requests by adding/deleting/manipulating images and then exploring the logs and traces. 

It was really very helpful to have an understanding of the architecture of the app as it will be helpful while we are looking at the traces or logs and we could see the requests from different services. 
Super looking for the next session as we will get to explore more about logging, tracing and metrics.

Monday, June 8, 2020

Observability for Testers : #Session 1

We all joined this session from different time zones and we were 10 people. The main objective of this session was to build an AWS instance that could be used to build the observability stack created by Abby & Co.  This had a DIMA app which has the capability for uploading, deleting or altering the images. This app is built on microservices architecture which also includes other tools which provided logging, tracing and monitoring. Those tools are Kibana, Grafana, Prometheus, Zipkin and Honeycomb. 

Steps we followed : 


  • The next step was to create IAM user. Identity and Access Management(IAM) enables you to manage access to AWS services and resources securely. Using IAM, we can create and manage AWS users and use permissions to allow and deny their access to AWS resources. An IAM user with admin permissions is not the same thing as the AWS account root user. We need to follow 4 steps to create this user. 
Step 1
Step 1

Step 2

Step 3

Step 3 is optional, we could add the tags and use that as an identifier. It helps keep track of how the resources are being used. It also helps to organize, track or even control the access fo the user. And step 4 is to review the information added and then create the user. 

  • Install docker-machine. Docker machines allow us to create Docker hosts on cloud providers like Azure or AWS. I'm using windows so I used the following command by going to Git Bash. If you using Mac then follow this link for the right command -  https://docs.docker.com/machine/install-machine/


Learning as a group was a very collaborative and fun way to learn, share and tackle the challenges along. After having this session I'm already looking forward to the next session to go through the next steps.