The Clappia platform is built using Microservices architecture. We have more than 30 backend services, as well as multiple user-facing and internal web and mobile applications, which makes managing build and deployment a complex and time-consuming task.
To streamline this process and avoid delays in production releases, we have implemented an automated system that manages the code from the moment it is pushed to the repository all the way through the build and test stages, and finally to the production environment, ensuring that all of our applications are consistently and efficiently delivered to our users.
In this article, we describe the setup of this Automated System.
The Automated Build System uses three AWS Accounts -
In this section, we have described the release Workflow.
The code for the entire platform is stored in AWS CodeCommit. Once the developers commit their changes, these changes are reviewed by other team members and, if approved, merged into the master branch in CodeCommit. This process occurs continually throughout the sprint and may involve the implementation of new features, platform improvements, or bug fixes.
We have configured an AWS EventBridge Rule to automatically trigger the build of our staging environment on a weekly basis at a specific day and time. At this time, the recent changes from CodeCommit are retrieved by CodeBuild. Each repository includes a buildspec.yml file that outlines the build procedures for Staging and Production environments. CodeBuild executes these procedures from the Staging buildspec.yml file and finishes the build process.
The CodeBuild process defined in the previous step also includes commands for releasing the code to the staging environment. For backend microservices, we use the Serverless framework to deploy to AWS Lambda and API Gateway. Web applications are deployed to AWS CloudFront, and Android apps are pushed to the Internal testing track on the Google Play Store.
Once all the code moves to the Staging environment, all the changes are tested. Some tests are automated and some are manual. If some issues are found in testing, thenext steps are manually canceled.
The code remains in the staging environment for two days, during which it is tested. After this period, another EventBridge Rule triggers AWS CodeBuild to perform a production build. This process also retrieves the recent changes from CodeCommit and executes the production build procedure defined in the production buildspec.yml file.
Once the Production CodeBuild finishes, all the production resources - backend services on AWS Lambda and API Gateway, web applications on S3 and CloudFront and mobile Apps on Google PlayStore are also released.
The same is repeated automatically on a Weekly basis.
Following are some of the benefits that we got after setting up the Automated Release System:
Build Apps That Fit Your Business OperationsGet Started - It's free