Continuous Delivery of Microservices
This talk is about the best practices to be followed for continuous delivery of a microservices based application.
Continuous integration (CI) is a development practice that is observed in most teams. But it is not enough to ensure that your commit is ready for production deployment.
In a micro services architecture, the build artifact of each service generated by the CI system needs to be production ready. One needs to be able to answer questions like:
Will all services work together after a change without any issues?
Do you have enough infra automation to take each service to production for every commit?
Are you ready to do production deployment anytime your business demands? If not then you are not practicing CD - Continuous Delivery or Deployment (There is a subtle difference in there).
At the end of the talk, the audience will walk away knowing:
Key principles of Continuous Delivery
Common pitfalls to avoid while practicing CI/CD
Issues that crop up while practicing CD with microservices
Guidelines on how to practice CD with microservices
How CI is practiced widely but not CD
Why Continuous Delivery and Deployment are different
What are the unique issues in practicing CD (delivery/Deployment) in Microservices world
Issues/Common mistakes in CD for Microservices:
On testing micro services - Mostly teams make mistakes or ignore the automated tests itself while designing CD pipelines for microservices due to the complexity involved.
Teams often rely on end-end testing. To achieve this a common setup is shared with the team to bring up the entire working system. This approach is usually less performant and prone to human mistakes of each engineer running different versions of the services
Maintaining pre-prod environments - Enterprise teams have situations where they need to maintain multiple environments apart from production. Maintenance becomes an overhead
Teams struggle to maintain variables across multiple environments - pre-prod and prod
How much of the workflow is automated/Infra as code - reduction in percentage of automation will proportionally increase chances of failing to achieving CD
Tendency to do things using scripts which could be done by options provided by tools used for deployments
Recommended practices to mitigate the issues:
Testing of microservices can be done by Integration and Component based tests than to depend heavily on end to end tests
Each service may be in different languages and platforms, but all can be made into similar artifact - like docker containers
Choosing the right deployment strategy
On Deployment strategies - Service Instance per Virtual Machine Pattern vs Service Instance per Container Pattern - Pros and Cons of each
Roll back Strategies
Look out for security issues in containers
Aditya is an experienced and technically proficient Product Specialist at Thoughtworks. In the current role, he has been helping organizations to automate, streamline and assimilate continuous delivery through Devops and Automation Practices.