Description
The LAMP (Linux, Apache, MySQL, PHP) all-in-one server serves a PHP application using a MySQL database backend on a single instance. The current version is suitable for single-server test and development purposes as regular backups of the database is not yet implemented.
Technical Overview
The LAMP ServerTemplate installs MySQL and Apache with PHP on a single instance. The application code is downloaded from a git repository and placed into the webserver directory to be hosted. The downloaded application should also contain the database dump file, which is then imported into MySQL. The following scripts (in running order) provide details on what occurs on boot:
-
ephemeral_lvm::default - This recipe sets up available ephemeral devices to be an LVM device, formats it, and mounts it.
-
rs-base::default - All-in-one recipe to run recipes required for optimal server managment within the RightScale management platform.
-
rs-lamp::default - This recipe simply sets up some attributes of rs-mysql and rs-application_php cookbooks to setup an all-in-one LAMP server. These attributes will be used by rs-mysql::default and rs-application_php::default recipes.
-
rs-mysql::default - Installs the MySQL server and tunes the attributes used in the my.cnf based on the available system memory and the server usage type. If the server usage type is 'dedicated', all resources in the system are dedicated to the MySQL server and if the usage type is 'shared', only half of the resources are used for the MySQL server. This 'shared' usage will be used in building a LAMP stack where the same system is used to run both the MySQL server and the PHP application server. This recipe also tags the server as a standalone MySQL server.
-
rs-mysql::collectd - Installs the collectd plugins for MySQL.
-
rs-application_php::default - Based on the attributes provided, this recipe will deploy the given application using the application LWRP.
-
rs-application_php::collectd - This recipe sets up collectd monitoring for the application server by installing the collectd package for Apache.
-
rs-lamp::dump_import - This recipe imports a dump file given the location of the dump file relative to the root of the repository in the ‘rs-lamp/dump_file’ attribute.
Software Application Versions
- Apache 2.2
- MySQL 5.5
- PHP 5.3