Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'static': 0.04; 'anyway.': 0.05; 'url:pipermail': 0.05; 'automate': 0.07; 'advance': 0.07; 'apache,': 0.09; 'deploy': 0.09; 'deployment,': 0.09; 'forcing': 0.09; 'git': 0.09; 'mind,': 0.09; 'provisioning': 0.09; 'python': 0.11; 'background.': 0.14; 'apache': 0.15; '(),': 0.16; 'big,': 0.16; 'python-uk': 0.16; 'think?': 0.16; 'url :python-uk': 0.16; 'url:thread': 0.16; '(0)': 0.16; 'files.': 0.16; 'discussion': 0.18; 'bit': 0.19; 'deployment': 0.19; 'everyone,': 0.19; 'server,': 0.19; 'thoughts': 0.19; 'later': 0.20; 'code,': 0.22; 'shell': 0.22; 'this?': 0.23; 'days,': 0.24; 'harry': 0.24; 'questions:': 0.24; "i've": 0.25; 'source': 0.25; 'chapter': 0.26; 'push': 0.26; 'updating': 0.26; 'post': 0.26; 'idea': 0.28; 'testing': 0.29; 'topic': 0.29; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'towards': 0.31; 'twitter:': 0.31; 'lessons': 0.31; "they'll": 0.31; 'there.': 0.32; 'stuff': 0.32; 'skip:- 30': 0.32; 'run': 0.32; 'another': 0.32; 'linux': 0.33; 'url:python': 0.33; '+44': 0.34; 'subject:with': 0.35; 'basic': 0.35; 'received:209.85': 0.35; 'tool': 0.35; 'test': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'building': 0.35; 'in.': 0.36; 'installing': 0.36; 'doing': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'should': 0.36; 'so,': 0.37; 'too': 0.37; 'mobile:': 0.37; 'two': 0.37; 'list': 0.37; 'received:209': 0.37; 'being': 0.38; 'bringing': 0.38; 'to:addr :python-list': 0.38; 'list,': 0.38; 'that,': 0.38; 'functional': 0.39; 'subject:" ': 0.39; 'to:addr:python.org': 0.39; 'mailing': 0.39; 'url:mail': 0.40; 'how': 0.40; 'applicable': 0.60; 'introduced': 0.61; 'worldwide': 0.61; 'skip:* 10': 0.61; 'confirm': 0.64; 'box,': 0.64; 'interest': 0.64; 'more': 0.64; 'management': 0.65; 'talking': 0.65; 'header:Reply-To:1': 0.67; 'book,': 0.68; 'reply-to:no real name:2**0': 0.71; '"best': 0.84; 'complexity': 0.84; 'learn...': 0.84; 'mobile:\xa0': 0.84; 'myself!': 0.84; 'habit': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:from:date:message-id:subject:to:content-type; bh=593Ac8z2OyVUBBjLkgleg7G89DmlA4OQeEAXczWLrl8=; b=DntEjI1Kws3s1hzVbXN63CYfykL0l8ytGgoNIw3kWeTLLAppQCb94EQEONrlxCk/GP sEncA1M0CGT8XyGMghqDAolMoz0QrGsqZGuT7K6xpPB8IoKgz0CwAzDsCLQkjZVsZc9w m51q3BqSA3CWWI3tQKyBHYOOCnM96eI/EGcYwLqkkMCm17fgDslQUCkAWAinmP2GRriR h/CeS3pNnkqUB27bgQMkFyJIbh6NAKtE2UckQFtpSblI5qJfdiQtlqnvPTBQFGxAVPs+ QK5surCyK2/mmqWgKholfG1EXhAel5qHmR0fVSiDvyRF0vHqa9bzpmqyXlBwRyjzFYO/ Rbbw== X-Received: by 10.68.13.228 with SMTP id k4mr2645565pbc.215.1369143696432; Tue, 21 May 2013 06:41:36 -0700 (PDT) MIME-Version: 1.0 From: Harry Percival Date: Tue, 21 May 2013 14:41:15 +0100 Subject: suggestions for "best practices lite" for small site deployment with testing To: python-list@python.org Content-Type: multipart/alternative; boundary=bcaec5216315ac239204dd3a9b19 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: hjwp2@cantab.net List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 122 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369143705 news.xs4all.nl 15896 [2001:888:2000:d::a6]:37996 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45666 --bcaec5216315ac239204dd3a9b19 Content-Type: text/plain; charset=ISO-8859-1 Hi everyone, We've been having a bit of a discussion of this topic over on the Python-UK list (http://mail.python.org/pipermail/python-uk/2013-May/thread.html#2949), and I was a bit shy about mailing out to the big, bad, worldwide Python list, but I'm forcing myself! So I'm writing a book, for O'Reilly, on TDD with Python, and I'm looking for some help and suggestions on my current chapter (well, I'm looking for help and suggestions in general too! i need all the help i can get.). http://www.obeythetestinggoat.com/what-to-say-about-deployment.html So far I've taken the user through building a basic site, and now I want to get them to deploy it. It's very early days, but minimum-viable-product and all that, deploying early + often is a good habit to get into. cf the blog post above for a bit of background. I'm currently leaning away from talking about the various PaaS offerings, they being too many + varied, and I have a bit of a conflict of interest since I work at PythonAnywere. Instead, I'm currently thinking we'll spin up a small linux box, put apache on it, and run both the staging and live site from there. All good stuff to learn... Hopefully some of the lessons will be applicable to PaaSes anyway. So, some questions: provisioning = spinning up a server, installing apache, setting up virtualhost config. confirm I should encourage people to automate this? Am leaning towards just using fabric, is bringing in another tool (chef/puppet/salt) overkill? deployment = updating the source code, database migration, static files. What are your favourite ways of doing this? Shell scripts? Git push hooks? I'm thinking fabric, again... Also: testing -- if the above two steps are automated using fabric, they'll be *functionally* tested because we'll run the functional test suite against the staging site. Any thoughts on whether + how to *unit* test deployment scripts? Take a look at the blog post, and let me know what you think? Bear in mind, at this stage, I'm looking for "best practices lite" -- at this stage, it's a tiny website, I can always bring in some more complexity later on. The idea is to get people introduced to the idea of deployment, how you automated, and where testing comes in. We don't have to talk about CDNs or zero-downtime or multi-server configuration management yet... Thanks in advance for any thoughts! Harry -- ------------------------------ Harry J.W. Percival ------------------------------ Twitter: @hjwp Mobile: +44 (0) 78877 02511 Skype: harry.percival --bcaec5216315ac239204dd3a9b19 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi everyone,<= br>
We've been having a bit of a discussion of this topic over on th= e Python-UK list (http://mail.python.org/pipermail/python-uk/2013-May= /thread.html#2949), and I was a bit shy about mailing out to the big, b= ad, worldwide Python list, but I'm forcing myself!

