Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A zc.buildout that compiles and installs varnish and supervisor
[buildout]
parts = pcre varnish-build varnish supervisor
origin_port = 8080
varnish_port = 8000
supervisor_port = 9002
[pcre]
recipe = hexagonit.recipe.cmmi
url = http://downloads.sourceforge.net/project/pcre/pcre/8.12/pcre-8.12.tar.gz
[varnish-build]
recipe = hexagonit.recipe.cmmi
url = http://repo.varnish-cache.org/source/varnish-2.1.5.tar.gz
configure-options =
PCRE_CFLAGS=-I${buildout:directory}/parts/pcre/include
PCRE_LIBS="-L${buildout:directory}/parts/pcre/lib -lpcre"
[varnish]
recipe = plone.recipe.varnish:instance
daemon = ${buildout:directory}/parts/varnish-build/sbin/varnishd
bind = 127.0.0.1:${buildout:varnish_port}
backends = 127.0.0.1:${buildout:origin_port}
cache-size = 1G
[supervisor]
recipe = collective.recipe.supervisor
port = ${buildout:supervisor_port}
programs =
10 python-httpserver python [-m SimpleHTTPServer ${buildout:origin_port}] .
20 varnish ${buildout:directory}/bin/varnish [-F] .
~/varnish-buildout$ ls -l
total 8
-rw-r----- 1 msabramo pg156676 1853 Apr 28 22:16 mbootstrap.py
-rw-r--r-- 1 msabramo pg156676 947 Apr 28 23:20 buildout.cfg
~/varnish-buildout$ python bootstrap.py
install_dir /tmp/tmpsITHAN
Creating directory '/home/msabramo/varnish-buildout/bin'.
Creating directory '/home/msabramo/varnish-buildout/parts'.
Creating directory '/home/msabramo/varnish-buildout/develop-eggs'.
Generated script '/home/msabramo/varnish-buildout/bin/buildout'.
~/varnish-buildout$ bin/buildout
Installing pcre.
Downloading http://downloads.sourceforge.net/project/pcre/pcre/8.12/pcre-8.12.tar.gz
pcre: Extracting package to /home/msabramo/varnish-buildout/parts/pcre__compile__
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
...
----------------------------------------------------------------------
Libraries have been installed in:
/home/msabramo/varnish-buildout/parts/pcre/lib
...
Installing varnish-build.
Downloading http://repo.varnish-cache.org/source/varnish-2.1.5.tar.gz
varnish-build: Extracting package to /home/msabramo/varnish-buildout/parts/varnish-build__compile__
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
...
Installing varnish.
Installing supervisor.
...
Generated script '/home/msabramo/varnish-buildout/bin/supervisorctl'.
~/varnish-buildout$ bin/supervisord
~/varnish-buildout$ bin/supervisorctl status
python-httpserver RUNNING pid 27854, uptime 0:00:10
varnish RUNNING pid 27855, uptime 0:00:10
~/varnish-buildout$ curl -i http://localhost:8080/buildout.cfg
HTTP/1.0 200 OK
Server: SimpleHTTP/0.6 Python/2.7.1
Date: Fri, 29 Apr 2011 06:23:47 GMT
Content-type: application/octet-stream
Content-Length: 947
Last-Modified: Fri, 29 Apr 2011 06:20:34 GMT
[buildout]
parts = pcre varnish-build varnish supervisor
origin_port = 8080
varnish_port = 8000
supervisor_port = 9002
...
~/varnish-buildout$ curl -i http://localhost:8000/buildout.cfg
HTTP/1.1 200 OK
Server: SimpleHTTP/0.6 Python/2.7.1
Content-type: application/octet-stream
Last-Modified: Fri, 29 Apr 2011 06:20:34 GMT
Content-Length: 947
Date: Fri, 29 Apr 2011 06:23:55 GMT
X-Varnish: 1312236167
Age: 0
Via: 1.1 varnish
Connection: keep-alive
[buildout]
parts = pcre varnish-build varnish supervisor
origin_port = 8080
varnish_port = 8000
supervisor_port = 9002
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.