chef_repo/cookbooks/cucumber-chef/recipes/lxc.rb in cucumber-chef-2.0.7 vs chef_repo/cookbooks/cucumber-chef/recipes/lxc.rb in cucumber-chef-2.1.0.rc.0

- old
+ new

@@ -1,9 +1,9 @@ ################################################################################ # # Author: Zachary Patten <zachary@jovelabs.com> -# Copyright: Copyright (c) 2011-2012 Atalanta Systems Ltd +# Copyright: Copyright (c) 2011-2013 Atalanta Systems Ltd # License: Apache License, Version 2.0 # # 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 @@ -265,51 +265,49 @@ path "/etc/lxc" not_if { File.exists?("/etc/lxc") && File.directory?("/etc/lxc") } end -=begin -# load the chef client into our distro lxc cache -install_chef_sh = "/tmp/install-chef.sh" -distros = { "ubuntu" => [ "lucid", "maverick", "natty", "oneiric", "precise" ] } -arch = (%x( arch ).include?("i686") ? "i386" : "amd64") +# # load the chef client into our distro lxc cache +# install_chef_sh = "/tmp/install-chef.sh" +# distros = { "ubuntu" => [ "lucid", "maverick", "natty", "oneiric", "precise" ] } +# arch = (%x( arch ).include?("i686") ? "i386" : "amd64") -template "create lxc initializer container configuration" do - path "/etc/lxc/initializer" - source "lxc-initializer-config.erb" +# template "create lxc initializer container configuration" do +# path "/etc/lxc/initializer" +# source "lxc-initializer-config.erb" - not_if { File.exists?("/etc/lxc/initializer") } -end +# not_if { File.exists?("/etc/lxc/initializer") } +# end -distros.each do |distro, releases| - releases.each do |release| - cache_rootfs = File.join("/", "var", "cache", "lxc", release, "rootfs-#{arch}") - initializer_rootfs = File.join("/", "var", "lib", "lxc", "initializer", "rootfs") +# distros.each do |distro, releases| +# releases.each do |release| +# cache_rootfs = File.join("/", "var", "cache", "lxc", release, "rootfs-#{arch}") +# initializer_rootfs = File.join("/", "var", "lib", "lxc", "initializer", "rootfs") - execute "create the lxc initializer container for #{distro}/#{release}" do - command "lxc-create -n initializer -f /etc/lxc/initializer -t #{distro} -- -r #{release}" +# execute "create the lxc initializer container for #{distro}/#{release}" do +# command "lxc-create -n initializer -f /etc/lxc/initializer -t #{distro} -- -r #{release}" - not_if { File.exists?(cache_rootfs) && File.directory?(cache_rootfs) } - end +# not_if { File.exists?(cache_rootfs) && File.directory?(cache_rootfs) } +# end - execute "destroy the lxc initializer container for #{distro}/#{release}" do - command "lxc-destroy -n initializer" +# execute "destroy the lxc initializer container for #{distro}/#{release}" do +# command "lxc-destroy -n initializer" - only_if { File.exists?(initializer_rootfs) && File.directory?(initializer_rootfs) } - end +# only_if { File.exists?(initializer_rootfs) && File.directory?(initializer_rootfs) } +# end - template "create opscode omnibus installer in lxc container cache for #{distro}/#{release}" do - path "#{cache_rootfs}#{install_chef_sh}" - source "lxc-install-chef.erb" - mode "0755" +# template "create opscode omnibus installer in lxc container cache for #{distro}/#{release}" do +# path "#{cache_rootfs}#{install_chef_sh}" +# source "lxc-install-chef.erb" +# mode "0755" - not_if { File.exists?(File.join(cache_rootfs, install_chef_sh)) } - end +# not_if { File.exists?(File.join(cache_rootfs, install_chef_sh)) } +# end - execute "install chef-client using omnibus in lxc container cache for #{distro}/#{release}" do - command "chroot #{cache_rootfs} /bin/bash -c '#{install_chef_sh}'" +# execute "install chef-client using omnibus in lxc container cache for #{distro}/#{release}" do +# command "chroot #{cache_rootfs} /bin/bash -c '#{install_chef_sh}'" - not_if { File.exists?(File.join(cache_rootfs, "opt", "opscode", "bin", "chef-client")) } - end - end -end -=end +# not_if { File.exists?(File.join(cache_rootfs, "opt", "opscode", "bin", "chef-client")) } +# end +# end +# end