This file contains hidden or 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
| ************cat myfile |grep -v ^#|grep -v '#.*'|wc -l | |
| 5 | |
| ************cat myfile |wc -l | |
| 85 | |
This file contains hidden or 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
| saschas-MacBook-Air:cookbooks sascha$ cat Gemfile.lock | |
| GEM | |
| remote: https://rubygems.org/ | |
| specs: | |
| builder (3.2.0) | |
| chef (11.4.0) | |
| erubis | |
| highline (>= 1.6.9) | |
| json (>= 1.4.4, <= 1.7.7) | |
| mixlib-authentication (>= 1.3.0) |
This file contains hidden or 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
| saschas-MacBook-Air:chef-ci sascha$ cat Gemfile | |
| source 'https://rubygems.org' | |
| gem 'berkshelf', '1.4.0.rc1' | |
| gem 'test-kitchen', '1.0.0.alpha.2', :group => :integration | |
| gem 'kitchen-vagrant', '0.7.4', :group => :integration | |
| gem 'vagrant', '1.1.5.dev' | |
| saschas-MacBook-Air:chef-ci sascha$ time kitchen test | |
| -----> Starting Kitchen |
This file contains hidden or 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
| def chef_block(arr) def chef_block(arr) | |
| arr << %{ c.vm.provision :chef_solo do |chef|} arr << %{ c.vm.provision :chef_solo do |chef|} | |
| arr << %{ chef.log_level = #{vagrant_logger_level} arr << %{ chef.log_level = #{vagrant_logger_level} | |
| > arr << %{ chef.cookbooks_path = "/Users/sascha/cli | |
| arr << %{ chef.run_list = #{instance.run_list.insp arr << %{ chef.run_list = #{instance.run_list.insp | |
| arr << %{ chef.json = #{instance.attributes.to_s}} arr << %{ chef.json = #{instance.attributes.to_s}} | |
| if instance.suite.data_bags_path if instance.suite.data_bags_path | |
| arr << %{ chef.data_bags_path = "#{instance.suit arr << %{ chef.data_bags_path = "#{instance.suit | |
| end end |
This file contains hidden or 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
| [centos-6.3] Waiting for VM to boot. This can take a few minutes. | |
| /Users/a766618/.rvm/gems/ruby-1.9.3-p327/gems/vagrant-1.0.5/lib/vagrant/action/vm/boot.rb:41:in `block in wait_for_boot': The VM failed to remain in the "running" state while attempting to boot. (Vagrant::Errors::VMFailedToRun) | |
| This is normally caused by a misconfiguration or host system incompatibilities. | |
| Please open the VirtualBox GUI and attempt to boot the virtual machine | |
| manually to get a more informative error message. | |
| from /Users/a766618/.rvm/gems/ruby-1.9.3-p327/gems/vagrant-1.0.5/lib/vagrant/action/vm/boot.rb:28:in `times' | |
| from /Users/a766618/.rvm/gems/ruby-1.9.3-p327/gems/vagrant-1.0.5/lib/vagrant/action/vm/boot.rb:28:in `wait_for_boot' |
This file contains hidden or 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
| # wrapper overrides | |
| # override attributes are being set here in order to use the base solr cookbook without direct modification | |
| override[:solr][:home] = "/opt/solr/solr-home" | |
| override[:solr][:configxml][:destdir] = "/opt/solr/solr-home/products/conf" | |
| override[:solr][:configxml][:cookbook_loc] = "projectX" |
This file contains hidden or 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
| # Once we've made our custom calls to artifactory, we can use the built-in chef resource for remote_file to actually fetch the artifact | |
| def download(remote_file_url) | |
| # construct the filename and destination for remote file | |
| remote_file_name = "#{new_resource.name}-#{new_resource.version}.#{new_resource.filetype}" | |
| remote_file_destination = new_resource.artifact_target || ::File.join(Chef::Config[:file_cache_path], remote_file_name) | |
| # construct the remote_file source | |
| sha256_cksum = get_checksum(remote_file_url, "sha256") | |
| Chef::Log.debug("checking sha256 checksum for #{new_resource.name}:#{sha256_cksum.inspect}") |
This file contains hidden or 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
| [2012-12-29T00:11:15-06:00] INFO: Processing artifact[solr] action download_static (solr::install line 46) | |
| [2012-12-29T00:11:16-06:00] DEBUG: checking sha256 checksum for solr:"bb4415d1170ac94aa6bf065627617232ee94099ba3570b5c6bb9ca7cff30dca8" | |
| [2012-12-29T00:11:16-06:00] INFO: Processing remote_file[/var/chef/cache/solr-4.0.0.war] action create (dynamically defined) | |
| [2012-12-29T00:11:16-06:00] DEBUG: remote_file[/var/chef/cache/solr-4.0.0.war] checking for changes | |
| [2012-12-29T00:11:16-06:00] DEBUG: remote_file[/var/chef/cache/solr-4.0.0.war] checksum matches target checksum (bb4415d1170ac94aa6bf065627617232ee94099ba3570b5c6bb9ca7cff30dca8) - not updating |
This file contains hidden or 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
| Generated at 2012-12-28 16:33:15 -0600 | |
| ArgumentError: You must have a string like resource_type[name]! | |
| /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/resource_collection.rb:205:in `find_resource_by_string' | |
| /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/resource_collection.rb:139:in `block in find' | |
| /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/resource_collection.rb:134:in `each' | |
| /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/resource_collection.rb:134:in `find' | |
| /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/resource.rb:61:in `fix_resource_reference' | |
| /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/resource.rb:50:in `resolve_resource_reference' | |
| /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/resource.rb:406:in `block in resolve_notification_references' | |
| /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/resource.rb:406:in `each' |
This file contains hidden or 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 "foo" do | |
| action :install | |
| end | |
| # but I'm wondering about | |
| package "foo" do | |
| action :install | |
| provider node[:foo][:provider] | |
| end |