![Show Menu](styles/mobile-menu.png)
![Page Background](./../common/page-substrates/page0183.png)
$
git add deploy_tools
$
git status
# see three new files
$
git commit -m "Notes and template config files for provisioning"
Our source tree will now look something like this:
$ tree -I __pycache__
.
├── deploy_tools
│ ├── gunicorn-upstart.template.conf
│ ├── nginx.template.conf
│ └── provisioning_notes.md
├── functional_tests
│ ├── __init__.py
│ ├── [...]
├── lists
│ ├── __init__.py
│ ├── models.py
│ ├── static
│ │ ├── base.css
│ │ ├── [...]
│ ├── templates
│ │ ├── base.html
│ │ ├── [...]
├── manage.py
├── requirements.txt
└── superlists
├── [...]
Test-Driving Server Configuration and Deployment
Tests take some of the uncertainty out of deployment
As developers, server administration is always “fun”, by which I mean, a process full
of uncertainty and surprises. My aim during this chapter was to show a functional
test suite can take some of the uncertainty out of the process.
Typical pain points—database, static files, dependencies, custom settings
The things that you need to keep an eye out on any deployment include your da‐
tabase configuration, static files, software dependencies, and custom settings that
differ between development and production. You’ll need to think through each of
these for your own deployments.
Tests allow us to experiment
Whenever we make a change to our server configuration, we can rerun the test
suite, and be confident that everything works as well as it did before. It allows us to
experiment with our setup with less fear.
Automating
|
155