Created
October 9, 2013 15:46
-
-
Save 1stevengrant/6903362 to your computer and use it in GitHub Desktop.
MPL Puppet manifest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| group { 'puppet': ensure => present } | |
| Exec { path => [ '/bin/', '/sbin/', '/usr/bin/', '/usr/sbin/' ] } | |
| File { owner => 0, group => 0, mode => 0644 } | |
| class {'apt': | |
| always_apt_update => true, | |
| } | |
| Class['::apt::update'] -> Package <| | |
| title != 'python-software-properties' | |
| and title != 'software-properties-common' | |
| |> | |
| apt::key { '4F4EA0AAE5267A6C': } | |
| apt::ppa { 'ppa:ondrej/php5-oldstable': | |
| require => Apt::Key['4F4EA0AAE5267A6C'] | |
| } | |
| class { 'puphpet::dotfiles': } | |
| package { [ | |
| 'build-essential', | |
| 'vim', | |
| 'curl', | |
| 'git-core' | |
| ]: | |
| ensure => 'installed', | |
| } | |
| class { 'apache': } | |
| apache::dotconf { 'custom': | |
| content => 'EnableSendfile Off', | |
| } | |
| apache::module { 'rewrite': } | |
| apache::vhost { 'mpl.dev': | |
| server_name => 'mpl.dev', | |
| serveraliases => [ | |
| 'mpl.dev' | |
| ], | |
| docroot => '/var/www/docroot', | |
| port => '80', | |
| env_variables => [ | |
| ], | |
| priority => '1', | |
| } | |
| class { 'php': | |
| service => 'apache', | |
| service_autorestart => false, | |
| module_prefix => '', | |
| } | |
| php::module { 'php5-mysql': } | |
| php::module { 'php5-cli': } | |
| php::module { 'php5-common': } | |
| php::module { 'php5-curl': } | |
| php::module { 'php5-gd': } | |
| php::module { 'php5-intl': } | |
| php::module { 'php5-mcrypt': } | |
| php::module { 'php5-fpm': } | |
| php::module { 'php-apc': } | |
| class { 'php::devel': | |
| require => Class['php'], | |
| } | |
| class { 'php::pear': | |
| require => Class['php'], | |
| } | |
| class { 'xdebug': | |
| service => 'apache', | |
| } | |
| class { 'composer': | |
| require => Package['php5', 'curl'], | |
| } | |
| puphpet::ini { 'xdebug': | |
| value => [ | |
| 'xdebug.default_enable = 1', | |
| 'xdebug.remote_autostart = 0', | |
| 'xdebug.remote_connect_back = 1', | |
| 'xdebug.remote_enable = 1', | |
| 'xdebug.remote_handler = "dbgp"', | |
| 'xdebug.remote_port = 9000' | |
| ], | |
| ini => '/etc/php5/conf.d/zzz_xdebug.ini', | |
| notify => Service['apache'], | |
| require => Class['php'], | |
| } | |
| puphpet::ini { 'php': | |
| value => [ | |
| 'date.timezone = "Europe/London"' | |
| ], | |
| ini => '/etc/php5/conf.d/zzz_php.ini', | |
| notify => Service['apache'], | |
| require => Class['php'], | |
| } | |
| puphpet::ini { 'custom': | |
| value => [ | |
| 'display_errors = On', | |
| 'error_reporting = E_ALL', | |
| 'display_html_errors = On', | |
| 'memory_limit = 256M' | |
| ], | |
| ini => '/etc/php5/conf.d/zzz_custom.ini', | |
| notify => Service['apache'], | |
| require => Class['php'], | |
| } | |
| class { 'mysql::server': | |
| config_hash => { 'root_password' => 'mplsql' } | |
| } | |
| # PEAR | |
| exec {"pear upgrade": | |
| command => "/usr/bin/pear upgrade", | |
| require => Package['php-pear'], | |
| returns => [ 0, '', ' '] | |
| } | |
| # set channels to auto discover | |
| exec { "pear auto_discover" : | |
| command => "/usr/bin/pear config-set auto_discover 1", | |
| require => [Package['php-pear']] | |
| } | |
| exec { "pear update-channels" : | |
| command => "/usr/bin/pear update-channels", | |
| require => [Package['php-pear']] | |
| } | |
| exec { "pear install phpunit": | |
| command => "/usr/bin/pear install --alldeps PHPUnit", | |
| creates => "/usr/share/php/PHPUnit/Assert.php", | |
| require => Exec['pear update-channels'] | |
| } | |
| exec { "pear install Console_Table": | |
| command => "/usr/bin/pear install --alldeps Console_Table", | |
| creates => "/usr/share/php/Console/Table.php", | |
| require => Exec['pear update-channels'] | |
| } | |
| # Drush install | |
| class { "drush::git::drush" : | |
| require => Package['git-core'] | |
| } | |
| # Drush Aliases | |
| class drush_aliases { | |
| file { '/home/vagrant/.drush': | |
| ensure => directory, | |
| mode => '0755', | |
| owner => 'vagrant', | |
| group => 'vagrant', | |
| } | |
| file { "/home/vagrant/.drush/local.aliases.drushrc.php": | |
| source => "puppet:///modules/drush_aliases/local.aliases.drushrc.php" | |
| } | |
| file { "/home/vagrant/.drush/paullinney.aliases.drushrc.php": | |
| source => "puppet:///modules/drush_aliases/paullinney.aliases.drushrc.php" | |
| } | |
| } | |
| include drush_aliases | |
| # SASS Gems | |
| package { "compass": | |
| ensure => "installed", | |
| provider => "gem", | |
| } | |
| package { "susy": | |
| ensure => "installed", | |
| provider => "gem", | |
| } | |
| package { "breakpoint": | |
| ensure => "installed", | |
| provider => "gem", | |
| } | |
| # Behat install composer | |
| exec { "composer install" : | |
| command => "/usr/local/bin/composer install", | |
| cwd => "/var/www/tests", | |
| creates => "/var/www/tests/bin/behat", | |
| require => Class['composer'] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment