Jun 27, 2015

  • Category: Buildout, Plone
  • comment(s)

Recent Posts

Categories

Archives

Plone on Heroku

Dear Plone, welcome to 2015

Picture it. The year was 2014. I was incredibly moved and inspired by this blog entry:

Someone had finally done it. (zupo in this case, kudos!) Someone had finally beat me to implementing the dream of git push heroku plone. And I could not have been happier.

But something nagging would not let go: I still didn’t fully understand how the buildpack worked. Today I’m happy to say: that nag is gone and I now fully understand how Heroku buildpacks work… thanks to… wait for it… a Buildpack for Plock.

Plock Buildpack

There’s a lot of the same things going on in both the Plone Buildpack and the Plock Buildpack, with some exceptions.

Experimental

The Plock buildpack is highly experimental, still in development and possibly innovative. Here’s what it currently does:

  • Configures Python user site directory in Heroku cache
  • Installs setuptools in user site
  • Installs pip in user site
  • Installs Buildout in user site
  • Installs Plone in cache
  • Copies cache to build directory
  • Installs a portion of “user Plone” (the Heroku app’s buildout.cfg) in the build directory (not the cache)
  • Relies on the app to install the remainder (the Heroku app’s heroku.cfg). Most importantly the app runs Buildout which finishes quickly thanks to the cache & configures the port which is only available to the app (not the buildpack.)

Here’s an example:

# buildout.cfg
[buildout]
extends = https://raw.github.com/plock/pins/master/plone-4-3

[user]
packages = collective.loremipsum
# heroku.cfg
[buildout]
extends = buildout.cfg

[plone]
http-address = ${env:PORT}
# Procfile
web: buildout -c heroku.cfg; plone console

Opinionated

The Plock Buildpack is built on Plock, an “opinionated” installer for Plone. It may eventually use Plock itself, but currently only uses Plock Pins.

Comments

comments powered by Disqus