Permalink
Browse files

Full on Bakery installation minus mcrypt library

  • Loading branch information...
bjeavons committed Oct 10, 2012
1 parent 7fc662c commit 672e1d75ff3187583fa90073146220cde06d23e1
View
@@ -16,10 +16,31 @@ Vagrant::Config.run do |config|
chef.add_role("bakery")
chef.json.merge!({
:www_root => '/var/www',
+ :mysql => {
+ "server_root_password" => "1234",
+ "drupal_user" => "bakery",
+ "drupal_password" => "bakery"
+ },
+ :drupal => {
+ "admin_password" => "1234"
+ },
:sites => {
- "masterd6" => {:alias => "masterd6.vbox", :make => "bakery-d6.make"},
- "subd6" => {:alias => "d6.masterd6.vbox", :make => "bakery-d6.make"},
- "subd7" => {:alias => "d7.masterd6.vbox", :make => "bakery-d7.make"}
+ "masterd6" => {
+ :alias => "masterd6.vbox",
+ :core => "6",
+ :master => "masterd6.vbox",
+ :subs => ["d6.masterd6.vbox", "d7.masterd6.vbox"]
+ },
+ "d6subd6" => {:alias => "d6.masterd6.vbox", :core => "6", :master => "masterd6.vbox"},
+ "d7subd6" => {:alias => "d7.masterd6.vbox", :core => "7", :master => "masterd6.vbox"},
+ "masterd7" => {
+ :alias => "masterd7.vbox",
+ :core => "7",
+ :master => "masterd7.vbox",
+ :subs => ["d6.masterd7.vbox", "d7.masterd7.vbox"]
+ },
+ "d6subd7" => {:alias => "d6.masterd7.vbox", :core => "6", :master => "masterd7.vbox"},
+ "d7subd7" => {:alias => "d7.masterd7.vbox", :core => "7", :master => "masterd7.vbox"}
}
})
end
@@ -33,7 +33,7 @@ Install drush via Git from source repository.
== upgrade_pear:
-Upgrades PEAR to minimum required by drush via PEAR.
+Upgrades PEAR to v1.9.1, which meets minimum required by drush via PEAR.
== install_console_table:
@@ -49,8 +49,9 @@ is already available, this command will not be run.
== default:
* `node['drush']['install_method']` - Indicates the desired install method, currently either `git` or `pear`.
-* `node['drush']['version']` - Drush version of format x.y.z when install_method is pear (eg. 5.0.0).
+* `node['drush']['version']` - Drush preferred state (stable, beta, devel) or version of format x.y.z when install_method is pear (eg. 5.0.0).
When install_method is git, the format is a git reference commit/tag/branch (eg. 31d768a / 7.x-4.x / 7.x-5.0 )
+* `node['drush']['allreleases']` - URL of allreleases.xml for pear to install from preferred states.
* `node['drush']['make']['version']` - Drush Make version of format x.y
* `node['drush']['install_dir']` - Where to install Drush via Git. Used to install Drush Make as well.
@@ -17,17 +17,20 @@
# limitations under the License.
#
-# Pear search does not currently work with the preferred state. So we have to
-# specify a default version for now. https://pear.php.net/bugs/bug.php?id=19138
-# TODO: implement preferred_state attribute and logic once pear bug is fixed
-
# Options: pear, git
default['drush']['install_method'] = "pear"
# Used for drush install via git and make install (PEAR stores here by default).
default['drush']['install_dir'] = "/usr/share/php/drush"
-# When installing via PEAR, this is the x.y.z pear version (eg. 4.5.0)
-# When installing via Git, this is a commit/tag/branch reference (eg. 6e4c1e22f0b / 7.x-4.5 / 7.x-4.x)
-default['drush']['version'] = "5.0.0"
+# When installing via PEAR, this is the preferred state (stable, beta, devel)
+# or a specific x.y.z pear version (eg. 4.5.0). When installing via Git,
+# this is a commit/tag/branch reference (eg. 6e4c1e22f0b / 7.x-4.5 / 7.x-4.x)
+default['drush']['version'] = "stable"
+
+# URL of allreleases.xml for pear to install from preferred states
+default['drush']['allreleases'] = "http://pear.drush.org/rest/r/drush/allreleases.xml"
+
+# Version number (without drupal major version) from
+# http://drupal.org/project/drush_make
default['drush']['make']['version'] = "2.3"
@@ -19,6 +19,20 @@
include_recipe "php"
+# If drush version is a preferred state, get the latest version of that state
+case node['drush']['version']
+when 'stable', 'beta', 'devel'
+ require 'rexml/document'
+ require 'open-uri'
+ xml = REXML::Document.new(open(node['drush']['allreleases']))
+ xml.root.each_element('r') do |release|
+ if release.text('s') == node['drush']['version']
+ node['drush']['version'] = release.text('v')
+ break
+ end
+ end
+end
+
# Initialize drush PEAR channel
dc = php_pear_channel "pear.drush.org" do
action :discover
@@ -17,9 +17,12 @@
# limitations under the License.
#
-# Upgrade PEAR if current version is < 1.9.1
-cur_version = `pear -V 2>&1 | head -1 | awk '{print $NF}' | tr -d '\n'`
-php_pear "pear" do
+# Drush PEAR channel requires >= 1.9.1 due to hosting
+# on GitHub, where PEAR repo uses CNAME record.
+
+# Chef resources need unique names in case in run_list twice.
+php_pear "PEAR-drush" do
+ package_name "PEAR"
+ version "1.9.1"
action :upgrade
- not_if { Gem::Version.new(cur_version) > Gem::Version.new('1.9.0') }
end
@@ -8,13 +8,16 @@ api = 2
projects[drupal][version] = 6
; Modules
-projects[admin_menu][version] = 1.8
+projects[admin_menu][version] = "1.8"
projects[admin_menu][type] = "module"
projects[admin_menu][subdir] = "contrib"
-projects[devel][version] = 1.26
+projects[environment_indicator][version] = "1.1"
+projects[environment_indicator][type] = "module"
+projects[environment_indicator][subdir] = "contrib"
+projects[devel][version] = "1.26"
projects[devel][type] = "module"
projects[devel][subdir] = "contrib"
-projects[bakery][version] = 2.0-alpha3
+projects[bakery][version] = "2.x-dev"
projects[bakery][type] = "module"
-projects[bakery][subdir] = contrib
+projects[bakery][subdir] = "contrib"
@@ -8,13 +8,13 @@ api = 2
projects[drupal][version] = 7
; Modules
-projects[admin_menu][version] = 3.0-rc3
-projects[admin_menu][type] = "module"
-projects[admin_menu][subdir] = "contrib"
-projects[devel][version] = 1.2
+projects[environment_indicator][version] = "1.1"
+projects[environment_indicator][type] = "module"
+projects[environment_indicator][subdir] = "contrib"
+projects[devel][version] = "1.2"
projects[devel][type] = "module"
projects[devel][subdir] = "contrib"
-projects[bakery][version] = 2.0-alpha3
+projects[bakery][version] = "2.x-dev"
projects[bakery][type] = "module"
-projects[bakery][subdir] = contrib
+projects[bakery][subdir] = "contrib"
Oops, something went wrong.

0 comments on commit 672e1d7

Please sign in to comment.