T
T
topuserman2021-11-12 21:54:52
Continuous Integration
topuserman, 2021-11-12 21:54:52

Docker and CI/CD: how does this magical deployment happen?

I read a lot of articles, looked at a lot of examples on the topic of CI / CD, and everywhere there is some kind of ci / cd model.

And they are completely different.
Starting from the use of completely different auxiliary applications, and ending with monstrous bash scripts.

I cannot single out any general principles for myself, and start moving in some direction in order to figure it out. Because At this stage, it is not clear to me which of the solutions is correct and which is not.

I understand that there is no one right solution, and each project has its own specifics and its own requirements.
But are there any basic (or classic) solutions that are similar for most typical projects?

Where can you read about it?

For example, it is completely incomprehensible to me how the deployment to the server takes place if 10 containers are spinning on it.

How does the code get there so that everything continues to work.
What happens if the configuration has changed, for example for Nginx?
What other tools should I use for this if I use GitLab CI?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vasily Bannikov, 2021-11-12
@vabka

1. During ci, you build a docker image and upload it to the docker registry (usually private)
2. During cd, you call your orchestrator API:
docker-compose / docker swarm / k8s, etc., so that it updates running services
Both stages can be implemented in different ways , even through gitlab, even through a bunch of bash scripts
PS: docker-compose is not an orchestrator and cannot update images on the go

A
Armenian Radio, 2021-11-13
@gbg

What is common in CI/CD is the idea, this set of practices closes questions 2 and 3 from the Spolsky test
. That is, in this case, the idea is important, and not a specific path to its implementation (do it through Dosker or through VM deployment, use a bunch of batch files or a monster like TeamCity - these are already particulars - it is important that pressing one button leads to the appearance of somewhere completely assembled from scratch and deployed the actual build of the Product)

V
Vitaly Karasik, 2021-11-13
@vitaly_il1

I agree with Armenian Radio - the idea is important, or rather the understanding of the process and the ability to do everything manually.
And automating with the help of certain tools is a second matter.
See an example in my answer https://qna.habr.com/q/1016852#answer_1981278

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question