Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Morphodo application chef recipe to setup Debian, Ubuntu, Apache2, MySQL, PHP5
Ruby Shell
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
attributes
files/default
providers
recipes
resources
templates/default
README.rst
metadata.rb

README.rst

Application cookbook

Author: Michael Klapper <development@morphodo.com>
Description: Chef recipe to install LAMP environments
Homepage: http://www.morphodo.com
Tags: Apache2, MySQL, PHP5, Hosts file, Sandbox

How to use

Configure default ubuntu environment

To use the default setup just include the recipe as follow:

include_recipe "mp_application"

This will purge and install recommend Ubuntu packages.

You can overwrite the following attributes to manipulate the installed packages.

default.mp_application.packages.purge
default.mp_application.packages.upgrade

Install Apache2 vhost

Set up custom vhost in /var/www/project-name/sandbox/htdocs just call the resource provider mp_application_apache2

include_recipe "mp_application::apache2"

mp_application_apache2 "project-name" do
        environment "sandbox"
        domain "www.sandbox.project-name.local"
end

Add the new domain to the /etc/hosts file:

mp_application_hosts %w{www.sandbox.project-name.local sandbox.project-name.local} do
        action :add
end

Install MySQL database

Creating a new database and custom user with access to the new database is such easy as the example below:

include_recipe "mp_application::mysql"

mp_application_mysql "database_name" do
        password "secrete_password"
        action :create
end

This results in a new created database with character set UTF-8 a new user with the same name as the database name.

Install PHP5

Install the latest stable PHP5 version is done by including the php recipe.

include_recipe "mp_application::php"

This recipe contains also php-apc, php5-mcrypt, php5-curl, php5-gd, php5-mysql, php5-sqlite packages.

Additional sandbox recipe

You can use the sandbox recipe on your Vagrant development environment to enable PHP5-xdebug.

include_recipe "mp_application::sandbox"

The mp_application cookbook in action

There is a TYPO3 Flow based test plan tool PylonWorks.Essencebase wich uses this cookbook to setup a sandbox to provide a consistent environment to the development team.

TODO

PHP

Configure browsercap.ini see: http://israelwebdev.wordpress.com/2010/10/19/automatically-update-your-php_browscap-ini/

::

git clone https://github.com/phadej/igbinary cd igbinary && phpize ./configure CFLAGS="-O2 -g" --enable-igbinary --with-php-config=/usr/bin/php-config5 make cd /etc/php5/conf.d/

Add the following lines to igbinary.ini extension=igbinary.so session.serialize_handler=igbinary igbinary.compact_strings=On apc.serializer=igbinary ; only if you want apc to use igbinary

btw, if you're using igbinary, be sure you have igbinary.compact_strings=0 in your php ini :)

SSH

Something went wrong with that request. Please try again.