Commit 88519854 authored by Felipe Salum's avatar Felipe Salum Committed by Matthew Haughton
Browse files

fixing php conf dir for Debian/Ubuntu new PHP release

parent 52415602
pkg/
Gemfile.lock
.vagrant
......@@ -4,6 +4,14 @@ Release notes for the fsalum-newrelic module.
------------------------------------------
#### 4.0.1 - 2014-08-13
* Added warning for deprecated classes `newrelic::server` and `newrelic::php`
* PR #16 - Added missing newrelic.capture_params to newrelic.ini.erb (@brentclark)
* PR #17 - change 'newrelic::server' to be a class (@3flex)
* PR #18 - tweak apt::source declaration (@3flex)
* PR #19 - Remove unneeded exec (@3flex)
#### 4.0.0 - 2014-06-29
* Refactored the module, test before pushing to production
......
......@@ -16,6 +16,9 @@ IMPORTANT
Module version 4.x was refactored. A lot of parameters were added, removed, renamed or changed.
Module version 4.0.1 is moving away from defined classes, deprecation warnings were added.
Using the new classes is backwards compatible.
Review all the parameters you use before deploying this module in production.
Quick Start
......@@ -39,7 +42,7 @@ If you use Ubuntu 14.04 and php5-fpm you can pass an array of directories for PH
class {'newrelic::agent::php':
newrelic_license_key => 'your license key here',
newrelic_ini_appname => 'Your PHP Application',
newrelic_php_conf_dir => ['/etc/php5/apache2/conf.d','/etc/php5/fpm/conf.d'],
newrelic_php_conf_dir => ['/etc/php5/mods-available/conf.d','/etc/php5/fpm/conf.d'],
}
Parameters
......@@ -54,7 +57,7 @@ Mandatory parameters:
Copyright and License
---------------------
Copyright (C) 2012 Felipe Salum
Copyright (C) 2014 Felipe Salum
Felipe Salum can be contacted at: fsalum@gmail.com
......
......@@ -7,16 +7,16 @@ if ENV['VAGRANT_HOME'].nil?
end
newrelic = {
:'centos65' => { :memory => '120', :ip => '10.1.2.13', :box => 'puppetlabs/centos-6.5-64-puppet', :domain => 'newrelic.local' },
:'trusty' => { :memory => '360', :ip => '10.1.2.14', :box => 'ubuntu/trusty64', :domain => 'newrelic.local' },
:'saucy' => { :memory => '120', :ip => '10.1.2.15', :box => 'puppetlabs/ubuntu-13.10-64-puppet', :domain => 'newrelic.local' },
:'precise' => { :memory => '120', :ip => '10.1.2.16', :box => 'puppetlabs/ubuntu-12.04-64-puppet', :domain => 'newrelic.local' },
:'debian74' => { :memory => '120', :ip => '10.1.2.17', :box => 'puppetlabs/debian-7.4-64-puppet', :domain => 'newrelic.local' },
:'centos5' => { :memory => '120', :ip => '10.1.2.10', :box => 'puppetlabs/centos-5.10-64-puppet', :domain => 'newrelic.local' },
:'centos65' => { :memory => '120', :ip => '10.1.2.11', :box => 'puppetlabs/centos-6.5-64-puppet', :domain => 'newrelic.local' },
:'precise' => { :memory => '120', :ip => '10.1.2.20', :box => 'puppetlabs/ubuntu-12.04-64-puppet', :domain => 'newrelic.local' },
:'saucy' => { :memory => '120', :ip => '10.1.2.21', :box => 'puppetlabs/ubuntu-13.10-64-puppet', :domain => 'newrelic.local' },
:'trusty' => { :memory => '360', :ip => '10.1.2.22', :box => 'puppetlabs/ubuntu-14.04-64-puppet', :domain => 'newrelic.local' },
:'squeeze' => { :memory => '120', :ip => '10.1.2.30', :box => 'puppetlabs/debian-6.0.9-64-puppet', :domain => 'newrelic.local' },
:'wheezy' => { :memory => '120', :ip => '10.1.2.31', :box => 'puppetlabs/debian-7.5-64-puppet', :domain => 'newrelic.local' },
}
Vagrant::Config.run("2") do |config|
config.vbguest.auto_update = false
config.hostmanager.enabled = false
newrelic.each_pair do |name, opts|
config.vm.define name do |n|
......
......@@ -30,7 +30,6 @@ class newrelic::params {
$newrelic_service_name = 'newrelic-sysmond'
$newrelic_php_package = 'newrelic-php5'
$newrelic_php_service = 'newrelic-daemon'
$newrelic_php_conf_dir = ['/etc/php5/conf.d']
apt::source { 'newrelic':
location => 'http://apt.newrelic.com/debian/',
repos => 'non-free',
......@@ -39,6 +38,31 @@ class newrelic::params {
include_src => false,
release => 'newrelic',
}
case $::operatingsystem {
'Debian': {
case $::operatingsystemrelease {
/^6/: {
$newrelic_php_conf_dir = ['/etc/php5/conf.d']
}
default: {
$newrelic_php_conf_dir = ['/etc/php5/mods-available']
}
}
}
'Ubuntu': {
case $::operatingsystemrelease {
/^(10|12)/: {
$newrelic_php_conf_dir = ['/etc/php5/conf.d']
}
default: {
$newrelic_php_conf_dir = ['/etc/php5/mods-available']
}
}
}
default: {
$newrelic_php_conf_dir = ['/etc/php5/conf.d']
}
}
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat and Debian")
......
......@@ -2,11 +2,10 @@
node default {
newrelic::server {
'webXYZ-app':
newrelic_license_key => 'your license key here',
newrelic_package_ensure => 'latest',
newrelic_service_ensure => 'running',
class {'newrelic::server::linux':
newrelic_license_key => '',
newrelic_package_ensure => 'latest',
newrelic_service_ensure => 'running',
}
}
......@@ -8,13 +8,13 @@ node default {
class { '::apache::mod::php': }
class {'newrelic::server::linux':
newrelic_license_key => '',
newrelic_license_key => '',
}
class {'newrelic::agent::php':
newrelic_license_key => '',
#newrelic_php_conf_dir => ['/etc/php5/apache2/conf.d','/etc/php5/fpm/conf.d'],
require => Class['Apache::mod::php'],
newrelic_license_key => '',
#newrelic_php_conf_dir => ['/etc/php5/apache2/conf.d','/etc/php5/fpm/conf.d'],
require => Class['Apache::mod::php'],
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment