Automating microservices deployment with Red Hat Ansible Automation

One of the main principles of microservices is to be independently deployable. As a consequence, Microservices development and operation tend to be much more complex than a Monolith because of their distributed nature --- if your IT team has not moved out yet from its silos and has adopted DevOps practices, the operations team will not really understand why they have to deploy hundreds of independent software pieces in opposite to the "good old monolith".

"You need a mature operations team to manage lots of services, which are being redeployed regularly"  (Microservices trade-offs by Martin Fowler).

The operations team and the software development team should work together adopting DevOps practices to avoid silos and deployment process where the software team throws the software over the wall.

Screenshot 2016-11-18 13.46.37.png

Ideally, each Microservices team is multifunctional and own the software artifact from conception to production. Given the multifunctional nature of these teams, "infrastructure as code (IaC)" and automation are now a necessity. DevOps teams share the knowledge of server provisioning, configuration management and deployment. There are several tools and approaches for IaC. As an example, I can mention Kubernetes, that allows you to define its objects as yaml or json files.

screenshot-2016-11-16-10-53-00

A couple months ago, I published a blog post that shows how to have your own (no-cost) microservices playground.  The focus of this material is educational. It provides instructions on how to deploy each microservice independently. However, some people would like to see all of them running running in few minutes.

To show how you can run this microservices playground environment in less than 20 minutes, I decided to record the following screencast that shows how to create an OpenShift cluster using "oc cluster up" (Check out "Four creative ways to create an OpenShift/Kubernetes dev environment"), and deploy all of them using Ansible.

I hope that you enjoy.

https://www.youtube.com/watch?v=oWsW8GZbQR0

About the author:

Rafael Benevides is a Director of Developer Experience at Red Hat. In his current role he helps developers worldwide to be more effective in software development, and he also promotes tools and practices that help them to be more productive. He worked in several fields including application architecture and design. Besides that, he is a member of Apache DeltaSpike PMC - a Duke’s Choice Award winner project. And a speaker in conferences like JUDCon, TDC, JavaOne and Devoxx. Twitter | LinkedIn | rafabene.com

Last updated: March 17, 2023