Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node monit tweaks #410

Open
wants to merge 39 commits into
base: release-chef-11.10
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
5f002d8
Update php recipe
cmorford Apr 21, 2017
8e76e20
Add timezone recipe
cmorford Apr 21, 2017
650ad13
Tweak php packages
cmorford Apr 21, 2017
f585389
Add newrelic cookbook
cmorford Apr 21, 2017
1775256
Add install command for newrelic-infra
cmorford Apr 21, 2017
5989fd4
Tweak install command
cmorford Apr 21, 2017
3b8f8d7
Disable gpgcheck
cmorford Apr 21, 2017
a760d3b
Add environment variable
cmorford Apr 21, 2017
5d4fd0f
Remove deploy node
cmorford Apr 21, 2017
55a3692
Revert
cmorford Apr 21, 2017
581f8c5
Moved environment var
cmorford Apr 21, 2017
793f90b
Merge pull request #1 from BigBlueSwimSchool/develop
cmorford Apr 22, 2017
c30f258
Change user of newrelic configs
cmorford Apr 22, 2017
7e0ed70
Merge pull request #2 from BigBlueSwimSchool/develop
cmorford Apr 22, 2017
17f25af
Fix newrelic yml formatting
cmorford Apr 22, 2017
ec3b9d4
Merge pull request #3 from BigBlueSwimSchool/develop
cmorford Apr 22, 2017
4d0236c
Update opsworks_nodejs config
cmorford Apr 22, 2017
c3fc486
nodejs deploy update
cmorford Apr 22, 2017
2227d4f
Merge branch 'develop' of github.com:BigBlueSwimSchool/opsworks-cookb…
cmorford Apr 22, 2017
eaf22c9
Update nginx config
cmorford Apr 22, 2017
c2f5cf3
Update nginx configs
cmorford Apr 22, 2017
e090604
Update nginx api for CORS. Restart nginx on configure
cmorford Apr 24, 2017
7eec3c6
Add always parameter
cmorford Apr 24, 2017
67628bc
Add new relic php app installation recipe
cmorford May 4, 2017
5f8d8fc
Tweak recipe to keep scripts quiet
cmorford May 4, 2017
6df9129
Only install rpm if not installed
cmorford May 4, 2017
5dfe0d6
Add new relic repo
cmorford May 4, 2017
c8c4e12
We're using httpd for the agent
cmorford May 4, 2017
5e64628
Merge pull request #5 from BigBlueSwimSchool/develop
cmorford May 4, 2017
4a0d528
Add models configuration
cmorford May 9, 2017
ea69944
Add models to nodejs definitions
cmorford May 16, 2017
84debfc
Test version update
cmorford May 16, 2017
622c9a1
Nope
cmorford May 16, 2017
0d4ced8
Merge pull request #6 from BigBlueSwimSchool/develop
cmorford May 25, 2017
e154936
Tweak check url
cmorford May 30, 2017
9dc8313
Add environment variables
cmorford May 30, 2017
6509c48
Fixed syntax error
cmorford May 30, 2017
6400ebc
Log debug
cmorford May 30, 2017
63b58cc
Fix environment var path
cmorford May 30, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ _yardoc
doc/
/Gemfile.lock
build
.DS_Store
9 changes: 8 additions & 1 deletion deploy/definitions/opsworks_nodejs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
mode '0660'
owner deploy[:user]
group deploy[:group]
variables(:database => deploy[:database], :memcached => deploy[:memcached], :layers => node[:opsworks][:layers])
variables(
:database => deploy[:database],
:memcached => deploy[:memcached],
:layers => node[:opsworks][:layers],
:services => node[:services],
:models => node[:models],
:elasticsearch => node[:elasticsearch]
)
end

template "#{node.default[:monit][:conf_dir]}/node_web_app-#{application}.monitrc" do
Expand Down
20 changes: 20 additions & 0 deletions mod_php5_apache2/attributes/customize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,23 @@
# 'php-pear-Auth-SASL',
# 'php-mysql',
# 'php-mcrypt' ]

normal[:mod_php5_apache2][:packages] = [
"php-xml",
"php-common",
"php-xmlrpc",
"php-devel",
"php-gd",
"php-cli",
"php-pear-Auth-SASL",
"php-mcrypt",
"php-pecl-memcached",
"php-pear",
"php-pear-XML-Parser",
"php-pear-DB",
"php-pear-HTML-Common",
"php",
"php-devel",
"php-pear-Mail",
"php-pear-Mail-Mime"
]
Empty file.
1 change: 1 addition & 0 deletions newrelic/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include_attribute 'newrelic'
5 changes: 5 additions & 0 deletions newrelic/metadata.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name "newrelic"
description 'Cookbooks for newrelic server and application monitoring'
maintainer "Casey Morford"
license "Apache 2.0"
version "1.0.0"
33 changes: 33 additions & 0 deletions newrelic/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
node[:deploy].each do |application, deploy|

template "/etc/newrelic-infra.yml" do
cookbook 'newrelic'
source 'newrelic-infra.yml.erb'
mode '0660'
owner 'root'
group 'root'
variables(
:license_key => node[:newrelic][:license],
:environment => node[:newrelic][:environment]
)
end

template "/etc/yum.repos.d/newrelic-infra.repo" do
cookbook 'newrelic'
source 'newrelic-infra.repo.erb'
mode '0660'
owner 'root'
group 'root'
end

execute "update yum cache" do
Chef::Log.debug("newrelic::update yum cache")
command "yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra'"
end

execute "install newrelic-infra" do
Chef::Log.debug("newrelic::installing newrelic-infra")
command "sudo yum install newrelic-infra -y"
end

end
37 changes: 37 additions & 0 deletions newrelic/recipes/php.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
node[:deploy].each do |application, deploy|

template "/etc/php.d/newrelic.ini" do
cookbook 'newrelic'
source 'newrelic.ini.erb'
mode '0660'
owner 'root'
group 'root'
variables(
:license_key => node[:newrelic][:license],
:app_name => node[:newrelic][:app_name]
)
end

template "/etc/yum.repos.d/newrelic.repo" do
cookbook 'newrelic'
source 'newrelic.repo.erb'
mode '0660'
owner 'root'
group 'root'
end

execute "install newrelic-php5" do
Chef::Log.debug("newrelic::installing newrelic-php5")
command "sudo yum -y install newrelic-php5"
end

execute "setup newrelic-php5" do
Chef::Log.debug("newrelic::setting up newrelic-php5")
command "sudo NR_INSTALL_SILENT=true newrelic-install install"
end

service "httpd" do
action :restart
end

end
5 changes: 5 additions & 0 deletions newrelic/templates/default/newrelic-infra.repo.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[newrelic-infra]
name=New Relic Infrastructure
baseurl=http://download.newrelic.com/infrastructure_agent/linux/yum/el/6/x86_64
enable=1
gpgcheck=0
3 changes: 3 additions & 0 deletions newrelic/templates/default/newrelic-infra.yml.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
license_key: <%= @license_key %>
custom_attributes:
environment: <%= @environment %>
Loading