Skip to content

Instantly share code, notes, and snippets.

View cheeseplus's full-sized avatar
🎯
Focusing

Seth Thomas cheeseplus

🎯
Focusing
View GitHub Profile
package "nginx" do
action :install
end
directory "/srv/mywebsite" do
owner "www-data"
group "www-data"
mode "0755"
action :create
end
<% node['cookbook']['attribute'].each do |key, value| -%>
<% unless value.empty? -%>
<%= key %>=<%= value %>
<% end %>
<% end %>
@cheeseplus
cheeseplus / -
Created February 25, 2015 22:38
Error: Package: erlang-sd_notify-0.1-1.el7.x86_64 (epel)
Requires: erlang(erl_nif_version) = 2.4
Available: erlang-erts-R16B-03.10.el7.x86_64 (epel)
erlang(erl_nif_version) = 2.4
Installed: erlang-erts-17.4-1.el6.x86_64 (@erlang_solutions)
Not found
Available: erlang-erts-R16B01-0.1.el6.x86_64 (erlang_solutions)
Not found
Available: erlang-erts-R16B02-0.1.el6.x86_64 (erlang_solutions)
Not found
default['riak']['package']['local']['checksum'].tap do |checksum|
checksum['ubuntu']['14'] = 'cab9b89cd0ee82528669facee149c9d6f2a0d0e6fa89496406133ca9c28cd48e'
checksum['ubuntu']['12'] = 'db290d17208861b2eb8694d2eb3d1dc8e7ad280edf577fac8bd355446ca6b85a'
checksum['debian']['7'] = '31ca5d472e992e3af267b440945239b110354a64fc197d2a3d73b93fc66483d4'
checksum['centos']['7'] = '15a732f0b79c934f8dbc3d5b86124a0eedfe7da6e1df84a595df15b2b703106d'
checksum['centos']['6'] = 'ab51c3d65dcd63c1f8d94bdd241b26671b18fcb19d272f4397d07021cfa71a3c'
checksum['centos']['5'] = '8b829b6b7349ace62d7a69ccb113ea5d52f5f39f4f39b08c900e5ffed1119cf5'
checksum['fedora']['19'] = '7f182beaa3c79ac023811d23ef3957a07fabebd128b62fcc77ac710b98c72b98'
checksum['freebsd']['10'] = '8b3afb7f3896678ed6aca0533d94510db9aa2c59f2bbac8a03277906ab9e8b8b'
checksum['freebsd']['9'] = '5b67b8f9d8488f848a54e6ee733d67964a2381ee06b35d60044f1f61b3da2f7c'
@cheeseplus
cheeseplus / -
Created February 24, 2015 16:30
▶ kitchen test default-freebsd-10
-----> Starting Kitchen (v1.3.1)
-----> Cleaning up any prior instances of <default-freebsd-10-1-x64>
-----> Destroying <default-freebsd-10-1-x64>...
Finished destroying <default-freebsd-10-1-x64> (0m0.00s).
-----> Testing <default-freebsd-10-1-x64>
-----> Creating <default-freebsd-10-1-x64>...
Digital Ocean instance <4251109> created.
(ssh ready)
cat > /etc/chef/client.rb <<'EOP'
<%= config_content %>
Ohai::Config[:disabled_plugins] = ['passwd']
EOP
@cheeseplus
cheeseplus / gist:11a665c622f60463ce3e
Created February 17, 2015 19:29
Helpful background on Chef Patterns and Anti-Patterns
http://dougireton.com/blog/2013/02/16/chef-cookbook-anti-patterns/
http://misheska.com/blog/2013/06/16/getting-started-writing-chef-cookbooks-the-berkshelf-way/
http://blog.vialstudios.com/the-environment-cookbook-pattern/
Resolving cookbook dependencies...
Fetching 'openstack-block-storage' from git://github.com/stackforge/cookbook-openstack-block-storage.git (at master)
Fetching 'openstack-common' from git://github.com/stackforge/cookbook-openstack-common.git (at master)
Fetching 'openstack-compute' from git://github.com/stackforge/cookbook-openstack-compute.git (at master)
Fetching 'openstack-dashboard' from git://github.com/stackforge/cookbook-openstack-dashboard.git (at master)
Fetching 'openstack-identity' from git://github.com/stackforge/cookbook-openstack-identity.git (at master)
Fetching 'openstack-image' from git://github.com/stackforge/cookbook-openstack-image.git (at master)
Fetching 'openstack-network' from git://github.com/stackforge/cookbook-openstack-network.git (at master)
Fetching 'openstack-object-storage' from git://github.com/stackforge/cookbook-openstack-object-storage.git (at master)
Fetching 'openstack-ops-database' from git://github.com/stackforge/cookbook-openstack-ops-database.git (at master)
Resolving cookbook dependencies...
Fetching 'openstack-block-storage' from git://github.com/stackforge/cookbook-openstack-block-storage.git (at master)
Fetching 'openstack-common' from git://github.com/stackforge/cookbook-openstack-common.git (at master)
Fetching 'openstack-compute' from git://github.com/stackforge/cookbook-openstack-compute.git (at master)
Fetching 'openstack-dashboard' from git://github.com/stackforge/cookbook-openstack-dashboard.git (at master)
Fetching 'openstack-identity' from git://github.com/stackforge/cookbook-openstack-identity.git (at master)
Fetching 'openstack-image' from git://github.com/stackforge/cookbook-openstack-image.git (at master)
Fetching 'openstack-network' from git://github.com/stackforge/cookbook-openstack-network.git (at master)
Fetching 'openstack-object-storage' from git://github.com/stackforge/cookbook-openstack-object-storage.git (at master)
Fetching 'openstack-ops-database' from git://github.com/stackforge/cookbook-openstack-ops-database.git (at master)
---
provisioner:
name: chef_zero
require_chef_omnibus: latest
platforms:
- name: centos-6-5-x64
driver:
name: digitalocean