Thanks for wanting to contribute to Chef! There are many ways to get involved in various areas of the project, tools, and documentation. This document will help you get started; the links below point to how-to-contribute information for each project.
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
let(:runner) do | |
memoized_runner('pd-gocd::agent') do |node| | |
#..... | |
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
# Using chef to create files with a time stamp or similar - in this case, | |
# the serial number in a DNS zone file - presents a problem, because the | |
# time stamp interferes with with idempotency. Here is a trick for solving | |
# this (thanks to Noah Kantrowitz for his input and suggestion!) | |
# The trick is to use the same template twice, once with a constant serial | |
# number to check for idempotency, and a second time with the "real" serial | |
# number. The actual serial number can be stored in an attribute. | |
# Initial serial number for the zone |
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
execute 'apt-get source redis-server=2:2.8.19-3' do | |
cwd '/opt/foo' | |
creares '/opt/foo/redis-2.8.19' | |
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
config(:chef, node_name: 'foo', client_key: '/path/to/client.pem', chef_server_url: 'https://foo.bar.com') | |
config(:ssh, user: 'foo', password: 'bar') | |
[ | |
'sudo apt-get remove chef --purge -y', | |
'sudo rm -rf /opt/chef', | |
'sudo rm -rf /etc/chef/client.d', | |
'wget -c https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/13.04/x86_64/chef-xxx.deb', | |
'sudo dpkg -i chef-xxx.deb', | |
'sudo env -i /opt/chef/bin/chef-client', | |
'rm chef-xxx.deb' |
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
tweets = Twitter.search("#devops", | |
:count => 100, | |
:result_type => "recent").results |
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
#!/bin/bash | |
# As the "bufferbloat" folks have recently re-discovered and/or more widely | |
# publicized, congestion avoidance algorithms (such as those found in TCP) do | |
# a great job of allowing network endpoints to negotiate transfer rates that | |
# maximize a link's bandwidth usage without unduly penalizing any particular | |
# stream. This allows bulk transfer streams to use the maximum available | |
# bandwidth without affecting the latency of non-bulk (e.g. interactive) | |
# streams. |
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
# cookbooks/nokogiri/recipes/default.rb | |
stage "install_deps" do | |
run_list "recipe[nokogiri::deps]" | |
end | |
stage "install_gem" do | |
run_list "recipe[nokogiri::gem]" | |
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
ruby_block "some command" do | |
block do | |
c = Mixlib::Shelout.new("ls -l") | |
c.run_command | |
c.stdout # do something exciting with c.stdout | |
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
[berkshefl] $ berks upload | |
Using apache2 (1.6.0) | |
Using java (1.10.0) | |
Using yum (2.1.0) | |
Using s3cmd (0.0.0) at path: 'site-cookbooks/s3cmd' | |
Using as_app (0.0.3) at path: 'site-cookbooks/as_app' | |
Using rabbitmq (0.0.0) at path: 'site-cookbooks/rabbitmq' | |
Using solr (0.0.0) at path: 'site-cookbooks/solr' | |
Using windows (1.8.4) | |
Using chef_handler (1.1.4) |