~jorge/charms/precise/lamp/readme-fixes

1 by Victor Palau
lamp charm
1
# Overview
7 by Victor Palau
small polishing of information and testing in amazon
2
16 by Jorge O. Castro
Formatting and clarity fixes.
3
The first thing the LAMP charm does is to install and configure a new instance with Apache, PHP5, and MySQL. The charm will then copy any files under /website inside the charm folder structure into /var/www. 
4
5
You can set up a relationship with a Mysql service if you wish to use another database on another instance. A Mysql database is created by default at this time. You can change the name of the database as a configuration options.
6
7
    juju set lamp website-database="your_db_name"
8
9
It also allows you to specify a Bazaar branch if you wish to keep your website in version control and deploy it to the instance. It will clone the branch into the webserver and copy the contents to /var/www. As an example set:
10
11
    juju set lamp website-bzr="lp:~vtuson/+junk/mytodo_web"
12
13
If you provide a file called mysql_config either in the /website folder or in the root of you Bazaar branch, this will be used to further configure 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.
14
15
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.
16