Multi-stack Microservice Application deployment on Azure Kubernetes Services
utilising Azure DevOps pipelines
This e-commerce application consists of 10 distinct microservices developed in various languages. The entire architecture is seamlessly orchestrated through gRPC communication, ensuring efficient and lightweight inter-service interactions.
HIGH LEVEL MICROSERVICES ARCHITECTURE OVERVIEW:
1. Frontend (Go):
— Exposes an HTTP server to serve the website.
— Provides a seamless user experience without requiring signup/login.
— Automatically generates session IDs for all users. Communicates with other microservices via gRPC for streamlined data exchange.
2. Cartservice (C#):
— Stores and retrieves items in the user’s shopping cart using Redis.
— Ensures efficient and secure management of shopping cart data. Utilizes gRPC for communication with other services, ensuring real-time updates.
3. Productcatalogservice (Go):
— Retrieves the list of products from a JSON file.
— Productcatalogservice enables product search and retrieval of individual product details. Employes gRPC to seamlessly share product details with other microservices.
4. Currencyservice (Node.js):
— Converts money amounts between different currencies.
— Fetches real-time currency conversion rates from the European Central Bank.
— High QPS (Queries Per Second) service for swift currency conversions.
5. Paymentservice (Node.js):
— Manages payment transactions securely. Charges the provided credit card information (mock) with a given amount. Returns a transaction ID for seamless payment processing.
— Utilizes gRPC to communicate with other microservices for cohesive order processing.
6. Shippingservice (Go):
— Provides shipping cost estimates based on the user’s shopping cart.
— Simulates the shipment of items to the specified address.
7. Emailservice (Python):
— Sends users order confirmation emails (mock) for a personalized and informative post-purchase experience.
8. Checkoutservice (Go):
— Retrieves user carts. Utilizes gRPC to coordinate interactions between payment, shipping, and email services.
— Orchestrates the order preparation process, including payment, shipping, and email notification.
9. Recommendationservice (Python):
— Recommends additional products based on the items present in the user’s cart.
10. Adservice (Java):
— Generates text ads based on given context words, enhancing product visibility.
11. Loadgenerator (Python/Locust):
— Continuously sends requests, mimicking realistic user shopping flows to the frontend.
— Ensures the system’s robustness and performance under varying loads.
Technologies Utilized:
- Languages: Go, C#, Node.js, Python, Java
- Data Storage: Redis (Cartservice), JSON files (Productcatalogservice)
- External Data Source: European Central Bank (Currencyservice)
- Mocking Services: Mock credit card transactions, mock email sending
LOW-LEVEL STEPS OF DEPLOYMENT:
Step-1: Cluster Creation on Azure Aks
a. Login to the Azure portal for the deploying of the Aks cluster
b. Navigate to Kubernetes services and start the deployment of the Azure Kubernetes services cluster.
c. Configure Networking settings and IAM roles under networking section (ensure all necessary ports are open for communication) while configuring the aks cluster. Review + create the cluster and wait for it to be provisioned. Once, the cluster status shows as running/active you can go ahead and add Node pools.
Step-2: Creation of project on Azure DevOps Organisation
a. create a project in Azure DevOps Organisation.
b. Make sure that the classic creation of build an release pipeline setting is disabled at the organisation level.
c. Import the Github repository to Azure Repos. This might take a few minutes to fetch the repo to Azure.
d. Repository Structure Overview: Upon importing the repository, there will be multiple files and folders. These files are being utilised for the deployment of the multi-stack microservices based application.
e. High Level Deployment Workflow:
1. Microservices Implementation (src Folder):
— The “src” folder contains the microservices, each with its dedicated folder encapsulating the source code and related data.
2. Docker Image Creation:
— Dockerfiles within individual microservice folders facilitate the creation of Docker images.
— These images encapsulate the microservices along with their dependencies, ensuring consistency across diverse deployment environments.
3. Kubernetes Manifest Configuration:
— The “/release/kubernetes-manifest.yaml” file serves as the deployment blueprint for Kubernetes.
— Within this manifest file, developers explicitly specify the Docker image for each microservice, streamlining the deployment process.
Step-3: Create release pipeline
Step-4: Configure the Agent Job
a. Configure the Job — Kubectl> Add. Establish a Kubernetes service connection and select the details of the Kubernetes cluster that we configured so that the deployment can be done via the release pipeline.
b. Once the details are filled completely, click on create release pipeline and monitor the logs while the deployment is in progress. This might take sometime because 10–12 pods will be deployed.
Step-5: Validation
a. Multiple deployments and pods will be visible under workloads section based on the microservices that we deployed.
b. In order to access the application, navigate to services and ingresses. There is a Load balancer service “frontend-external” deployed in order to the access the application using external IP address.
This E-commerce Microservices Architecture project aims to provide a depiction of a seamless, scalable, and resilient application, with each microservice contributing to the overall efficiency and functionality of the system.
Github repo- https://github.com/Muskantomar001/Multi-stack_microservices_Application_deployment-AKS.git
Thanks! There will be more cloud computing and DevOps related articles to follow.
References:
About me:
Hi 👋, I’m Muskan Tomar , a passionate Engineer from India working on Cloud & DevOps projects for 3 years now.
Azure Solutions Architect | Azure DevOps | SecurityEngineer | dministrator Associate| Kubernetes & Docker | Terraform
Reach me out on:
LinkedIn: https://www.linkedin.com/in/muskan-tomar-b3566615a/
Email: muskantomar001@gmail.com
Portfolio: muskantomar001.github.io