Introduction¶
Our DevOps process is meticulously designed to prioritize performance, security, efficiency, and automation, ensuring a seamless and reliable software delivery process. The setup adheres to the following core principles:
Automation¶
From the moment a developer commits code to the deployment of changes for end users, every step is fully automated. This automation eliminates manual errors, accelerates the deployment process, and enhances system reliability.
-
Tools and Integration:
- GitHub Actions: Orchestrates automated testing, builds, and workflows.
- AWS CodePipeline: Manages the build, test, and deploy phases for backend services.
- Cloudflare GitHub Integration: Automates frontend deployment and caching updates.
- AWS Cloudwatch: Centralized logging infrastructure.
- Newrelic: Application performance monitoring and error tracking.
This comprehensive approach ensures that developers can focus on innovation while the system handles repetitive and time-intensive tasks.
Continuous Integration¶
Every code change undergoes rigorous testing and validation to maintain code quality and system stability.
- Testing Workflow:
- Backend Services:
- GitHub Actions are triggered on every commit to run unit and functional tests, ensuring code correctness.
- A detailed report, including test coverage metrics, is generated for review.
- Frontend Web Applications:
- For each Pull Request (PR), a deploy preview URL is generated, enabling real-time testing of changes by both the developer and the product manager.
- Backend Services:
- Pull Request Review Process:
- PRs must pass the defined test criteria and undergo thorough peer reviews before merging, ensuring high-quality code contributions.
This phase guarantees that only well-tested and reviewed changes progress further in the process.
Continuous Deployment¶
Once changes pass all acceptance criteria, deployment to end users is just a Pull Request merge away.
- Backend services are deployed automatically via AWS CodePipeline and ECS, ensuring consistent and predictable deployments.
- Frontend applications are seamlessly deployed using Cloudflare, providing near-instant updates to end users.
This process reduces deployment delays and ensures a continuous flow of updates.
Reliability¶
Reliability is a cornerstone of our continuous deployment (CD) strategy. A reliable system not only ensures consistent performance after deployment but also provides robust mechanisms to monitor, diagnose, and address any issues that arise.
Consistent Stability
- Deployed systems are designed to operate smoothly and predictably, ensuring that users experience minimal disruptions or downtime.
- Rigorous testing during the continuous integration (CI) phase helps identify and address potential stability issues before deployment.
Comprehensive Monitoring and Observability
- Logging: Ensures all system activities are recorded and accessible for troubleshooting and auditing.
- Observability: Real-time monitoring tools like AWS CloudWatch and New Relic provide insights into system health, enabling early detection of issues such as slow performance or resource bottlenecks.
Proactive Issue Diagnosis
- With reliable access to logs and performance data, teams can quickly diagnose and resolve issues, reducing mean time to recovery (MTTR).
- Integrated alerting systems, such as Slack notifications, allow for immediate action when critical issues are detected.
Downtime and Performance Bottleneck Alerting
- Real-time alerting ensures that any signs of instability, whether caused by slow performance, high resource usage, or service interruptions, are promptly communicated to the team.
- Automated alerts empower teams to respond proactively, mitigating potential user impact.
Easy Rollbacks¶
Despite comprehensive automation and testing, unexpected bugs or issues may occasionally reach end users. Our system is designed for swift and secure rollbacks.
- Frontend Applications:
- Rollbacks are managed using the Cloudflare Deploy Versions dashboard, allowing quick reversion to a stable version.
- Backend Services:
- AWS ECS provides a rollback mechanism for tasks, enabling reversion to previously deployed containers for affected ECS services.
This rollback strategy ensures minimal disruption to users while maintaining system integrity.
By following these guidelines, our DevOps process achieves:
- High Performance: Efficient pipelines and automated workflows enable rapid delivery.
- Robust Security: Fine-grained access controls and resource-level permissions ensure only authorized access to critical systems. Rigorous testing, peer reviews, and controlled rollbacks further safeguard deployments.
- Operational Efficiency: Automation reduces manual workload, freeing teams to focus on innovation.
- Scalability: The system is designed to adapt and grow with the application’s demands. 🚀💡
Backend Service - Sequence Diagram - Developer to Github¶
sequenceDiagram
autonumber
Developer->>Github: Setup PR
loop Change Verification
note right of Github: Trigger github actions
Github->>Github: run unit/functional/system tests
Developer->>Github: verify results and apply fixes
end
Developer->>Github: Merge PR to target branch
Github->>AWS Codepipeline: Trigger Deploy Workflow Backend Service - Sequence Diagram - Github to AWS¶
sequenceDiagram
autonumber
Github->>AWS Codepipeline: Trigger Deploy workflow
rect
note right of AWS Codepipeline: stage - clone code & build
AWS Codepipeline->>Github: Clone target branch
AWS Codepipeline->>AWS Codebuild: Build Docker
AWS Codebuild->>AWS ECR: Update Docker Image to Registry
AWS Codebuild->>AWS Codepipeline: Update artifacts with image definitions
end
rect
note right of AWS Codepipeline: stage - deploy
AWS Codepipeline->>AWS ECS: Deploy Fargate tasks
AWS ECR->>AWS ECS: Provide Latest Image
AWS ECS ->> AWS Load Balancer: stable task group
note right of AWS Load Balancer: Internet Facing
AWS Load Balancer ->> Cloudflare: new changes available over api
end
Frontend Webapp - Sequence Diagram¶
sequenceDiagram
autonumber
Developer->>Github: Setup PR
Github->>Cloudflare: Github actions triggers deploy preview url request
Cloudflare->>Github: Update deploy preview url in PR
loop Change Verification
Developer->>Github: Go through PR Template
Developer->>Cloudflare: Manually verify changes in deploy preview url
end
Developer->>Github: Merge to target branch
Github->>Cloudflare: Github actions triggers production deploy
note right of Cloudflare: Enduser is able to access changes
Cloudflare-->>Enduser: Changes visible on website