I am 1)
looking for ideas of how to manage and 2)
test complex nginx configurations across different environments.
Currently I am storing Nginx configurations in a github repo, separating environments in to different directories (dev, test, stage, prod, etc) and reusing identical configs via include directives.
To deploy the correct configs I am running a simple script to copy in all the correct configurations in to place but I am starting to hit scaling issues as the configurations are getting more complicated and more environments are being added to the repo.
Is there a good workflow or method for managing and testing configs? I was thinking of templating the configs somehow but don't know where to start.
Is there any sort of unit/integration framework for testing separate components of an Nginx configuration? Things like, "is Nginx listening on X port?" to make sure things don't break as new pieces get added to configurations.
I'd eventually like to add this kind of logic in to some kind of CI/CD to ensure that things aren't getting broken.
0 Answers