So I'm writing a book, for O'Reilly, on TDD with Python, = and I'm looking for some help and suggestions on my current chapter (we= ll, I'm looking for help and suggestions in general too!=A0 i need all = the help i can get.).

http://www.obeythetestinggoat.com/what-to-say-about-deployment.htm= l

So far I've taken the user through building a basic = site, and now I want to get them to deploy it.=A0 It's very early days,= but minimum-viable-product and all that, deploying early + often is a good= habit to get into.

cf the blog post above for a bit of background.=A0 I'm curren= tly leaning away from talking about the various PaaS offerings, they being = too many + varied, and I have a bit of a conflict of interest since I work = at PythonAnywere.=A0 Instead, I'm currently thinking we'll spin up = a small linux box, put apache on it, and run both the staging and live site= from=A0 there.=A0 All good stuff to learn...=A0 Hopefully some of the less= ons will be applicable to PaaSes anyway.

So, some questions:
provisioning =3D spinning up a serve= r, installing apache, setting up virtualhost config.=A0 confirm I should en= courage people to automate this?=A0 Am leaning towards just using fabric, i= s bringing in another tool (chef/puppet/salt) overkill?

deployment =3D updating the source code, database migration, stat= ic files.=A0 What are your favourite ways of doing this?=A0 Shell scripts? = Git push hooks?=A0 I'm thinking fabric, again...=A0

Also:= testing -- if the above two steps are automated using fabric, they'll = be *functionally* tested because we'll run the functional test suite ag= ainst the staging site.=A0 Any thoughts on whether + how to *unit* test dep= loyment scripts?

Take a look at the blog post, and let me know what you think= ?=A0 Bear in mind, at this stage, I'm looking for "best practices = lite" -- at this stage, it's a tiny website, I can always bring in= some more complexity later on.=A0 The idea is to get people introduced to = the idea of deployment, how you automated, and where testing comes in.=A0 W= e don't have to talk about CDNs or zero-downtime or multi-server config= uration management yet...

Thanks in advance for any thoughts!
Harry

--
--------------------= ----------
Harry J.W. Percival
------------------------------
Twitter: @hjwp
Mobile:=A0 +44 (0) 78877 02511
Skype:=A0 =A0 =A0 =A0= =A0 harry.percival
--bcaec5216315ac239204dd3a9b19--