[Grok-dev] Re: Application Distribution HOWTO
Martijn Faassen
faassen at startifact.com
Tue Oct 23 08:07:07 EDT 2007
Hey,
Torvald Bringsvor wrote:
> Yeah, I have read that one. Sorry, it is actually a bit too mini for
> me. I actually thought buildout was what you would use to make an egg
> of your application.
Not quite. Buildout is actually primarily meant as a development
environment, to manage your development project. It's also is used as a
production environment, even though that's not actually the primary use
case.
> Seems like the consensus is: use grokproject to make a new instance
> for your production server, copy everything over. I was kind of
> wondering if there was something more polished than that. Is there a
> grok roadmap somewhere?
I wouldn't do it quite like that myself.
Basically, after developing my application, I'd end up with a buildout
project. Ideally this would lock down all the versions of the packages
my application depends no in a 'versions' section.
Now the simple way to install this would be to copy over the buildout
(excluding any downloaded eggs and other buildout-generated stuff such
as a 'bin' directory, just the source code project including a
buildout.cfg).
On the production server, I'd run bootstrap.py again, and then do
bin/buildout. This should install the exact same set of packages on the
production server.
A little bit more advanced scenario actually only copies over the
buildout.cfg to the production server (and bootstrap.py, at least once).
You modify it so that it doesn't list any eggs under 'develop' anymore.
Then you go and release all your eggs. Typically this is only the new
one for your application, using a command like:
$ python setup.py sdist
That'll get you a .tgz. If you place it somewhere on your production
server and point to the directory it is in using find-links in
buildout.cfg's [buildout] section, it'll pick it up. Then you run
bootstrap.py (unless you have buildout installed more centrally) and do
bin/buildout. This will download and install the complete release.
There's no source code version at all anymore.
Actually Jim Fulton has been talking about more advanced ways to
distribution still. Buildout is primarily a development environment and
he recommends using other mechanisms for distribution, ones that are
more recognizable to system administrators. One of them is RPM packages
(which would be convertable to .deb by tools like alien) and I've seen
recent checkins in that direction. I don't know much about this story
yet, but I hope to learn more about this eventually.
Regards,
Martijn
More information about the Grok-dev
mailing list