A
A
Arkadiy Mishin2021-02-25 16:14:03
Continuous Integration
Arkadiy Mishin, 2021-02-25 16:14:03

Continuous integration how to organize it correctly?

There is a CI auto-deploy script.
it walks around servers when a release is released and does git pull
, the problem is that some files should be different depending on the server. for example, there is an
nginx.conf file in the repository,
but on the server
to server 1 it is nginx.conf slightly changed
on server 2 it is still slightly changed
, etc.
I can’t simply ignore this file when deploying, because sometimes a new directive is added to this file, for example, or something changes and the change needs to be applied on all servers, but unique values ​​​​for each server remain.

do not offer through include because there are files and configs that do not support includes , for example, a cron file

The question is how other similar systems are implemented?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Kuts, 2021-02-25
@fox_12

As an option, separate branches are made in git, which differ from the master in changes in part of these files, and CI / CD monitors the changes in these branches and pours them onto the appropriate servers.
Deploy this branch to this server, and this branch to another...

V
Vitaly Karasik, 2021-02-25
@vitaly_il1

there are files and configs that don't support includes , such as a cron file

AFAIK, all configs support either include or "drop-in" directories - /etc/*.d for example.
This is the easiest way. If this is not enough, then use templates and / or configuration management.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question