The Challenge of Software Delivery
- Need for faster delivery for new customer requirements and stability of existing systems and services
- Quality product with continuous testing
- Reducing time and cost for deliveries
Solution: DevOps (Dev)
DevOps is the combination of cultural philosophies, practices, and tools that increases an organization’s ability to deliver applications and services at high velocity: evolving and improving products at a faster pace than organizations using traditional software development and infrastructure management processes.
How to implement DevOps?
Transitioning from traditional software development to DevOps is not just about upgrading technologies, but it's also about changing cultural mindset.There are three important pillar for changing mindset, Feedback , Automation and Built in quality. Attitude of shared responsibility is core of devops culture. There should be few best practices can be implemented for DevOps which will help organizations innovate faster for their customers needs.One of the best practices is Continuous Integration and Continuous Delivery/Deployment.
What is Continuous Integration and Continuous Delivery/Deployment?
- Continuous integration (CI) is a software development practice where developers regularly merge their code changes into a central repository, after which automated builds and tests are run.
- The goals of CI are to find and address bugs more quickly, improve software quality, and reduce the time it takes to validate and release new software updates
- Continuous delivery (CD) is a software development practice where code changes are automatically built, tested, and prepared for production release.
- Expands Continuous integration by deploying all code changes to a testing environment, a production environment, or both after the build stage has been completed.
- Revisions are deployed to a production environment automatically without explicit approval from a developer, making the entire software release process automated
Continuous Delivery ≠ continuous Deployment
- Continuous delivery is not where every change /commit is applied to production immediately, but make every commit ready to go to production with the right business approval or decision making
CICD enables to make a commits to deployment to production automated which not requires extra documentation, handovers, project plan, or maintenance window. Deployment becomes automated and tried and tested process multiple times in testing environment.
Benefits of Continuous Delivery
- Automate the Software Release Process
- Improve Developer Productivity- freed from manual tasks, complex dependencies
- Improve Code Quality — early bugs, immediate impact analysis
4. Deliver Updates Faster- respond faster to market changes, security challenges, customer needs, and cost pressure
Example: New banking regulation like Brexit, requires more changes to banks offering, with CICD changes can be rolled out at higher speed than traditional approaches
What teams should look like to implement CICD?
To develop a CICD environment we can have 3 teams with 10 -12 people in each team (2 Pizza teams) :
- Development Team — new feature development, unit tests
- IT Operation (Infrastructure) Team- create and configure Infrastructure to run applications like Cloudformation template or Chef, Puppet
- Application Delivery (Tools) Team — builds and manages CICD pipeline, creates tools for Application and Infra teams, or uses existing ones like bitbucket, GitHub, AWS CodeStar, AWS CodePipeline, AWS CodeCommit, AWS CodeDeploy, and AWS CodeBuild, etc.
Testing in CICD environment
Testing in CICD purely depends on the domain of enterprise it is applied to. As shown in the above diagram, Unit testing of application code entails 70 % of all testing effort, which can be helped to pick defects and bugs in the early development process. As we go bottom-up, the cost for fixing bugs increases exponentially. Also, it is quicker to fix bugs in the early stage compared to later which is UI testing. After Unit testing, we can perform service/ integration testing of different components, followed by compliance or performance testing.
To maintain the high availability of our production environments, we perform a Canary test where we deploy new code on a subset of servers or a subset of regions before a full roll-out.
Best Practices of CICD:
Set of services offered by AWS for CICD:
- AWS CodeCommit
- AWS CodeBuild
- AWS CodeDeploy
- AWS CodePipeline — flexibility to integrate each service independently with your existing tools.
- AWS CodeStar -rapidly orchestrate an end-to-end software release workflow using these services
We will go into the details of each service in our next blog posts.
That all being said, the reality with CICD is this :)
See you next time!
Note: No copyright infringement is intended for the above images. This is purely for educational purposes.