Currently, for deploying the new ‘modules’ , we have inherited the old ways of doing it from our legacy project.
It is something like this:
- the code is merged into the git master
- we deploy on test server and check the master branch
- every developer merges his changes/work during the sprint
- Weekly, every Tuesday, we deploy the master
We deploy on Tuesday, so that we’ll have the rest of the week to intervene, if something goes wrong (-> fear, uncertainty for your new code)
Unfortunately, the same mentality/process has crept into the new modules as well.
But for the new modules/microservices this deployment process doesn’t make sense. (It’s an anti-pattern)
Another issue is that the guy who is on OPS and Support we, has to deploy all the changes that are due, even the ones in the new modules.
So you end up deploying 4,5 systems at the same time…
Talk about tight coupling! …
In Design Microservice Architectures the Right Way it says that they deploy as soon as all the Tests Pass, unlike our process, where we only deploy on Tuesdays?
… and because we’ve spent so much time on our testing, the policy is that once it’s green, we deploy, that’s it!
__
Microservices require solutions for different challenges.
Let’s examine the operations concept:
- deployments
- monitoring
- log analysis
- tracing
And let’s drill down into deploymentsIn this lesson, we’ll focus on continuous delivery as an advantage of using microservices.Microservices represent independently deployable modules. Therefore each microservice has its own continuous delivery pipeline.MICROSERVICES FACILITATE CONTINUOUS DELIVERY
- The continuous delivery pipeline is significantly faster because the deployment units are smaller. Consequently, deployment is faster.
- The tests are also faster because they need to cover fewer functionalities. Only the features in the individual microservice have to be tested, whereas in the case of a deployment monolith, the entire functionality has to be tested due to possible regressions.
- Building up a continuous delivery pipeline is easier for microservices. Setting up an environment for a deployment monolith is complicated. Most of the time, powerful servers are required. In addition, third-party systems are frequently necessary for tests. A microservice requires less powerful hardware. Besides, not many third-party systems are needed in the test environments.
DEPLOYMENT MUST BE AUTOMATED
However, note that microservice architectures can only work when the deployment is automated! Microservices substantially increase the number of deployable units compared to a deployment monolith. This is only feasible when the deployment processes are automated.Independent deployment means that the continuous delivery pipelines have to be completely independent. Integration tests conflict with this independence. They introduce dependencies between the continuous delivery pipelines of the individual microservices. Therefore, integration tests must be reduced to the minimum.