Solution Concept: Mastering the journey to the Cloud
Solution concept and PoC for Cloud Migration
Project Context and Goals
- Establish a DevOps workflow and best practices for
- Migration (and modernization) of existing Web apps to the Cloud
- Development of new Web apps for the Cloud - “Cloud first approach”
- Establish an end-to-end DevOps environment that supports Continuous Integration/Continuous Deployment (CI/CD)
- CI/CD Pipeline to build, test and deploy in the Cloud
- Evaluate GitHub Actions, AWS CodeBuild
- Evaluate Rolling Deployment vs Blue-Green Deployment
- Use Cloud native technologies and tools
- no vendor lock-in
- Proof of concept
What is Cloud native?
Cloud native technologies empower organizations bo build and run scalable applications in modern, dynamic environments such as public, private, and hybrid clouds. Containers, service meshes, microservices, immutable infrastructure, and declarative APIs exemplify this approach.
These techniques enable loosely coupled systems that are resilient, manageable, and observable. Combined with robust automation, they allow engineers to make high-impact changes frequently and predictably with minimal toil.*
Cloud Migration Strategies
![](/niko-consulting-website/blog/2023/02/27/solution-concept-mastering-the-journey-to-the-cloud/cloud-migration-strategies_hub71ca29066a99e0ca4dfb295ed010625_170327_1200x0_resize_catmullrom_3.png)
Strategies for migrating legacy (monolitic) apps
Cloud Ready Migration (aka “Lift-and-Shift” or “Rehost”)
- No code changes
- IaaS model
- Cloud providers usually provide migration tools like the AWS MigrationHub or Azure Migrate
- Quick and therefore cheap, yet does not levarege most of the benefits of Cloud Computing
Cloud Optimized Migration
- Requires minimal code changes
- PaaS model
- Containerization of the App and deployment to a Container Orchestrator
- Decomposition into Microservices
- Data-Driven Microservices (CRUD)
- Consuming Cloud managed services like Databases, Caching, Monitoring, Message Queues
- Deployment optimizations (CI/CD) that enable key cloud services without changing the core architecture
- Higher costs and overhead, yet better scalability and performance, levareges most of the benefits of Cloud Computing
Cloud Native Migration
- Requires rearchitecting and rewriting code
- Microservices Architecture (Decomposition into Microservices and Containerization)
- Data-Driven Microservices (CRUD)
- Domain-Driven Microservices (CQRS, Event Sourcing)
- Serverless Architecture
- Event-Driven Architecture
- API-Management, API-Gateway
- Highest costs, yet future-proof investment (fine-grained scalability, improved system resiliency, performance and operations), all benefits of Cloud Computing
References
- 6 Strategies for Migrating Applications to the Cloud
- Introduction to Cloud-native applications
- Modernizing legacy apps
Proof of Concept Goals
- Migrate an existing Web-based application to the Cloud using the 2. Migration Strategy - “Cloud Optimized Migration”
- Produce a cloud native reference application on AWS Cloud to showcase using Laravel, Docker, GitHub, Cloud managed services and CI/CD pipeline to build a simplistic minimal php based application.
Migration of a (monolitic) Web App
Architecture Overview Monolitic Web App Architecture, deployt on-premises
Cloud Optimized Architecture - Development/Staging Environment Cloud Optimized Web App Architecture (local development and staging)
*Service Aggregator Pattern / API Gateway
Cloud Optimized Architecture - Production Environment Cloud Optimized Web App Architecture (production)
*Service Aggregator Pattern / API Gateway
Summary and Outlook
How would a Cloud-native architecture look like? Here are some recommendations.
![](/niko-consulting-website/blog/2023/02/27/solution-concept-mastering-the-journey-to-the-cloud/cloud-native-web-app-architecture-prod_hu01c873451dedf2fb8ee1653649e8fe5a_211938_1200x0_resize_catmullrom_3.png)
Cloud-native Web App Architecture
Microservices, Event-Driven Architecture, API Gateway
- Topics not touched: Security, backup services, monitoring
- Should be required in the future that multiple front-end clients must be supported (SPA, mobile clients) and/or exposing many complex APIs
- Introduce an API Gateway or even API Management
- If appropriate - move from “single/shared database” model to “share nothing” model where each microservice owns its data
- Event Driven Architecture: use events for communication between microservices, in a decoupled, reliable and asynchronous manner
- For local development RabbitMQ can be used as a Message Broker
- In the AWS Cloud use a fully managed integration message broker - Amazon MQ (supports Active MQ and RabbitMQ)
- Serverless: consider using a single function where sufficient (not customer-facing, single operation) instead of developing and maintaining a full microservice
- Configure centralized logging - CloudWatch
Reference Web App
Info
Sources: AWS ECS Laravel Demo
Main focus: DevOps Workflow, CI/CD
Cloud Optimized Reference Web App - Development/Staging Environment Cloud Optimized Reference Web App Architecture (local development and staging)
![](/niko-consulting-website/blog/2023/02/27/solution-concept-mastering-the-journey-to-the-cloud/cloud-opt-reference-web-app-architecture-prod_hu8382fa007ca6bc9abcf013dec10660c9_85209_1200x0_resize_catmullrom_3.png)
Cloud Optimized Reference Web App Architecture (production)
Basic Features
- Sign in and out
- Registration flow
- Password reset flows
- Review and Edit user’s profile
Non-Functional Requirements of the Reference App
- High availability
- (Optional) Scale out and in automatically to meet increased traffic
- Support an agile development process, including CI/CD
- For simplicity, support only traditional Web front ends (no SPA, no mobile clients)
- The design should support
- cross-platform development (no platform lock-in) and
- cross-platform hosting (no cloud vendor lock-in)
Evaluated and leveraged technologies and tools
- CI/CD: GitHub-Actions, CodeBuild
- Centralized configuration: S3 Service (storage, configuration)
- Secure Credentials: Secrets Manager (SSM)
- Container Registry: private registry (S3-based) / ECR
- Container Orchestrator and Clustering - ECS
- ECS with AWS Fargate launch type (serverless)
- Load Balancing (ELB)
- Data stores: MySql/MariaDB (RDS)
- Caching, Session management, Queueing (MemoryDB Cluster for Redis)
DevOps Workflow for Dockerized Web Apps
Local Development Workflow Local Dev Workflow
DevOps Workflow in the Cloud (AWS) DevOps Workflow on AWS