1

Say I have a front end node and three backed nodes tools, blog, and store. Each node communicates with the other. Each of these nodes have their own set of languages and libraries, and have their own Dockerfile.

I understand the DevOps lifecycle of a single monolithic web application, but cannot workout how a DevOps pipeline would work for microservices.

  • Would each micro-service get its own github repo and CI/CD pipeline?
  • How do I keep the versions in sync? Let's say the tools microservice uses blog version 2.3. But blog just got pushed to version 2.4, which is incompatible with tools. How do I keep the staging and production environments in sync onto which version they are supposed to rely on?
  • If I'm deploying the service tools to multiple different servers, whose IP's may change, how do the other services find the nearest location of this service?
  • For a monolithic application, I can run one command and simply navigate to a site to interact with my code. What are good practices for developing locally with several different services?
  • Where can I go to learn more?
user82395214
  • 829
  • 14
  • 37
  • Check this one, it's about CI/CD pipeline https://smaillns.medium.com/ci-cd-pipeline-for-python-microservices-based-application-using-jenkins-and-kubernetes-77c4abfc288 – Smaillns Dec 31 '21 at 14:33

1 Answers1

2
  • Would each micro-service get its own github repo and CI/CD pipeline?

From my experience you can do both. I saw some teams putting multiple micro-services in one Repository. We where putting each micro-service in a separate repository as the Jenkins pipeline was build in a generic way to build them that way. This included having some configuration files in specific directories like "/Scripts/microserviceConf.json" This was helping us in some cases. In general you should also consider the Cost as GitHub has a pricing model which does take into account how many private repositories you have.

  • How do I keep the versions in sync? Let's say the tools micro-service uses blog version 2.3. But blog just got pushed to version 2.4, which is incompatible with tools. How do I keep the staging and production environments in sync onto which version they are supposed to rely on?

You need to be backwards compatible. Means if your blogs 2.4 version is not compatible with tools version 2.3 you will have high dependency and coupling which is going again one of the key benefits of micro-services. There are many ways how you get around this. You can introduce a versioning system to your micro-services. If you have a braking change to lets say an api you need to support the old version for some time still and create a new v2 of the new api. Like POST "blogs/api/blog" would then have a new api POST "blogs/api/v2/blog" which would have the new features and tools micro-service will have some brige time in which you support bot api's so it can migrate to v2. Also take a look at Semantic versioning here.

  • If I'm deploying the service tools to multiple different servers, whose IP's may change, how do the other services find the nearest location of this service?

I am not quite sure what you mean here. But this goes in the direction of micro-service orchestration. Usually your Cloud provider specific service has tools to deal with this. You can take a look at AWS ECS and/or AWS EKS Kubernetes service and how they do it.

  • For a monolithic application, I can run one command and simply navigate to a site to interact with my code. What are good practices for developing locally with several different services?

I would suggest to use docker and docker-compose to create your development setup. You would create a local development network of docker containers which would represent your whole system. This would include: your micro-services, infrastructure(database, cache, helpers) and others. You can read about it more in this answer here. It is described in the section "Considering the Development Setup".

Where can I go to learn more?

There are multiple sources for learning this. Some are:

  1. https://microservices.io/

  2. https://www.datamation.com/applications/devops-and-microservices.html

  3. https://www.mindtree.com/blog/look-devops-microservices

  4. https://learn.microsoft.com/en-us/dotnet/standard/microservices-architecture/multi-container-microservice-net-applications/multi-container-applications-docker-compose

xargs
  • 2,741
  • 2
  • 21
  • 33
  • Unfortunately no. There are a couple topics here to cover and I am not sure if there is a Book which has all this things in one. I learned this over time with hands on experience on Projects. And the sources where multiple like: Blogs, Video Courses, Books. There is no single source which covers all in one, at least not to my knowledge. You can take a look at Pluralsight courses regarding Micro-services and DevOps. I think this is the closest to what you are looking for. – xargs Jun 28 '19 at 07:41