spip #3

Supports: precise
Add to new model

Description

SPIP is a publishing system for the Internet in which great importance is attached to collaborative working, to multilingual environments, and to simplicity of use for web authors. SPIP's benefit consists in: * managing a magazine type site i.e. made up mainly of articles and news items inserted in an arborescence of sections nested in each others. * completely separating and distributing three kinds of tasks over various players: the graphic design, the site editorial input through the submission of articles and news items and the site editorial management. * spare the webmaster and all the participants to the life of the site, a number of tedious aspects of web publishing as well as the need to learn lengthy technical skills. SPIP allows you to start creating your sections and articles straight away.


Overview

This charm provides an SPIP service. SPIP is a publication blog plateform.

Usage

Simple deployment

juju deploy mysql
juju deploy spip
juju add-relation mysql spip
juju expose spip

One box deployment

juju deploy mysql
juju deploy --to <mysql machine number> spip
juju add-relation mysql spip
juju expose spip

Associate a floating ip to the spip service.

With a web browser, go to http://your.spip.service.ip/spip/ecrire. Select your site's language and click on Next. The "Connection to your database" Step 1 has already been performed by the charm, click on Next. Do not change the "prefix" setting on the "Choosing your database" Step 2, just click on Next. Fill in the form related to your personal information on Step 3, then click on Next. Step 4 may take some time to run. If it fails, go back to http://your.spip.service.ip/spip/ecrire and perform the same steps. If everything worked all right, you should end up on a page with the following message:

Done!

SPIP is now ready for use

You still have to click on the "private area" button. Even if you experience an error message, the spip site should be installed.

The public site is available at http://your.spip.service.ip/spip/ The admin site is available at http://your.spip.service.ip/spip/ecrire

Load balancing deployement

There are still several problems to cope with when using Spip behind a load balancer:

  • Some directories will be shared on an nfs mount point (IMG, plugins and squelettes). As each spip server is unaware of the others, things may not work as expected if two spip machines try to write concurrently on the same data (for example, trying to upload two images at the same time).

  • Authentication. Each spip server is using some cookies to authenticate users. As each server generate its own set of cookies, any access requiring an authentication may result in generating a new login prompt each time a new Spip server is involved.

If spip was using sessions to manage authentication, a solution could be to use memcached. However, this does not seems to be the case (even with a php.ini configured to use a shared memcached server for the session, several authentication prompts happens).

To work around this problem, cookie authentication is disabled by default in the db-relation-changed hook by setting ignore_remote_user to true in /var/www/spip/config/mes_options.php.

This way, authentication is based on a simple http auth protocol.

Even then, you will have to authenticate at least once on each real SPIP server added as a unit to the spip service.

juju deploy nfs
juju deploy mysql
juju deploy spip
juju deploy haproxy

juju set haproxy default_timeouts="queue 7000, connect 7000, client 7000, server 7000"

juju add-relation spip mysql
juju add-relation nfs spip:nfs
juju add-relation spip haproxy

juju expose haproxy

Associate a floating ip to the haproxy service

With a web browser, go to http://your.haproxy.service.ip/spip/ecrire. Select your site's language and click on Next. The "Connection to your database" Step 1 has already be performed by the charm, click on Next. Do not change the "prefix" setting on the "Choosing your database" Step 2, just click on Next. Fill the form related to your personal information on Step 3, then click on Next. Step 4 may take some time to run. If it fail, go back to http://your.haproxy.service.ip/spip/ecrire and perform the same steps. If everything worked all right, you should end up on a page with the following message:

Done!

SPIP is now ready for use

You still have to click on the "private area" area button. Even if you experience an error message, the spip site should be installed.

The public site is available at http://your.spip.service.ip/spip/ The admin site is available at http://your.spip.service.ip/spip/ecrire

Now, you can add some spip units:

juju add-unit spip

Configuration

By default, the charm deploys the packaged version of spip. If you want to deploy another version, use spip-origin. Currently the only available value is 3.0.5

For example, create a spip.cfg file with the following content:

spip:
   spip-origin: 3.0.5

And deploy the charm with:

juju deploy --config=spip.cfg spip

Contact Information

Author: Pierre Amadio pierre.amadio@canonical.com Report bugs at: http://bugs.launchpad.net/charms Location: http://jujucharms.com


Configuration

spip-origin
(string) Where to get the sources of spip from. distro (default): from apt-get 3.0.5 : upstream http://files.spip.org/spip/stable/spip-3.0.zip?1352900441
distro