This document compares and contrasts two tools for deploying Python web applications to remote servers: Hostout and Silverlining.
Hostout uses Fabric and buildout to replicate a local development environment across multiple servers. It provides a modular approach that allows customization through additional recipes and fabric files. Silverlining takes a more "batteries included" approach by creating a standard application layout and managing dependencies, code installation, and deployment through simple commands.
While both tools aim to simplify deployment, Hostout offers more flexibility through its buildout-based approach but with increased complexity, while Silverlining provides a more standardized workflow out of the box at the cost of customizability. The document discusses the tradeoffs between the two in
6. Options
Type Providers Flexibility (Easy) Scalability
Shared Few
e.g. Webfaction
($14)
Limited Choice
(Control Panel)
None
AppEngine One
Google (Free)
No Choice
(Launcher)
Built in
VPS Lots
e.g. Slicehost ($20)
Unlimited choice
(DIY)
DIY
Cloud Few
e.g. Rackspace ($11)
Unlimited choice
(DIY)
DIY
20. Built in commands
● Run
● Sudo
● Deploy
● Predeploy
– Bootstrap – platform dependent
● setupusers
● setowners
● Uploadeggs
● Uploadbuildout
● Buildout
● Postdeploy
21. Releasing eggs
1 hostoutversions.cfg during buildout
2 sdist with md5 for all develop eggs
3 fabric.api.put all hashed eggs (if needed)
1 Direct to egg cache
4 deployed.cfg with hashed versions pinned
5 Upload zip of buildout + includes
6 fabric.api.run( bin/buildout -c deployed.cfg )
23. Hostout is modular
● collective.hostout
● Deploys buildout to any posix host. Needs IP and
password
● hostout.ubuntu
● bootstraps ubuntu host for buildout
● hostout.cloud
● Creates node ready to be bootstrapped
● fabfiles = myfabfile.py – add your own
25. User model
[host1]
user = {initial sudo user}
buildout-user = {owns buildout files + pw-less
login}
effective-user = {owns var dir}
buildout-group = {group owns both}
26. Extra Options
● include = {files to include in buildout zip}
● parts = {override parts}
● sudo-parts = {sudo bin/buildout install …}
● pre-commands = {shell to sudo before}
● post-commads = {shell to sudo after}
● path = {location of buildout}
28. hostout.supervisor
● Pre and post deployment stop and start
● bin/hostout host status
● bin/hostout host supervisorboot
● bin/hostout host start/stop/restart
34. Silverlining
● By Ian Bicking
● Create app layout/dir
● $ silver init myapp
● Install dependencies into dir
● $ cd app; bin/easy_install repoze.bfg
● Install your code into dir
● $ bin/python src/myapp/setup.py develop
36. Hostout vs. Silverlining
● Many deployers
● Checkin. Checkout. Buildout. deploy
● Hostout uses fabric
● Cross platform but more dependencies (pycrypto)
● Hostout is modular
● Package your own fabfiles to help others deploy
● Hostout is flexible – helps professionals
● Buildout is powerful. No limit to building/installing.
NoSQL etc.
● Buildout shares dl code
37. Silverlining vs. Hostout
● Silverlining is batteries included
● You don't need a production buildout
● Silverlining is “known” target platform
● means less variables to go wrong
● Familiar workflow
● Commandline vs cfg.
38. Thanks
● Dylan Jay
● http://www.pretaweb.com
● twitter: djay75
● pyconau@dylanjay.com
● Know plone, syd admin or pywebdev? - we're
hiring
Isolated environment
Combine eggs, sdist, cmmi, .cfg, php, whatever
Recipes do the combining
Flow is Configure, build (auto install), run
Vs
Install, configure, run
Can share “buildouts”