
You can test code but you can't test config - ninjakeyboard
how do you handle ensuring your config is correct? Moving it into something like ansible seems smart but in a project where there isn&#x27;t a perfect mirror of production and all of the devops processes in place, how would you go about improving the handling, management, and deployment of configuration into production without any way of verifying it first?
======
mimo777
Integration machine. Make sure that your QA machine is reflected onto an
intermediate machine that lets your coders perform unit tests on to shake out
the configuration differences between Dev and Live. This way, when QA comes up
with a bug, you have a degree of confidence that it doesn't have to do with
configuration.

------
afarrell
You are correct that you want to move to a configuration management system
like ansible. I wrote up a tutorial on configuration management that has
automated tests at every stage and has the student write some tests.

[https://amfarrell.com/saltstack-from-
scratch/](https://amfarrell.com/saltstack-from-scratch/)

I should sit down and put more emphasis on testing when I have more time, but
if you work through that it will teach you the basics of configuration
management and get you to doing a deploy of django+postgresql+gunicorn+nginx
on a digital ocean machine.

------
nwrk
Serverspec [0], Infospec [1]

\+ QA environment mentioned by mimo77

[0] [http://serverspec.org/](http://serverspec.org/) [1]
[https://www.chef.io/inspec/](https://www.chef.io/inspec/)

