Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

activelamp_drupal (4) Versions 0.0.4

Cookbook for deploying Drupal websites and for installing Drush

Policyfile
Berkshelf
Knife
cookbook 'activelamp_drupal', '~> 0.0.4', :supermarket
cookbook 'activelamp_drupal', '~> 0.0.4'
knife supermarket install activelamp_drupal
knife supermarket download activelamp_drupal
README
Dependencies
Quality 17%

Build Status

Description

This cookbook provides an easy way to deploy a Drupal website, as well as a recipe for installing Drush.

Requirements

  • php
  • composer
  • git, svn, or whatever SCM system you need for your deploy.

This cookbook is not responsible for satisfying these requirements. You will have to provision your machine with these through your platform's dependency manager (apt, yum, etc), or through other cookbooks.

Platforms:

  • Tested on Ubuntu/Debian only, but the deploy actions should work with any platform.

Recipes

activelamp_drupal::drush

Installs Drush on your node:

include_recipe 'activelamp_drupal::drush'

Attributes

Option Default Description
[:activelamp_drupal][:drush][:version] "7.x" The version of Drush to install.
[:activelamp_drupal][:drush][:user] "root" The user responsible for the commands. The drush command will be registered under this user.
[:activelamp_drupal][:drush][:group] "root" The group responsible for the commands.
[:activelamp_drupal][:drush][:install_path] "/usr/local/bin/drush" Where the drush executable will be linked to.
[:activelamp_drupal][:drush][:composer_command] "composer" The Composer command that will work in your node. The default value will assume that composer is available globally. However you can specify something like "php /path/to/composer.phar" if the executable is somewhere that cannot be resolved by the $PATH environment variable.

Resources / Providers

drush_make

This resource uses the drush make command to build a Drupal site from a make file found in your project repository.

These are the things that happen during the make process:

  • drush make is called
  • Custom modules will be symlinked to the Drupal modules directory.
  • Custom themes will be symlinked to the Drupal themes directory.

Actions

  • All actions of the deploy resource is valid and works the same way, as the drush_make resource simply extends Chef::Resource::Deploy

Examples

Deploy a Drupal site
drupal_make "/path/to/project" do
    repo 'git@github.com:your_organization/your_drupal_project.git'
    git_ssh_wrapper '/tmp/ssh-wrapper.sh'
    revision 'v2.0'
    user node[:activelamp_drupal][:drush][:user]
    group node[:activelamp_drupal][:drush][:group]
    themes_dir 'themes'
    modules_dir 'modules'
    action :deploy
end

Options

All options for the deploy resource is applicable. The following options are drush_make-specific:

Option Default Description
make_file "drupal.make" The path to the make file relative to your project repository root.
build_to "_build" Where the Drupal site to be built, relative to your project repository root.
themes_dir nil Where your custom themes are relative to your project repository root. Nothing is done when nil.
modules_dir nil Where your custom themes are relative to your project repository root. Nothing is done when nil.

Configuring where themes and modules are symlinked to

By default, modules are symlinked into sites/all/modules/custom, and themes into sites/all/themes/custom. If you wish to put them somewhere else, just specify a second argument to modules_dir and/or themes_dir:

drupal_make "/path/to/project" do
    repo 'git@github.com:your_organization/your_drupal_project.git'
    git_ssh_wrapper '/tmp/ssh-wrapper.sh'
    revision 'v2.0'
    user node[:activelamp_drupal][:drush][:user]
    group node[:activelamp_drupal][:drush][:group]
    action :deploy
    themes_dir 'themes', 'themes/custom'
    modules_dir 'modules', 'modules/custom'
end

License and Authors

Author: Bez Hermoso bez@activelamp.com

Author: ActiveLAMP

Copyright: 2012-2014, ActiveLAMP

Apache 2.0 License

Collaborator Number Metric
            

0.0.4 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.0.4 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.0.4 failed this metric

FC053: Metadata uses the deprecated "recommends" keyword: activelamp_drupal/metadata.rb:12
FC064: Ensure issues_url is set in metadata: activelamp_drupal/metadata.rb:1
FC065: Ensure source_url is set in metadata: activelamp_drupal/metadata.rb:1
FC066: Ensure chef_version is set in metadata: activelamp_drupal/metadata.rb:1
FC069: Ensure standardized license defined in metadata: activelamp_drupal/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.0.4 passed this metric

Testing File Metric
            

0.0.4 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.0.4 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number