Daemontools installs and starts up mongo
This commit is contained in:
parent
a9451d19b9
commit
c5a94c608e
4 changed files with 21 additions and 1 deletions
|
|
@ -4,3 +4,4 @@ end
|
|||
|
||||
include_recipe "centos::image_magick"
|
||||
include_recipe "centos::mongo_db"
|
||||
include_recipe "common::main"
|
||||
|
|
|
|||
|
|
@ -7,5 +7,9 @@ execute "refresh yum" do
|
|||
end
|
||||
|
||||
execute "install mongo" do
|
||||
command "yum install -y mongo-stable"
|
||||
command "yum install -y mongo-stable-server"
|
||||
end
|
||||
|
||||
execute "make the data directory" do
|
||||
command "mkdir -p /data/db"
|
||||
end
|
||||
|
|
|
|||
14
chef/cookbooks/common/recipes/daemontools.rb
Normal file
14
chef/cookbooks/common/recipes/daemontools.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
execute "get the daemontools repo" do
|
||||
command "mkdir -p /package/admin && cd /package/admin && git clone git://github.com/MikeSofaer/daemontools.git daemontools-0.76 || true"
|
||||
end
|
||||
|
||||
execute "compile daemontools" do
|
||||
command "cd /package/admin/daemontools-0.76 && ./package/install"
|
||||
end
|
||||
|
||||
execute "mongo run" do
|
||||
command "mkdir -p /service/mongo && echo '#!/bin/sh' > /service/mongo/run && echo 'exec /usr/bin/mongod' >> /service/mongo/run"
|
||||
end
|
||||
execute "executable" do
|
||||
command "chmod -R 755 /service/mongo"
|
||||
end
|
||||
1
chef/cookbooks/common/recipes/main.rb
Normal file
1
chef/cookbooks/common/recipes/main.rb
Normal file
|
|
@ -0,0 +1 @@
|
|||
include_recipe "common::daemontools"
|
||||
Loading…
Reference in a new issue