Permalink
Browse files

[+FEATURE] Added aufs recipe

  • Loading branch information...
1 parent 728c5ef commit 3b0ac1566d3531d00728b047fb37814585e47014 @davidfuhr davidfuhr committed Jan 31, 2012
@@ -13,7 +13,7 @@
end
execute "magento-link" do
- command "ln -s /opt/magento-#{node['magento']['version']} #{node['magento']['dir']}"
+ command "mkdir #{node['magento']['dir']}"
creates "#{node['magento']['dir']}"
- action :nothing
+ action :create
end
@@ -0,0 +1,6 @@
+template "/tmp/aufs-mount.sh" do
+ mode "0755"
+end
+
+execute "/tmp/aufs-mount.sh" do
+end
@@ -19,20 +19,17 @@
node.set_unless['magento']['admin']['username'] = "admin"
node.set_unless['magento']['admin']['password'] = "admin123"
-
-
include_recipe "database"
include_recipe "flagbit-magento::mysql"
include_recipe "flagbit-magento::apache2"
include_recipe "flagbit-magento::php"
-
-
template "/tmp/magento-install.sh" do
mode "0755"
end
execute "/tmp/magento-install.sh" do
-
end
+include_recipe "flagbit-magento::aufs"
+
@@ -0,0 +1,15 @@
+
+# mount tmp dir to install dir
+if [ ! -d "/tmp/magento-<%= node[:magento][:version] %>" ]; then
+ mkdir /tmp/magento-<%= node[:magento][:version] %>
+fi
+mount -t aufs -o br:/tmp/magento-<%= node[:magento][:version] %> none <%= node[:magento][:dir] %>
+
+# mount magento to install dir
+mount -o remount,append:/opt/magento-<%= node[:magento][:version] %> <%= node[:magento][:dir] %>
+
+# mount user src to install dir
+if [ ! -d "/home/vagrant/src" ]; then
+ mkdir /home/vagrant/src
+fi
+sudo mount -o remount,append:/home/vagrant/src <%= node[:magento][:dir] %>

0 comments on commit 3b0ac15

Please sign in to comment.