This file contains 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
# make the images directory writable by apache's user so that we can upload stuff | |
directory "#{node['mediawiki']['directory']}/images" do | |
owner "www-data" | |
mode "0755" | |
recursive true | |
end |
This file contains 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
:( ( 05/02/13@12:02PM )( ben@BenH ):~/git/opscode-cookbooks/zsh@master✔ | |
➜ bundle exec kitchen test 1 | |
-----> Starting Kitchen | |
>>>>>> ------Exception------- | |
>>>>>> Class: Kitchen::ShellOut::ShellCommandFailed | |
>>>>>> Message: Expected process to exit with [0], but received '231' | |
---- Begin output of vagrant --version ---- | |
STDOUT: | |
STDERR: Vagrant failed to initialize at a very early stage: |
This file contains 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
:( ( 04/29/13@ 1:41PM )( ben@BenH ):~chef/cookbooks/ganglia_parse@master✗ ✭ | |
➜ berks update 1 | |
Using ganglia (0.1.2) at path: '/Users/ben/git/chef-repo/cookbooks/ganglia' | |
Using ganglia_parse (0.1.0) at path: '/Users/ben/git/chef-repo/cookbooks/ganglia_parse' | |
Using graphite (0.4.2) | |
Using python (1.2.2) | |
Using build-essential (1.4.0) | |
Using yum (2.2.0) | |
Using apache2 (1.6.2) | |
Using runit (0.16.2) |
This file contains 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
➜ cat metadata.rb 1 | |
name "apt" | |
maintainer "Opscode, Inc." | |
maintainer_email "[email protected]" | |
license "Apache 2.0" | |
description "Configures apt and apt services and LWRPs for managing apt repositories and preferences" | |
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) | |
version "1.7.0" | |
recipe "apt", "Runs apt-get update during compile phase and sets up preseed directories" | |
recipe "apt::cacher-ng", "Set up an apt-cacher-ng caching proxy" |
This file contains 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
task :start_robut do | |
run "cd #{current_path}/devtools/pfbot; nohup bundle exec robut > /dev/null 2>&1 & sleep2" | |
end |
This file contains 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
task :start_robut do | |
run "cd #{current_path}/devtools/pfbot; nohup bundle exec robut > /dev/null 2>&1 &" | |
end |
This file contains 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
1.9.3p327 :009 > a = true | |
=> true | |
1.9.3p327 :010 > template = "a is <%= a %>." | |
=> "a is <%= a %>." | |
1.9.3p327 :011 > ERB.new(template).result(binding) | |
=> "a is true." |
This file contains 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
This works in chef11 but not chef10. Do I try and make it work or sigh and force a chef client upgrade? | |
26 needs_mongo_gem = (node.recipe?("mongodb::replicaset") or node.recipe?("mongodb::mongos")) | |
27 | |
28 if needs_mongo_gem | |
29 # install the mongo ruby gem at compile time to make it globally available | |
30 gem_package 'mongo' do | |
31 action :nothing | |
32 end.run_action(:install) | |
33 Gem.clear_paths |
This file contains 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
# if the host has ganglia, install the mongo plugin. | |
if node.recipes.include?("ganglia::default") | |
include_recipe "ganglia::default" | |
ganglia_python "mongodb" do | |
action :enable | |
end | |
end |
This file contains 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
def Init_Metric (line, name, tmax, type, units, slope, fmt, desc, handler): | |
'''Create a metric definition dictionary object for a device.''' | |
metric_name = line[0] + '-' + name | |
d = {'name': metric_name.replace('/', '-').lstrip('-'), | |
'call_back': handler, | |
'time_max': tmax, | |
'value_type': type, | |
'units': units, | |
'slope': slope, |