chef_repo/cookbooks/cucumber-chef/recipes/lxc.rb in cucumber-chef-2.1.0.rc.11 vs chef_repo/cookbooks/cucumber-chef/recipes/lxc.rb in cucumber-chef-2.1.0.rc.12
- old
+ new
@@ -17,11 +17,11 @@
# limitations under the License.
#
################################################################################
-%w( lxc bridge-utils debootstrap yum isc-dhcp-server bind9 ntpdate ntp ).each do |p|
+%w(lxc bridge-utils debootstrap yum isc-dhcp-server bind9 ntpdate ntp).each do |p|
package p
end
################################################################################
@@ -218,29 +218,10 @@
# LXC
################################################################################
service "lxc-net"
service "lxc"
-#directory "create cgroup mount point" do
-# path "/cgroup"
-#
-# not_if { File.exists?("/cgroup") && File.directory?("/cgroup") }
-#end
-
-#mount "mount cgroup device" do
-# mount_point "/cgroup"
-# device "cgroup"
-# fstype "cgroup"
-# pass 0
-# action [:mount, :enable]
-
-# not_if do
-# %x( mount | grep "cgroup" )
-# ($? == 0)
-# end
-#end
-
execute "set LXC_AUTO to false" do
command "sed -i \"s/LXC_AUTO=\\\"true\\\"/LXC_AUTO=\\\"false\\\"/\" /etc/default/lxc"
notifies :stop, "service[lxc-net]"
@@ -264,50 +245,5 @@
directory "create lxc configuration directory" do
path "/etc/lxc"
not_if { File.exists?("/etc/lxc") && File.directory?("/etc/lxc") }
end
-
-# # 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"
-
-# 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")
-
-# 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
-
-# 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
-
-# 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
-
-# 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