diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | .kitchen.yml | 84 | ||||
-rw-r--r-- | dev-repo/README.md | 13 | ||||
-rw-r--r-- | dev-repo/cookbooks/audit_test/.gitignore | 16 | ||||
-rw-r--r-- | dev-repo/cookbooks/audit_test/.kitchen.yml | 16 | ||||
-rw-r--r-- | dev-repo/cookbooks/audit_test/Berksfile | 3 | ||||
-rw-r--r-- | dev-repo/cookbooks/audit_test/README.md | 4 | ||||
-rw-r--r-- | dev-repo/cookbooks/audit_test/chefignore | 95 | ||||
-rw-r--r-- | dev-repo/cookbooks/audit_test/metadata.rb | 8 | ||||
-rw-r--r-- | dev-repo/cookbooks/audit_test/recipes/default.rb | 11 | ||||
-rw-r--r-- | dev-repo/dev-config.rb | 2 | ||||
-rw-r--r-- | dev-repo/nodes/chef-ubuntu-1210.vagrantup.com.json | 3 |
12 files changed, 258 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index a9e4338e2a..30a3bd6531 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,6 @@ Berksfile.lock # Vagrant Vagrantfile .vagrant/ + +# Dev Repo Local Mode Data +dev-repo/nodes/* diff --git a/.kitchen.yml b/.kitchen.yml new file mode 100644 index 0000000000..c9be1b56e7 --- /dev/null +++ b/.kitchen.yml @@ -0,0 +1,84 @@ +driver: + name: vagrant + forward_agent: yes + customize: + cpus: 4 + memory: 4096 + synced_folders: + - ['.', '/home/vagrant/chef'] + - ['../ohai', '/home/vagrant/ohai'] + - ['../triager', '/home/vagrant/triager'] + +provisioner: + name: chef_zero + require_chef_omnibus: 12.0.0.rc.1 + +platforms: + - name: centos-5.10 + run_list: + - name: centos-6.5 + run_list: + - name: debian-7.2.0 + run_list: + - name: debian-7.4 + run_list: + - name: debian-6.0.8 + run_list: + - name: freebsd-9.2 + run_list: + - name: freebsd-10.0 + run_list: + - name: ubuntu-10.04 + run_list: + - name: ubuntu-12.04 + run_list: + - name: ubuntu-12.10 + run_list: + - name: ubuntu-13.04 + run_list: + - name: ubuntu-13.10 + run_list: + - name: ubuntu-14.04 + run_list: + # The following boxes are shared via VagrantCloud. Until kitchen-vagrant + # is updated you'll need to add the box manually: + # + # vagrant box add chef/windows-8.1-professional + # + # Please note this may require a `vagrant login` if the box is private. + # + # The following boxes are VMware only also. You can enable VMware Fusion + # as the default provider by copying `.kitchen.local.yml.vmware.example` + # over to `.kitchen.local.yml`. + # + - name: macosx-10.8 + driver: + box: chef/macosx-10.8 # private + - name: macosx-10.9 + driver: + box: chef/macosx-10.9 # private + - name: macosx-10.10 + driver: + box: chef/macosx-10.10 # private + # - name: windows-7-professional + # provisioner: + # name: windows_chef_zero + # require_chef_omnibus: 11.12.4 + # driver: + # box: chef/windows-7-professional # private + # - name: windows-8.1-professional + # provisioner: + # name: windows_chef_zero + # require_chef_omnibus: 11.12.4 + # driver: + # box: chef/windows-8.1-professional # private + # - name: windows-2008r2-standard + # provisioner: + # name: windows_chef_zero + # require_chef_omnibus: 11.12.4 + # driver: + # box: chef/windows-server-2008r2-standard # private + +suites: + - name: chef + run_list: diff --git a/dev-repo/README.md b/dev-repo/README.md new file mode 100644 index 0000000000..84fe5f77df --- /dev/null +++ b/dev-repo/README.md @@ -0,0 +1,13 @@ +# Chef Developer Repo + +This repository contains some basic cookbooks to test chef while you're hacking away. You can provision a VM using the kitchen configuration and run these tests like below: + +``` +$ kitchen converge chef-ubuntu-1210 +$ kitchen login chef-ubuntu-1210 +$ export PATH=/opt/chef/bin:/opt/chef/embedded/bin:$PATH +$ cd ~/chef +$ bundle install +$ bundle exec chef-client -z -o "recipe[audit_test::default]" -c dev-repo/dev-config.rb + +``` diff --git a/dev-repo/cookbooks/audit_test/.gitignore b/dev-repo/cookbooks/audit_test/.gitignore new file mode 100644 index 0000000000..ec2a890bd3 --- /dev/null +++ b/dev-repo/cookbooks/audit_test/.gitignore @@ -0,0 +1,16 @@ +.vagrant +Berksfile.lock +*~ +*# +.#* +\#*# +.*.sw[a-z] +*.un~ + +# Bundler +Gemfile.lock +bin/* +.bundle/* + +.kitchen/ +.kitchen.local.yml diff --git a/dev-repo/cookbooks/audit_test/.kitchen.yml b/dev-repo/cookbooks/audit_test/.kitchen.yml new file mode 100644 index 0000000000..3775752da2 --- /dev/null +++ b/dev-repo/cookbooks/audit_test/.kitchen.yml @@ -0,0 +1,16 @@ +--- +driver: + name: vagrant + +provisioner: + name: chef_zero + +platforms: + - name: ubuntu-12.04 + - name: centos-6.4 + +suites: + - name: default + run_list: + - recipe[audit_test::default] + attributes: diff --git a/dev-repo/cookbooks/audit_test/Berksfile b/dev-repo/cookbooks/audit_test/Berksfile new file mode 100644 index 0000000000..0ac9b78cf7 --- /dev/null +++ b/dev-repo/cookbooks/audit_test/Berksfile @@ -0,0 +1,3 @@ +source "https://supermarket.getchef.com" + +metadata diff --git a/dev-repo/cookbooks/audit_test/README.md b/dev-repo/cookbooks/audit_test/README.md new file mode 100644 index 0000000000..31fb97a12d --- /dev/null +++ b/dev-repo/cookbooks/audit_test/README.md @@ -0,0 +1,4 @@ +# audit_test + +TODO: Enter the cookbook description here. + diff --git a/dev-repo/cookbooks/audit_test/chefignore b/dev-repo/cookbooks/audit_test/chefignore new file mode 100644 index 0000000000..80dc2d20ef --- /dev/null +++ b/dev-repo/cookbooks/audit_test/chefignore @@ -0,0 +1,95 @@ +# Put files/directories that should be ignored in this file when uploading +# or sharing to the community site. +# Lines that start with '# ' are comments. + +# OS generated files # +###################### +.DS_Store +Icon? +nohup.out +ehthumbs.db +Thumbs.db + +# SASS # +######## +.sass-cache + +# EDITORS # +########### +\#* +.#* +*~ +*.sw[a-z] +*.bak +REVISION +TAGS* +tmtags +*_flymake.* +*_flymake +*.tmproj +.project +.settings +mkmf.log + +## COMPILED ## +############## +a.out +*.o +*.pyc +*.so +*.com +*.class +*.dll +*.exe +*/rdoc/ + +# Testing # +########### +.watchr +.rspec +spec/* +spec/fixtures/* +test/* +features/* +Guardfile +Procfile + +# SCM # +####### +.git +*/.git +.gitignore +.gitmodules +.gitconfig +.gitattributes +.svn +*/.bzr/* +*/.hg/* +*/.svn/* + +# Berkshelf # +############# +Berksfile +Berksfile.lock +cookbooks/* +tmp + +# Cookbooks # +############# +CONTRIBUTING + +# Strainer # +############ +Colanderfile +Strainerfile +.colander +.strainer + +# Vagrant # +########### +.vagrant +Vagrantfile + +# Travis # +########## +.travis.yml diff --git a/dev-repo/cookbooks/audit_test/metadata.rb b/dev-repo/cookbooks/audit_test/metadata.rb new file mode 100644 index 0000000000..4a60104e92 --- /dev/null +++ b/dev-repo/cookbooks/audit_test/metadata.rb @@ -0,0 +1,8 @@ +name 'audit_test' +maintainer 'The Authors' +maintainer_email 'you@example.com' +license 'all_rights' +description 'Installs/Configures audit_test' +long_description 'Installs/Configures audit_test' +version '0.1.0' + diff --git a/dev-repo/cookbooks/audit_test/recipes/default.rb b/dev-repo/cookbooks/audit_test/recipes/default.rb new file mode 100644 index 0000000000..f02f24c2c9 --- /dev/null +++ b/dev-repo/cookbooks/audit_test/recipes/default.rb @@ -0,0 +1,11 @@ +# +# Cookbook Name:: audit_test +# Recipe:: default +# +# Copyright (c) 2014 The Authors, All Rights Reserved. + +controls "basic control" do + it "should pass" do + expect(2 - 2).to eq(0) + end +end diff --git a/dev-repo/dev-config.rb b/dev-repo/dev-config.rb new file mode 100644 index 0000000000..4ac411c832 --- /dev/null +++ b/dev-repo/dev-config.rb @@ -0,0 +1,2 @@ +cookbook_path "/home/vagrant/chef/dev-repo/cookbooks" +cache_path "/home/vagrant/.cache/chef" diff --git a/dev-repo/nodes/chef-ubuntu-1210.vagrantup.com.json b/dev-repo/nodes/chef-ubuntu-1210.vagrantup.com.json new file mode 100644 index 0000000000..17e7b8d173 --- /dev/null +++ b/dev-repo/nodes/chef-ubuntu-1210.vagrantup.com.json @@ -0,0 +1,3 @@ +{ + "name": "chef-ubuntu-1210.vagrantup.com" +}
\ No newline at end of file |