diff --git a/Vagrantfile b/Vagrantfile index 10d4c9c..f902b8d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -32,8 +32,13 @@ Vagrant::Config.run do |config| # to this Vagrantfile), and adding some recipes and/or roles. config.vm.provision :chef_solo do |chef| chef.cookbooks_path = "cookbooks" + chef.add_recipe "vim" + chef.add_recipe "zsh" + chef.add_recipe "zlib" + chef.add_recipe "git" chef.add_recipe "apt" chef.add_recipe "wordpress" + # chef.add_recipe "custom" chef.json.merge!( "mysql" => { diff --git a/cookbooks/git/README.md b/cookbooks/git/README.md new file mode 100644 index 0000000..053c566 --- /dev/null +++ b/cookbooks/git/README.md @@ -0,0 +1,54 @@ +Description +=========== + +Installs git and optionally sets up a git server as a daemon under runit. + +Changes +======= + +## v0.9.0: + +* Current public release. + +Requirements +============ + +## Platform: + +* Debian/Ubuntu +* ArchLinux + +## Cookbooks: + +* runit + +Usage +===== + +This cookbook primarily installs git core packages. It can also be +used to serve git repositories. + + include_recipe "git::server" + +This creates the directory /srv/git and starts a git daemon, exporting +all repositories found. Repositories need to be added manually, but +will be available once they are created. + +License and Author +================== + +Author:: Joshua Timberman () + +Copyright:: 2009, Opscode, Inc + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/cookbooks/git/metadata.rb b/cookbooks/git/metadata.rb index 96557ca..f247c84 100644 --- a/cookbooks/git/metadata.rb +++ b/cookbooks/git/metadata.rb @@ -2,7 +2,7 @@ maintainer "Opscode, Inc." maintainer_email "cookbooks@opscode.com" license "Apache 2.0" description "Installs git and/or sets up a Git server daemon" -long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) +long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version "0.9.0" recipe "git", "Installs git" recipe "git::server", "Sets up a runit_service for git daemon" diff --git a/cookbooks/vim/README.md b/cookbooks/vim/README.md new file mode 100644 index 0000000..7186b12 --- /dev/null +++ b/cookbooks/vim/README.md @@ -0,0 +1,50 @@ +Description +=========== + +Installs vim. + +Requirements +============ + +## Platform: + +* Ubuntu/Debian +* Red Hat/CentOS/Fedora/Scientific +* ArchLinux + +Attributes +========== + +* `node[:vim][:extra_packages]` - An array of extra packages related to vim to install (like plugins). Empty array by default. + +Usage +===== + +Put `recipe[vim]` in a run list, or `include_recipe 'vim'` to ensure that vim is installed on your systems. + +If you would like to install additional vim plugin packages, include their package names in the `node[:vim][:extra_packages]` attribute. Verify that your operating sytem has the package available. + +Changes +======= + +## v1.0.2: + +* Fixes COOK-598 (RHEL platforms support). + +License and Author +================== + +Author:: Joshua Timberman + +Copyright 2010, Opscode, Inc + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and diff --git a/cookbooks/vim/attributes/default.rb b/cookbooks/vim/attributes/default.rb new file mode 100644 index 0000000..08e9e47 --- /dev/null +++ b/cookbooks/vim/attributes/default.rb @@ -0,0 +1,20 @@ +# +# Cookbook Name:: vim +# Attributes:: default +# +# Copyright 2010, Opscode, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +default[:vim][:extra_packages] = [] diff --git a/cookbooks/vim/metadata.rb b/cookbooks/vim/metadata.rb new file mode 100644 index 0000000..25f185d --- /dev/null +++ b/cookbooks/vim/metadata.rb @@ -0,0 +1,11 @@ +maintainer "Opscode, Inc." +maintainer_email "cookbooks@opscode.com" +license "Apache 2.0" +description "Installs vim and optional extra packages." +long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) +version "1.0.2" + +%w{debian ubuntu arch redhat centos fedora scientific}.each do |os| + supports os +end + diff --git a/cookbooks/vim/recipes/default.rb b/cookbooks/vim/recipes/default.rb new file mode 100644 index 0000000..cb5f1a2 --- /dev/null +++ b/cookbooks/vim/recipes/default.rb @@ -0,0 +1,35 @@ +# +# Cookbook Name:: vim +# Recipe:: default +# +# Copyright 2010, Opscode, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# There is no vim package on RHEL/CentOS derivatives +# * vim-minimal gives you /bin/vi +# * vim-enhanced gives you /usr/bin/vim +vim_base_pkgs = value_for_platform( + ["ubuntu", "debian", "arch"] => { "default" => ["vim"] }, + ["redhat", "centos", "fedora", "scientific"] => { "default" => ["vim-minimal","vim-enhanced"] }, + "default" => ["vim"] +) + +vim_base_pkgs.each do |vim_base_pkg| + package vim_base_pkg +end + +node[:vim][:extra_packages].each do |vimpkg| + package vimpkg +end diff --git a/cookbooks/zlib/README.md b/cookbooks/zlib/README.md new file mode 100644 index 0000000..7de94a9 --- /dev/null +++ b/cookbooks/zlib/README.md @@ -0,0 +1,27 @@ +Description +==== + +Installs development package for zlib. + +Requirements +==== + +Debian, Ubuntu, CentOS, Red Hat, Scientific, Fedora, SUSE. + +License and Author +==== + +Author:: Joshua Timberman () +Copyright:: 2009-2011, Opscode, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/cookbooks/zlib/metadata.rb b/cookbooks/zlib/metadata.rb new file mode 100644 index 0000000..a4c2c5f --- /dev/null +++ b/cookbooks/zlib/metadata.rb @@ -0,0 +1,12 @@ +maintainer "Opscode, Inc." +maintainer_email "cookbooks@opscode.com" +license "Apache 2.0" +description "Installs zlib" +long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) +version "1.0.0" + +recipe "zlib", "Installs zlib development package" + +%w{ centos redhat scientific suse fedora ubuntu debian }.each do |os| + supports os +end diff --git a/cookbooks/zlib/recipes/default.rb b/cookbooks/zlib/recipes/default.rb new file mode 100644 index 0000000..ce03df5 --- /dev/null +++ b/cookbooks/zlib/recipes/default.rb @@ -0,0 +1,25 @@ +# +# Cookbook Name:: zlib +# Recipe:: default +# +# Copyright 2010, Opscode, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +package "zlib-devel" do + package_name value_for_platform( + [ "centos", "redhat", "scientific", "suse", "fedora" ] => { "default" => "zlib-devel" }, + "default" => 'zlib1g-dev' + ) +end diff --git a/cookbooks/zsh/README.md b/cookbooks/zsh/README.md new file mode 100644 index 0000000..68b61fd --- /dev/null +++ b/cookbooks/zsh/README.md @@ -0,0 +1,49 @@ +Description +=========== + +Installs zsh package and documentation. + +Changes +======= + +## v0.7.1 + +* Current public release. + +Requirements +============ + +## Platform: + +* Ubuntu 10.04+ +* Debian 6.0+ +* CentOS 5.7+ + +Should work anywhere there's a `zsh` package available in the platform +package manager. + +Usage +===== + +Whereever you have users who want to use `zsh` as their login shell, +use this recipe. For example, add `recipe[zsh]` to a base role applied +to all nodes. + +License and Author +================== + +Author:: Adam Jacob + +Copyright:: 2008-2009, Opscode, Inc + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/cookbooks/zsh/metadata.rb b/cookbooks/zsh/metadata.rb new file mode 100644 index 0000000..7bfd9a8 --- /dev/null +++ b/cookbooks/zsh/metadata.rb @@ -0,0 +1,11 @@ +maintainer "Opscode, Inc." +maintainer_email "cookbooks@opscode.com" +license "Apache 2.0" +description "Installs zsh" +version "0.7.1" + +recipe "zsh", "Installs zsh" + +%w{ubuntu debian}.each do |os| + supports os +end diff --git a/cookbooks/zsh/recipes/default.rb b/cookbooks/zsh/recipes/default.rb new file mode 100644 index 0000000..6de8f76 --- /dev/null +++ b/cookbooks/zsh/recipes/default.rb @@ -0,0 +1,33 @@ +# +# Cookbook Name:: zsh +# Recipe:: default +# +# Copyright 2008-2009, Opscode, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +package "zsh" do + action :install +end + +case node[:platform] +when "ubuntu","debian" + package "zsh-doc" do + action :install + end +when "centos" + package "zsh-html" do + action :install + end +end