10 Microservice Ecommerce Application CD - ArgoCD
Project overview
Online Boutique is a cloud-first microservices demo application. It is a web-based e-commerce app where you can browse items, add them to the cart, and purchase them.
Objective
Establish a continuous delivery proof-of-concept (PoC) for a microservices-based e-commerce application.
1 week
Tech Stack
Kubernetes, k3d (local), AKS, Terraform, GitOps, Argo CD, Azure DevOps (planned), Grafana (planned), Istio, Kiali
Online Boutique
Requirements
- Use at least 1 hub and 1 spoke cluster for dev and staging environments.
- Follow GitOps principles
- After testing locally with k3d, implement an iaac solution for infrastructure resources
- Make ArgoCD responsive to changes.
- Commit change to the microservices and validate that argocd picks up the new image tag automatically.
Boutique App Demo
Microservices E-commerce App with Continuous Delivery PoC Online boutique app demo
Solution Approach
Multi-cluster Environment: Created a 1-hub, 1-spoke AKS cluster configuration for development and staging environments using Kubernetes and tools like kubectl or k3d for initial local testing.
Infrastructure as Code (IaC): Implemented an IaC solution, using Terraform, to manage infrastructure resource creation and configuration across the clusters.
GitOps Workflow:
Seperated the microservices and k8s yaml manifests repo. Release repository stored application manifests.
Exposed Argo CD server, configured argocd-cmd-params-cm Argo CD for insecure HTTP mode, for interacting with Git repositories, created a secret for ArgoCD to authenticate with the release repo using manifest files.
Decreased the default polling interval from 3 minutes to 10.
Created 2 application manifests, one for hub and one for spoke.
Validation:
Modified the payment service and committed the changes to azure repos.
CD pipeline triggered automatically and updated the images in the release repo.
Verified that Argo CD automatically detected the new version and triggered a redeployment of the payment service with the new image tag.
Hub Spoke Model Demo
Achievements
- Terraform enabled consistent and automated infrastructure provisioning for dev and staging environments.
- 10 seconds sync interval allowed argocd pick up changes more responsively and near real-time.
- CD process was automated.
- Gitops approach enabled consistency across dev and stage environments.
- Reduced errors and repetition by %30 using yaml manifests, which translates to fewer deployment failures, faster rollouts.
Takeaways
10 Microservice Ecommerce Application Continuous Delivery PoC demonstrates the feasibility and advantages of implementing a CD pipeline for microservices applications using tools like Argo CD, IaC, and GitOps principles.