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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowViewAccountInfo", | |
"Effect": "Allow", | |
"Action": [ | |
"iam:GetAccountPasswordPolicy", | |
"iam:GetAccountSummary", | |
"iam:ListVirtualMFADevices" |
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
### Keybase proof | |
I hereby claim: | |
* I am behemphi on github. | |
* I am behemphi (https://keybase.io/behemphi) on keybase. | |
* I have a public key ASAajK9R-yj_JbyoLJgbfVsvQMWh9SzAOpghWiHMLyssMAo | |
To claim this, I am signing this object: |
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
roles = node.roles | |
db_host = false | |
roles.each do |role| | |
if role == 'db_host' | |
db_host = true | |
end | |
end | |
instance_name = node.foobar.mysql.FULL_BASE_NAME |
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 this is a large instance we need to locate the database host. | |
if node.chef_environment.include?('large') | |
nodes = search(:node, "name:#{node.foobar.instance_name}*") | |
log "nodes found: #{nodes.count()}" | |
# Looking for the database host | |
nodes.each do |n| | |
# If the database host exists, get its servicenet IP, otherwise fail | |
# the run. | |
if n.name.index('-db') |
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
bhemphill:~/Code/cook_rave 18:22:53 > vagrant provision | |
[Berkshelf] Updating Vagrant's berkshelf: '/Users/bhemphill/.berkshelf/default/vagrant/berkshelf-20130910-2463-6eqb9w-default' | |
[Berkshelf] Using java (1.13.0) | |
[Berkshelf] Using apache2 (1.7.0) | |
[Berkshelf] Using cook_rave (0.1.0) | |
[Berkshelf] Using windows (1.10.0) | |
[Berkshelf] Using chef_handler (1.1.4) | |
[default] Chef 11.6.0 Omnibus package is already installed. | |
[default] Running provisioner: chef_solo... | |
Generating chef JSON and uploading... |
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
irb(main):008:0> if | |
irb(main):009:1* puts 'foo' | |
irb(main):010:1> else | |
irb(main):011:1* puts 'bar' | |
irb(main):012:1> end | |
foo | |
bar | |
=> nil | |
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
# | |
# Cookbook Name:: fm_nginx | |
# Recipe:: default | |
# | |
# Copyright 2013, Feedmagnet Corp. | |
# | |
# All rights reserved - Do Not Redistribute | |
# | |
# Nginx will run as www-data, so we are going to add this user to the |
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
case (Integer((node[:memory][:total]).sub('kB','')) / 1024) | |
when 0..900 | |
config_bag = 'webserver_512mb' | |
when 901..1500 | |
config_bag = 'webserver_1024mb' | |
when 1501..2500 | |
config_bag = 'webserver_2048mb' | |
else | |
config_bag = 'webserver_2048mb' | |
log("no config file exists for a server of this size.") { level :warn } |
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
{ | |
"chef_type": "role", | |
"default_attributes": { | |
"ntp": { | |
"servers": [ | |
"10.181.13.214" | |
] | |
} | |
}, | |
"description": "The db-host is used when a dedicated database should be available.", |
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
{ | |
"chef_type": "environment", | |
"cookbook_versions": { | |
"apt": "= 1.5.0", | |
"base": "= 2.4.131", | |
"chef-client": "= 0.99.3", | |
"chef_handler": "= 1.0.8", | |
"erlang": "= 1.1.0", | |
"fm_console": "= 2.4.131", | |
"fm_deployment": "= 2.4.131", |
NewerOlder