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
o.data[:languages][:java] | |
=> {"runtime"=>{"name"=>"Java(TM) SE Runtime Environment", "build"=>"1.6.0_22-b04"}, "version"=>"1.6.0_22"} | |
irb(main):016:0> |
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
runit_service "activemq" do | |
env({'ACTIVEMQ_OPTS' => '-Xmx4096M' }) | |
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 -*- | |
# Needs following parameters configured in rake.rb: | |
# DNS_DOMAIN: domain for which to set entries, including trailing dot | |
# (e.g. "example.com.") | |
# DNS_ATTRIBUTE: attribute containing hostname to CNAME to, defaults | |
# to 'fqdn'; for EC2, use "ec2.public_hostname" | |
# DNS_ENTRIES: hash mapping hostname to node search query, | |
# e.g. {'buildbot' => 'recipes:buildbot', 'monitoring' => | |
# 'roles:monitoring'} |
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
name "base" | |
description "Baseline configuration for all systems." | |
run_list( | |
"recipe[ohai]", | |
"recipe[chef-client::delete_validation]", | |
"recipe[chef-client]", | |
"recipe[zsh]", | |
"recipe[git]", | |
"recipe[users]", |
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
class KnifeCliTemplate | |
include Mixlib::CLI | |
end | |
data = {...} | |
KnifeCliTemplate.option(:config_file, :long => '--file FILE', :default => '/etc/chef/knife.rb') | |
KnifeCliTemplate.option(:no_editor, :long => "--no-editor", :boolean => true) | |
args = ['client', 'create', data[:name], '--file', data[:file], '--no-editor' ] | |
args << '--admin' if data[:admin] | |
::Chef::Knife.run(args,KnifeCliTemplate.options) |
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
$ knife cookbook site install apt -V | |
Installing apt to ./cookbooks | |
Checking out the master branch. | |
Creating pristine copy branch chef-vendor-apt | |
Downloading apt from the cookbooks site at version 1.1.2 to ./cookbooks/apt.tar.gz | |
Cookbook saved: ./cookbooks/apt.tar.gz | |
Removing pre-existing version. | |
Uncompressing apt version ./cookbooks. | |
ERROR: Chef::Exceptions::ShellCommandFailed: Expected process to exit with [0], but received '1' | |
---- Begin output of tar zxvf ./cookbooks/apt.tar.gz ---- |
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
include Opscode::Aws::Ec2 | |
# Auto locates and attached ebs devices based on the data bag they reside in. The following test cases need to be performed. Currently limited to 15 drives for the raid due to the drive mount point seek iteration logic. This could be fixed to include more than 15 mount points. | |
# Create multiple resources with new node: PASS | |
# | |
# Re-attach multiple resources after a reboot: PASS | |
# | |
# Create resources across 2 runs. First run creates first raid set, second run re-attaches then creates: PASS | |
# |
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
namespace :ec2 do | |
# setup chef config | |
# | |
config = File.join(File.dirname(__FILE__), '..', '.chef', 'knife.rb') | |
Chef::Config.from_file(config) | |
load_gem_or_report(%w{aws}) | |
desc 'Delete any ec2-based chef nodes that no longer exist' | |
task :cleanup_nodes do |
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
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
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
#autotest configuration | |
# | |
require 'redgreen/autotest' | |
require 'autotest/timestamp' | |
# #################### | |
# GROWL CONFIG | |
# #################### |