Charm: lamp
Summary
set up an apache server with php and supports a connection to mysql
Charm Store
juju deploy cs:precise/lamp-1
Maintainer
Victor Palau
Series
precise
Description
Provides a working webserver - Runtime: - PHP - MySQL: - /var/webconfig/mysql contains the ip of the latest mysql server to use - /var/webconfig/{ip} contains the details to be able to connect to the db - /var/webconfig/opendb.php opens a connection to the db - mysql_conf is used to setup the db, either add it to config/ in charm or bzr branch
Links
Repository   Bugs
lp:~charmers/charms/precise/lamp/trunk
Interfaces
Provides
Requires
Config
database-user string
website-bzr string
bzr-update string
website-database string
Details
Readme
# Overview
The first thing the LAMP charm does is to install and configure a new instance with Apache and PHP5. The charm will then copy any files under /website  inside the charm folder structure, into /var/www. 

It also allows you to specify a Bazaar branch. It will clone the branch into the webserver and copy the contents to /var/www. As an example set:
juju set lamp website-bzr="lp:~vtuson/+junk/mytodo_web"

You can set up a relationship with a Mysql service. A Mysql database is created by default at this time. You can change the name of the database as a configuration options.

juju set lamp website-database="your_db_name"

If you provide a file called mysql_config either on the /website folder or in the root of you Bazaar branch, this will be used to configure further the Mysql database. PLease note that this file is called every time a new unit is created. For example, item creation should first check if the table exists.

The charm will store the details of the relationship in /var/webconfig. In there you can also find opendb.php, a basic script that will open the connection to the MySQL database for you.
Changes  
2012/10/10 Robert Ayres Setting revision to 1 (revno 15)
2012/10/09 Victor Palau fix some bugs I discovered with testing (revno 14)
2012/10/09 Victor Palau fix latest comments from charm review (revno 13)
2012/10/08 Victor Palau fixed bugs and comments from latest review (revno 12)
2012/10/02 Victor Palau changed the charm to use mysql-shared (revno 11)
2012/10/02 Victor Palau fixed all comments in this version, but still using db-admin (revno 10)
2012/09/28 Victor Palau part1 of changes implementing charm review feedback (revno 9)
2012/09/26 Victor Palau small change (revno 8)
2012/09/26 Victor Palau small polishing of information and testing in amazon (revno 7)
In other archives
~vtuson:precise/lamp