suggestions for "best practices lite" for small site deployment with testing

2013-05-21 Thread Harry Percival
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
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: A computer programmer, web developer and network admin resume

2013-05-22 Thread Harry Percival
oh wow.  great one, thanks for that tim :)


On 22 May 2013 14:03, Tim Chase  wrote:

> On 2013-05-22 16:39, Chris Angelico wrote:
> > On Wed, May 22, 2013 at 12:32 PM, Tim Chase
> >  wrote:
> > > On 2013-05-22 01:15, i...@databaseprograms.biz wrote:
> > >> A computer programmer, web developer and network administrator
> > >
> > > ...walk into a bar...
> > >
> > > So what's the punchline?
> >
> > ;steps up to the mike
> >
> > So yeah, as I was saying, a programmer, a web dev, and a BOFH walk
> > into a bar. The other two buy the BOFH a drink, because they're not
> > stupid, and anyway, so this luser walks up to them with a resume in
> > his hand.
> >
> > "," says the luser.
> >
> > "So what's the punchline?" says the computer programmer.
> >
> > The stand-up comic steps up to the mike, and he says, "So yeah, as I
> > was saying, a programmer, a web dev, and a BOFH walk into a stable
> > time loop..."
>
> So a pirate programmer walks into a bar with a bird on his shoulder.
> The bird repeatedly squawks "pieces of nine! pieces of nine!".  The
> bartender looks at him and asks "what's up with the bird?" to which
> the pirate says "Arrr, he's got a parroty error."  The bartender
> replies, "Ah, I thought he was a bit off."
>
> -tkc
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
--
Harry J.W. Percival
--
Twitter: @hjwp
Mobile:  +44 (0) 78877 02511
Skype: harry.percival
-- 
http://mail.python.org/mailman/listinfo/python-list