I was thinking about the micro services architecture and wondering if folks have a good best practice for development environments.
My working assumption is that each micro service will live in it's own git repository for isolation and ease of deployment. I'm also assuming that each developer will create a fork of any repo that they are working on.
The issue I'm considering arises where you are working on an issue that involves multiple micro-services. For example, there is a defect that impacts one micro service and how it appropriately consumes another micro-service.
Assuming n projects are involved in the defect, you would have to check out n git repositories and configure them to work together. If they each have a Vagratefile and Dockerfile, you end up running n VMs. Ideally you'd only have 1 Vagrant VM and each serivce would just be a new Docker instance in that same VM.
A master repo/project with git sub modules could work. The problem with that is if we create a generic master repo/project then the sub module will point to the upstream not the fork for the developer.
I'm currently thinking that a master project that had some configs, vagrant and fig might do the trick. I'm currently considering two methods of implementing this approach.
Has anybody else solved this problem or have a good workflow?
When you are ready to start adopting a microservices architecture and the associated development and deployment best practices, you'll want to follow the three C's of microservices: componentize, collaborate, and connect.
Because the microservice component is simply another component on the network, developers can use the language or framework best suited for the required functionality. This approach can significantly reduce the amount of code to write and make it dramatically simpler to maintain.
I decided to go with fig.
If a microservice depends on another microservice fig will reference this service using ../
This assumes that all services are checked out as siblings. This can also easily be accomplished using git sub trees.
My dev_ops repro contains my Vagrant file for boot2docker, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With