<div dir="ltr"><div><div><div><div><div><div><div>Hi everyone,<br><br>thanks for all your suggestions.  I've been beavering away, and I've got a first draft of the chapter on deployment ready.  I'd love your feedback!<br>

<br></div>You can find it at  <a href="http://chimera.labs.oreilly.com/books/1234000000754/ch08.html">http://chimera.labs.oreilly.com/books/1234000000754/ch08.html</a><br><br></div>Here's a broad outline of what I decided to go for:<br>

<br></div>Provisioning:<br></div>* Ubuntu server (at Digital Ocean, if you must know)<br></div>* Nginx as reverse proxy<br></div>* Gunicorn as django server, launched via upstart<br></div><div>* Staging and live served as separate virtualhosts<br>

</div><div>* Not automated, but templates for nginx + upstart config are in repo<br></div><div><br></div><div>Deployment:<br></div><div>* Use git clone / git pull, with git reset --hard<br></div><div>* manage.py collectstatic to update static files, and manage.py syncdb (south comes later)<br>

</div><div>* Virtualenv updates via requirements.txt in repo<br></div><div>* automated using fabric<br></div><div><br></div><div>Testing:<br></div><div>* a hideous hack of the Django LiveServerTestCase to let us run FTs against the staging site<br>

</div><div>* a specific FT that checks that the CSS works (cf previous chapter)<br></div><div>* no unit tests for the fabric script (although I have had a good think about them, may include them in an appendix)<br><br></div>

<div>I've tried to find a balance between keeping things simple -- it's a very small site, and I can bring in more stuff, eg south, later in the book -- and trying to set people off on a reasonably solid course, that won't leave them with too many pitfalls later.  It's my first draft, and it would doubtless be improved immensely by your feedback.  Let me have it!<br>

<br></div><div>You'll find a couple of notes + todos at the end..<br><br>cheers all, and thanks again for your help!<br><br>HP<br></div><div><br><br></div><div>PS here's another link to where you can buy the book if, you know, you get a sudden urge ;-)  <a href="http://www.obeythetestinggoat.com/">http://www.obeythetestinggoat.com/</a><br>

</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 20 May 2013 21:23, John Lee <span dir="ltr"><<a href="mailto:jjl@pobox.com" target="_blank">jjl@pobox.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Mon, 20 May 2013, Andy Robinson wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
be run in a live web app.  For example, for an online purchase<br>
process, you might have a selenium test which steps right through a<br>
purchase using a known "only for tests" account or credit card number.<br>
</blockquote></div>
[...]<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I don't know what this kind of testing is called though ;-)<br>
</blockquote>
<br></div>
Expensive?-)<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
John</font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
python-uk mailing list<br>
<a href="mailto:python-uk@python.org" target="_blank">python-uk@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-uk" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/python-uk</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>------------------------------<br>Harry J.W. Percival<br>------------------------------<br>Twitter: @hjwp<br>Mobile:  +44 (0) 78877 02511<br>Skype:         harry.percival
</div>