From 30955d01007ea71f77060b2bf461930cde4cdd36 Mon Sep 17 00:00:00 2001 From: root <root@alpha.(none)> Date: Sun, 24 Oct 2010 23:20:46 +0000 Subject: [PATCH] Unify into one centos cookbook (people will want other OSes) and get mongo and ImageMagick installed --- chef/cookbooks/bootstrap/bootstrap.json | 1 - chef/cookbooks/centos/bootstrap.json | 1 + chef/cookbooks/centos/files/default/10gen.repo | 5 +++++ chef/cookbooks/centos/main.json | 1 + .../default.rb => centos/recipes/bootstrap.rb} | 0 chef/cookbooks/centos/recipes/image_magick.rb | 3 +++ chef/cookbooks/centos/recipes/main.rb | 6 ++++++ chef/cookbooks/centos/recipes/mongo_db.rb | 11 +++++++++++ chef/cookbooks/main/main.json | 1 - chef/cookbooks/main/recipes/default.rb | 3 --- 10 files changed, 27 insertions(+), 5 deletions(-) delete mode 100644 chef/cookbooks/bootstrap/bootstrap.json create mode 100644 chef/cookbooks/centos/bootstrap.json create mode 100644 chef/cookbooks/centos/files/default/10gen.repo create mode 100644 chef/cookbooks/centos/main.json rename chef/cookbooks/{bootstrap/recipes/default.rb => centos/recipes/bootstrap.rb} (100%) create mode 100644 chef/cookbooks/centos/recipes/image_magick.rb create mode 100644 chef/cookbooks/centos/recipes/main.rb create mode 100644 chef/cookbooks/centos/recipes/mongo_db.rb delete mode 100644 chef/cookbooks/main/main.json delete mode 100644 chef/cookbooks/main/recipes/default.rb diff --git a/chef/cookbooks/bootstrap/bootstrap.json b/chef/cookbooks/bootstrap/bootstrap.json deleted file mode 100644 index 328415e15f..0000000000 --- a/chef/cookbooks/bootstrap/bootstrap.json +++ /dev/null @@ -1 +0,0 @@ -{"recipes": ["bootstrap::default" ] } diff --git a/chef/cookbooks/centos/bootstrap.json b/chef/cookbooks/centos/bootstrap.json new file mode 100644 index 0000000000..a6065ab26c --- /dev/null +++ b/chef/cookbooks/centos/bootstrap.json @@ -0,0 +1 @@ +{"recipes": ["centos::bootstrap" ] } diff --git a/chef/cookbooks/centos/files/default/10gen.repo b/chef/cookbooks/centos/files/default/10gen.repo new file mode 100644 index 0000000000..347aaa9a02 --- /dev/null +++ b/chef/cookbooks/centos/files/default/10gen.repo @@ -0,0 +1,5 @@ +[10gen] +name=10gen Repository +baseurl=http://downloads.mongodb.org/distros/centos/5.4/os/x86_64/ +gpgcheck=0 + diff --git a/chef/cookbooks/centos/main.json b/chef/cookbooks/centos/main.json new file mode 100644 index 0000000000..8ef7610f0f --- /dev/null +++ b/chef/cookbooks/centos/main.json @@ -0,0 +1 @@ +{"recipes": ["centos::main" ] } diff --git a/chef/cookbooks/bootstrap/recipes/default.rb b/chef/cookbooks/centos/recipes/bootstrap.rb similarity index 100% rename from chef/cookbooks/bootstrap/recipes/default.rb rename to chef/cookbooks/centos/recipes/bootstrap.rb diff --git a/chef/cookbooks/centos/recipes/image_magick.rb b/chef/cookbooks/centos/recipes/image_magick.rb new file mode 100644 index 0000000000..8e4368fedd --- /dev/null +++ b/chef/cookbooks/centos/recipes/image_magick.rb @@ -0,0 +1,3 @@ +execute "install ImageMagick" do + command "yum install -y ImageMagick" +end diff --git a/chef/cookbooks/centos/recipes/main.rb b/chef/cookbooks/centos/recipes/main.rb new file mode 100644 index 0000000000..3b9086de87 --- /dev/null +++ b/chef/cookbooks/centos/recipes/main.rb @@ -0,0 +1,6 @@ +execute "say hello" do + command "echo welcome to diaspora chef" +end + +include_recipe "centos::image_magick" +include_recipe "centos::mongo_db" diff --git a/chef/cookbooks/centos/recipes/mongo_db.rb b/chef/cookbooks/centos/recipes/mongo_db.rb new file mode 100644 index 0000000000..9bfc958b59 --- /dev/null +++ b/chef/cookbooks/centos/recipes/mongo_db.rb @@ -0,0 +1,11 @@ +cookbook_file "/etc/yum.repos.d/10gen.repo" do + source "10gen.repo" +end + +execute "refresh yum" do + command "yum update -y" +end + +execute "install mongo" do + command "yum install -y mongo-stable" +end diff --git a/chef/cookbooks/main/main.json b/chef/cookbooks/main/main.json deleted file mode 100644 index 9d04fb02bb..0000000000 --- a/chef/cookbooks/main/main.json +++ /dev/null @@ -1 +0,0 @@ -{"recipes": ["main::default" ] } diff --git a/chef/cookbooks/main/recipes/default.rb b/chef/cookbooks/main/recipes/default.rb deleted file mode 100644 index 2cb7037e0b..0000000000 --- a/chef/cookbooks/main/recipes/default.rb +++ /dev/null @@ -1,3 +0,0 @@ -execute "say hello" do - command "echo welcome to diaspora chef" -end -- GitLab