Permalink
Browse files

Sketching out BZE deps

  • Loading branch information...
1 parent f2e0dd7 commit eca4d1eed7c9e59e34a6b4342b7bbe324d19367e @xaviershay committed Feb 14, 2011
Showing with 45 additions and 0 deletions.
  1. +45 −0 bze.rb
View
@@ -0,0 +1,45 @@
+dep 'drupal' do
+ met? {
+ "/var/www/drupal-7.0".p.exists?
+ }
+
+ meet {
+ url = 'http://ftp.drupal.org/files/projects/drupal-7.0.tar.gz'
+ log_shell "Downloading drupal from #{url}", "wget #{url}"
+ shell 'mv drupal-7.0.tar.gz /var/www/'
+ in_dir '/var/www' do
+ log_shell "Extracting", 'tar -zxvf drupal-7.0.tar.gz'
+ end
+ }
+end
+
+dep 'drupal configured' do
+ requires 'drupal'
+ requires 'benhoskings:mysql access' # TODO: Don't prompt for details here
+
+ met? {
+ "/var/www/drupal-7.0/sites/default/settings.php".p.exists?
+ }
+
+ meet {
+ in_dir '/var/www/drupal-7.0' do
+ log_shell "Copying default settings", 'cp sites/default/default.settings.php sites/default/settings.php'
+ shell 'chmod a+w sites/default/settings.php'
+ shell 'chmod a+w sites/default'
+ end
+ }
+end
+
+dep 'enable mysql' do
+ met? {
+ "/etc/init/mysql.conf".p.exists?
+ }
+
+ meet {
+ shell "mv /etc/init/mysql.conf.disabled /etc/init/mysql.conf"
+ }
+end
+
+ # TODO: Proper settings file for drupal
+ # TODO: Copy DB conf to drupal settings
+ # TODO: Maintenance user setup (drush?)

0 comments on commit eca4d1e

Please sign in to comment.