DevOps Project

The E-commerce is an application that manages an e-commerce inventory. It's a Frontend/Backend application with basic CRUD features, developed using Angular, NodeJS, and it interrogates a MongoDB database.

You can access the website here.

website

Observability

1. Logging

I used winston on nodejs to enable logging those are the logs generated by app datadog I made sure to add the request_id and the ip_address in every log so that it can help us while debugging. log-example

2. Metrics

I used prom-client to configure metrics in my application.

prometheus-target

here request_total metric

prometheus-01

and this is my business logic metric number_product_per_category :

prometheus-02

finally, we can visualize the dashboard on Grafana.

grafana

Automation

I used Terraform to build 2 microstacks:

  • First Stack : Kubernetes Cluster : here I provisioned an AKS cluster, and created resource group where the AKS will be provisioned.

  • Second Stack : Where I created a setup for our webapp using Kubernetes provider as well as Helm provider.

Deployment

We will be building both Back and Front using Docker then we will use Kubernetes in the deployment.

This is the deployment architecture:

Infrastructure