Automating Microservices Deployment With Ansible [Video]
Ideally, each microservices team is multifunctional and owns the software artifact from conception to production. Infrastructure as code and automation are necessities.
Join the DZone community and get the full member experience.Join For Free
One of the main principles of microservices is to be independently deployable. As a consequence, microservices development and operations 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.
Ideally, each microservices team is multifunctional and owns 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.
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 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.
Published at DZone with permission of Rafael Benevides, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.