Skip to content

RBINS/virtualcollections

Repository files navigation

BUILDOUT FOR virtualcollections DOCUMENTATION

NOTE ABOUT plone.app.widgets

we forked a bunch of packages to support collection folder listing.

Thus the upgrade to plone5 will be hard as upstream didnt want it ...

INSTALLING THIS PROJECT

cd virtualcollections
mkdir workdir
git clone ssh://git@github.com:orga/project.git virtualcollections
sudo apt-get install -y build-essential m4 libtool pkg-config autoconf gettext bzip2 groff man-db automake libsigc++-2.0-dev tcl8.5 git libssl-dev libxml2-dev libxslt1-dev libbz2-dev zlib1g-dev python-setuptools python-dev libjpeg62-dev libreadline-dev python-imaging wv poppler-utils libsqlite0-dev libgdbm-dev libdb-dev tcl8.5-dev tcl8.5-dev tcl8.4 tcl8.4-dev tk8.5-dev libsqlite3-dev libcurl4-openssl-dev

Run buildout:

touch etc/sys/settings-local.cfg # or cp etc/sys/settings.cfg etc/sys/settings-local.cfg
python bootstrap.py -dc <buildout>
bin/buildout -Nc <buildout>

OVERRIDE DEFAULT SETTINGS

On the first checkout you need to create etc/sys/settings-local.cfg/ You can either create an empty file or copy etc/sys/settings.cfg and adapt it to your needs. Edit the etc/sys/settings-local.cfg file.:

etc/sys
|
|-- settings.cfg       -> various common settings (crons hours, hosts, installation paths, ports, passwords)
`-- settings-local.cfg -> override locally the common settings (do not commit the file)

PRODUCTION MODE

To make your application safe for production, run the buildout-prod.cfg buildout'. It extends this one with additionnal crontabs and backup scripts and some additionnal instances creation.

BASE BUILDOUTS WHICH DO ONLY SCHEDULE PARTS FROM THERE & THERE

|-- etc/base.cfg               -> The base buildout
|-- buildout-prod.cfg          -> buildout for production
|-- buildout-dev.cfg           -> buildout for development

PROJECT Files

- Think you have the most important sections of this buildout configuration in etc/virtualcollections.cfg Set the project developement specific settings there :

etc/project/
|-- plone.cfg       -> your project needs (packages, sources, product, version spinngss)
|-- versions.cfg    -> your project version pinnings (KGS)
`-- kgs.cfg         -> autogenerated to be manual merged in your project version pinngs.
etc/init.d/                 -> various init script (eg supervisor)
etc/logrotate.d/            -> various logrotate configuration files
etc/sys/
|-- ha.cfg           -> Project loadbalancer settings
|-- supervisor.cfg   -> Project production settings for supervision
|-- system.cfg       -> Project settings for reverse proxies, cron & logrotation

We generate two virtualhosts for a cliassical apache or nginxsetup, mostly ready but feel free to copy/adapt.

In settings.cfg you have now some settings for declaring which host is your reverse proxy backend & the vhost mounting:
  • hosts:zope-front / ports:zope-front -> zope front backend
  • v:reverse-proxy-host / v:reverse-proxy-port / reverseproxy:mount-point -> host / port / mountpoint on the reverse proxy)

CONFIGURATION TEMPLATES

etc/templates/
|-- ha/balancer.conf.template   -> haproxy template.
|-- logrotate.conf.template     -> logrotate configuration file template for your Zope logs
|-- www                         -> templates for www proxies
`-- supervisor/supervisor.initd -> template for supervisor init script