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
package main | |
import ( | |
"fmt" | |
"github.com/boltdb/bolt" | |
"os" | |
"time" | |
) | |
const bucket = "timers" |
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
Received: by 10.194.72.228 with SMTP id g4csp30259wjv; | |
Tue, 30 Aug 2016 13:32:34 -0700 (PDT) | |
X-Received: by 10.202.245.88 with SMTP id t85mr5521820oih.202.1472589154488; | |
Tue, 30 Aug 2016 13:32:34 -0700 (PDT) | |
Return-Path: <[email protected]> | |
Received: from SNT004-OMC1S9.hotmail.com (snt004-omc1s9.hotmail.com. [65.55.90.20]) | |
by mx.google.com with ESMTPS id o41si11702005oto.113.2016.08.30.13.32.34 | |
for <[email protected]> | |
(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); |
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
import( | |
"github.com/docker/engine-api/client" | |
"github.com/docker/engine-api/types" | |
) | |
func Squash() { | |
defaultHeaders := map[string]string{"User-Agent": "abc-1.0"} | |
cli, _ := client.NewClient("unix:///var/run/docker.sock", "v1.22", nil, defaultHeaders) | |
ctx := context.Background() | |
saveBody, _ := cli.ImageSave(ctx, []string{"image-id"}) | |
src := types.ImageImportSource{ |
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
# located at chef_repo/environments/org1-prod.rb | |
require 'deep_merge' | |
name 'org1-prod' | |
description 'Production environment for org1' | |
org1_yml_path = File.expand_path('../common/org1.yml', __FILE__) | |
common = YAML.load_file(org1_yml_path) | |
default_attributes( | |
common['default'].deep_merge!( | |
# declare all you org1-prod specific things here. |
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
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
# 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
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
describe 'recipe[doit]' do | |
before(:each) do | |
stub_r3dparty_cookbooks | |
end | |
it 'some awesome specs do here' do | |
# assertion | |
end | |
end |
NewerOlder