BuildPiper Powers Apna Mart’s Zero-Downtime Migration from Azure to GCP Across 27 Microservices

apnamart-logo

A franchise-driven, omnichannel grocery and retail chain bringing 10–15 minute delivery and neighborhood supermarts to India's tier-2 and tier-3 cities, across 200+ stores.

Ecommerce

Ready to Accelerate Your Engineering Efficiency?

Achieve 99.99% Uptime with Intelligent DevSecOps

Problem Statement

Apna Mart runs a live, always-on retail and grocery platform spanning 200+ stores and a fast-growing online delivery business, backed by infrastructure, CI/CD, configuration management, 27 microservices, middleware, and production databases on Microsoft Azure. As the business scaled into more tier-2 and tier-3 markets, Apna Mart needed to move its entire stack to Google Cloud Platform — without pausing store operations or online orders even for a moment. The migration was not a single lift-and-shift: it spanned infrastructure-as-code, CI/CD pipelines, configuration management, AKS-to-GKE microservice migration, middleware re-platforming, and a production database cutover, all under strict security and compliance requirements. Apna Mart brought in BuildPiper to orchestrate this multi-layer, end-to-end migration as a governed, automated program rather than a manual, high-risk cutover. 

Top 3 Achievements

Full Azure-to-GCP migration, orchestrated end-to-end through BuildPiper

Infrastructure, CI/CD, configuration, 27 microservices, middleware, and the production database were all migrated to GCP through a single, governed BuildPiper-driven program. 

Minimum-downtime cutover for a live retail platform

27 microservices moved from AKS to GKE and the production database cut over to AlloyDB, with rolling updates, continuous replication, and automated validation keeping Apna Mart’s stores and app online throughout. 

100% automated, drift-free configuration across every environment

BuildPiper-integrated Ansible pipelines brought OS hardening, secrets, and middleware provisioning under continuous, version-controlled delivery eliminating manual, inconsistent environment setup. 

Challenges

Rebuilding Azure infrastructure on GCP without service interruption

VPC, subnets, IAM, NAT, GKE, GAR and more needed to be reproduced on GCP with the same reliability Apna Mart's stores depended on, while keeping every change reviewable and reversible. 

No unified CI/CD across infrastructure, containers, and microservices

Terraform, container builds, and microservice deployments were not governed by a single, consistent pipeline, increasing the risk of manual error during a large-scale migration. 

Configuration drift across environments

OS hardening, agents, secrets, and provisioning for Redis, OpenSearch, and RabbitMQ were handled inconsistently across dev, QA, staging, and prod, risking environment-specific failures post-migration. 

Migrating 27 microservices from AKS to GKE with zero downtime

15 frontend and 12 backend microservices needed redesigned service discovery, scaling, health probes, and secrets management all while the live platform kept serving customers and franchise stores. 

Re-platforming stateful middleware without data loss or performance regression

Redis, OpenSearch, Elasticsearch, RabbitMQ, and Kafka all needed to move from AKS-based infrastructure to GCP including Memorystore and optimized VM-based clusters without disrupting dependent services. 

Cutting over the production database under strict security constraints

The production database had to move to AlloyDB with minimal downtime and full validation, while every step of the migration enforced restricted access, IP whitelisting, controlled ports, and vulnerability scanning. 

Solutions

Modular Terraform IaC, governed through BuildPiper pipelines

BuildPiper orchestrated the complete GCP infrastructure rebuild :- VPC, subnets, IAM, NAT, GKE, GAR and more through modular Terraform with automated fmt, validate, Checkov, plan, and apply stages gated before every change.

Unified CI/CD across Terraform, containers, and microservices

BuildPiper automated linting, security scanning, testing, image builds, and deployments in a single pipeline, enabling zero-touch provisioning with automated post-deployment validation at every stage.

Ansible configuration management delivered continuously through CI/CD

Modular Ansible roles for OS hardening, agent installation, secrets, and Redis/OpenSearch/RabbitMQ provisioning were integrated into BuildPiper pipelines, achieving 100% automated, drift-free configuration across environments.

Governed AKS-to-GKE migration for all 27 microservices

BuildPiper-driven pipelines redesigned service discovery, scaling, probes, and secrets for every microservice, and rolled them out via rolling updates with automated validation to guarantee zero downtime.

Middleware re-architected and migrated through BuildPiper pipelines

Redis was migrated to Memorystore; OpenSearch, Elasticsearch, and RabbitMQ moved to GCP VM-based infrastructure; and Kafka was re-architected from AKS into an optimized, VM-based cluster.

Production database cutover via GCP DMS with security built in

BuildPiper orchestrated continuous replication to AlloyDB through GCP DMS, followed by a minimal-downtime cutover with full validation — enforcing restricted access, IP whitelisting, controlled ports, and vulnerability scans throughout.

Outcomes

27 microservices (15 frontend, 12 backend) migrated from AKS to GKE with zero downtime 

100% automated, drift-free configuration achieved across all environments 

Minimal-downtime production database cutover to AlloyDB via continuous GCP DMS replication 

65% faster infrastructure provisioning with modular Terraform and BuildPiper-driven CI/CD 

75% reduction in manual deployment effort through zero-touch provisioning and automated validation 

Zero critical security findings at go-live, backed by Checkov, vulnerability scans, and access controls

Full infra, microservices, middleware, and database migration completed in 4.5 weeks 

Consistent, governed CI/CD retained across Terraform, containers, and microservices post-migration 

Read Blogs