Comment 1 for bug 899849

Clint Byrum (clint-fewbar) wrote :

Nick! Thanks, this is great! It deploys as the readme suggests, and I was able to add-unit without errors, though load balancing was not working (see below).

There is one blocking change needed before it can be official.

You need to cryptographically verify the source of the php5-zip extension and limesurvey itself.

I'd suggest using charm-helpers, like this:

add-apt-repository ppa:charmers/charm-helpers
apt-get update
apt-get install charm-helper-sh

. /usr/share/charm-helper/sh/
ch_get_file "xxxxxxxxxx"

where xxxxxx is the sha256sum of the file (works with sha1 or md5 too..)

And the same for the limesurvey file. You'll probably have to choose a specific version of limesurvey so that you can embed the md5sum. If you want it to be dynamic and always get the latest limesurvey, you'll need an HTTPS source of hashes for the files, which I don't believe sourceforge or pecl offer unfortunately.

Some other stuff that is not a blocker for inclusion in lp:charm but need to be fixed at some point...


website-relation-joined, use `unit-get private-address` instead of `hostname -f`. `hostname -f` is unreliable in many environments.


I think you'll have to make the rooturl a config option, though leaving it blank can probably safely be left as the public hostname of the instance. Otherwise load balancing more than one limesurvey will be impossible. It looks like the install guide recommends leaving this set to $SERVER['SERVER_NAME']. I'm not sure if this will work though.


When using ServerName/VirtualHost, you need to remove the default site, so that the nodes can be load balanced (its hard to predict which site Apache will choose as the "Default" virtualhost, so make it the only virtualhost). I deployed under a load balancer and got the "It Works!" page. a2dissite default should do the trick.


The session handler is, by default, file. You will want to add a peer relation that changes the session handler to 'db' when units are added so that load balancing works without persistence.


Next steps:

Once the first bug is fixed, just comment back here and we'll take another look. The others should either be fixed now, or added as bug reports once the charm is in lp:charm.