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
:sources: | |
- http://<%= node['gem_file']['host'] %>:<%= node['gem_file']['port'] %>/ |
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
template '/root/.gemrc' do | |
source 'gemrc.erb' | |
action :create | |
notifies :run, 'ruby_block[refresh_gemrc]', :immediately | |
end | |
# Thanks to http://lists.opscode.com/sympa/arc/chef/2013-12/msg00237.html | |
ruby_block 'refresh_gemrc' do | |
action :nothing | |
block 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
chef generate cookbook --generator-cookbook ~/Development/custom_generator/ testcookbook | |
[2014-07-22T09:24:24-07:00] WARN: found a directory files in the cookbook path, but it contains no cookbook files. skipping. | |
[2014-07-22T09:24:24-07:00] WARN: found a directory templates in the cookbook path, but it contains no cookbook files. skipping. | |
Compiling Cookbooks... | |
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/cookbook/cookbook_collection.rb:38:in `block in initialize': Cookbook code_generator not found. If you're loading code_generator from another cookbook, make sure you configure the dependency in your metadata (Chef::Exceptions::CookbookNotFound) | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ohai-7.2.0.rc.2/lib/ohai/mash.rb:77:in `yield' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ohai-7.2.0.rc.2/lib/ohai/mash.rb:77:in `default' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ohai-7.2.0.rc.2/lib/ohai/mash.rb:77:in `default' | |
from /opt/chefdk/embedded/lib/ruby/gem |
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
{ | |
"vagrant": { | |
"vm": { | |
"box": "opscode-centos-6.5", | |
"box_url": "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box", | |
"forward_port": {}, | |
"network": { | |
"bridged": false | |
}, | |
"provision": "chef_solo" |
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
--- | |
driver_plugin: docker | |
driver_config: | |
socket: tcp://33.33.33.10:4243 | |
use_sudo: false | |
# provision_command: curl -L https://www.opscode.com/chef/install.sh | bash | |
require_chef_omnibus: true | |
settings: | |
parallel: true |
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
# Note: This can take as long as 15 minutes, and will show the bootstrap stuck at "waiting for winrm," but should not take more than 30. | |
knife ec2 server create -V -V --flavor m1.large --bootstrap-protocol winrm -I ami-173d747e --user-data ./userdata.ps1 -r "role[nopcommerce]" -x opscode -P "opscode" -N demo_nopcommerce1 --tags "Name=demo_nopcommerce1" -Z us-east-1d --distro "windows-chef-client-msi" -S charles_opscode |
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
require 'spec_helper' | |
describe 'hodor' do | |
context 'hodor' do | |
it 'hodor' do | |
expect(hodor).to hodor(hodor) | |
end | |
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
template '/etc/php5/apache2/php.ini' do | |
source 'php.ini.erb' | |
cookbook 'php' | |
owner 'root' | |
group 'root' | |
mode '0644' | |
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
# Plugin-specific configurations | |
if Vagrant.has_plugin?('vagrant-cachier') | |
puts 'INFO: Vagrant-cachier plugin detected. Optimizing caches.' | |
config.cache.enable :chef | |
config.cache.enable :apt | |
else | |
puts 'WARN: Vagrant-cachier plugin not detected. Continuing unoptimized.' | |
end | |
if Vagrant.has_plugin?('Omnibus') |
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
%w(apache2 ntp sshd).each do |pkg| | |
package pkg do | |
action :install | |
end | |
end |