Permalink
Browse files

Re-add aufs for 14.04.

  • Loading branch information...
darron committed May 18, 2014
1 parent 97cad1b commit 23d3af52bf1af46d5661c53ad6dad4ece7b99e23
Showing with 24 additions and 1 deletion.
  1. +2 −0 Berksfile
  2. +1 −0 Gemfile
  3. +2 −0 attributes/default.rb
  4. +2 −1 metadata.rb
  5. +17 −0 recipes/default.rb
View
@@ -1,3 +1,5 @@
site :opscode
metadata
+
+cookbook 'chef-sugar', git: 'https://github.com/sethvargo/chef-sugar'
View
@@ -8,6 +8,7 @@ gem "rake"
gem "tailor"
gem "rubocop"
gem "chef-taste"
+gem 'chef-sugar'
group :integration do
gem "test-kitchen", "~> 1.0"
View
@@ -21,3 +21,5 @@
default['docker']['package']['distribution'] = 'docker'
default['docker']['package']['repo_url'] = 'https://get.docker.io/ubuntu'
default['docker']['package']['repo_key'] = 'https://get.docker.io/gpg'
+
+default['docker']['image']['extra'] = 'linux-image-extra-$(uname -r)'
View
@@ -4,7 +4,8 @@
maintainer_email 'darron@froese.org'
license 'Apache 2.0'
description 'Installs/configures docker'
-version '0.9.0'
+version '0.10.0'
recipe 'docker::default', 'Installs/configures docker'
depends 'apt'
+depends 'chef-sugar'
View
@@ -18,6 +18,8 @@
# limitations under the License.
#
+include_recipe 'chef-sugar::default'
+
apt_repository 'docker' do
uri node['docker']['package']['repo_url']
distribution node['docker']['package']['distribution']
@@ -27,6 +29,21 @@
package 'cgroup-lite'
+# Install package for aufs.
+package node['docker']['image']['extra']
+
+bash 'look for aufs' do
+ user 'root'
+ cwd '/tmp'
+ code <<-EOH
+ if ! grep -q aufs /proc/filesystems && ! sh -c 'modprobe aufs'; then
+ echo >&2 'Warning: tried to install '"$kern_extras"' (for AUFS)'
+ echo >&2 ' but we still have no AUFS. Docker may not work. Proceeding anyways!'
+ ( set -x; sleep 10 )
+ fi
+ EOH
+end
+
package 'lxc-docker'
service 'docker' do

0 comments on commit 23d3af5

Please sign in to comment.