Skip to content
Browse files

Install daemontools

  • Loading branch information...
1 parent fad4118 commit bf79495fa497e9e1b8ff28a289e88df3959f6a36 Hari Manikarnika & Michael Sofaer committed
Showing with 71 additions and 0 deletions.
  1. +1 −0 Gemfile
  2. +27 −0 Gemfile.lock
  3. +19 −0 Vagrantfile
  4. +14 −0 chef/cookbooks/hellspawn/recipes/default.rb
  5. +10 −0 lib/hellspawn.rb
View
1 Gemfile
@@ -1,2 +1,3 @@
source :gemcutter
gem "wrong"
+gem "vagrant"
View
27 Gemfile.lock
@@ -7,10 +7,23 @@ GEM
RubyInline (3.8.6)
ZenTest (~> 4.3)
ZenTest (4.4.0)
+ abstract (1.0.0)
+ archive-tar-minitar (0.5.2)
diff-lcs (1.1.2)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
+ ffi (0.6.3)
+ rake (>= 0.8.7)
file-tail (1.0.5)
spruz (>= 0.1.0)
+ i18n (0.5.0)
+ json (1.4.6)
+ mario (0.0.6)
+ net-scp (1.0.4)
+ net-ssh (>= 1.99.1)
+ net-ssh (2.0.24)
predicated (0.2.2)
+ rake (0.8.7)
ruby2ruby (1.2.5)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
@@ -21,6 +34,19 @@ GEM
ruby2ruby (>= 1.2.5)
sexp_processor (>= 3.0.5)
spruz (0.2.2)
+ thor (0.14.6)
+ vagrant (0.7.0)
+ archive-tar-minitar (= 0.5.2)
+ erubis (~> 2.6.6)
+ i18n (~> 0.5.0)
+ json (~> 1.4.6)
+ mario (~> 0.0.6)
+ net-scp (~> 1.0.4)
+ net-ssh (~> 2.0.23)
+ thor (~> 0.14.6)
+ virtualbox (~> 0.8.2)
+ virtualbox (0.8.2)
+ ffi (~> 0.6.3)
wrong (0.4.5)
ParseTree (~> 3.0)
diff-lcs (~> 1.1.2)
@@ -35,4 +61,5 @@ PLATFORMS
ruby
DEPENDENCIES
+ vagrant
wrong
View
19 Vagrantfile
@@ -0,0 +1,19 @@
+Vagrant::Config.run do |config|
+ config.vm.box = "lucid32"
+ config.vm.box_url = "http://files.vagrantup.com/lucid32.box"
+
+ # Assign this VM to a host only network IP, allowing you to access it
+ # via the IP.
+ # config.vm.network "33.33.33.10"
+
+ # Forward a port from the guest to the host, which allows for outside
+ # computers to access the VM, whereas host only networking does not.
+ # config.vm.forward_port "http", 80, 8080
+
+ config.vm.provision :chef_solo do |chef|
+ chef.cookbooks_path = "chef/cookbooks"
+ chef.add_recipe "hellspawn"
+ chef.log_level = :debug
+ end
+end
+
View
14 chef/cookbooks/hellspawn/recipes/default.rb
@@ -0,0 +1,14 @@
+require '/vagrant/lib/hellspawn'
+
+
+package "git-core" do
+ action :install
+end
+
+ruby_block "install daemontools" do
+ block { Hellspawn.install_daemontools! }
+end
+
+execute "make sure daemontools is installed" do
+ command "ls /command/svscanboot"
+end
View
10 lib/hellspawn.rb
@@ -76,4 +76,14 @@ def dt_options
end
end
end
+
+ def self.install_daemontools!
+ directory = "/package/admin"
+ repo = "git://github.com/MikeSofaer/daemontools.git"
+ dir_name = "daemontools-0.76"
+ FileUtils.mkdir_p directory
+ system("cd #{directory} && git clone #{repo} #{dir_name}")
+ system("cd #{File.join(directory, dir_name)} && ./package/install")
+ end
+
end

0 comments on commit bf79495

Please sign in to comment.
Something went wrong with that request. Please try again.