Drupal Deployment Skeleton (DDS) is a structure that optimizes Drupal site deployments using a combination of Bash scripts, drush, and drush_make.
Developed to facilitate the rapid deployment and development of commercial sites, this skeleton can be leveraged to allow you to create your own scriptable deployments. You must customize these scripts to your environment to be able to use it; this is not a turnkey package.
This package is intended to accompany the presentation "Optimize Site Deployments with Drush" by Jon Peck, first given at DrupalCamp WNY on October 14th, 2011.
- Drush - command line shell and scripting interface for Drupal
- Drush Make - an extension to drush that can create a ready-to-use drupal site, pulling sources from various locations
projects/NAME/config/install.sh dev
projects/NAME/config/install.sh prod
projects/NAME/config/rebuild.sh dev
projects/NAME/config/rebuild.sh prod
Scripts that need to be edited for the skeleton to function have been clearly marked. Review all content before executing to avoid unintended behavior.
- config\ - All configurations are stored here, and should be placed in the base_path_project\NAME\config
- cfg_parser.sh - (contributed code)
- config.ini - EDIT - configuration for each environment; name is the project name, base_path_workspace is where the folder goes and base_path_project is the where the project (configuration files) are stored.
- drush.make - EDIT - Standard drush_make configuration example, includes a number of modules that I use, along with jQuery UI 1.6, CKEditor 3.6.2, a placeholder for a custom module and theme from a SVN repository, and placeholders for patches.
- drushrc.dev.php - EDIT - Standard drush site installation configuration for development.
- drushrc.prod.php - EDIT - Standard drush site installation configuration for production.
- install.sh - EDIT - Script to install a site using the configurations in this folder. Disables comment module, removes orphaned actions, enables modules, clears the cache, and sets file permissions.
- rebuild.sh - Script to rebuild a site, which means it will delete the database and all files within the folder, then install.
- setup.sh - Loads the INI parser, the configuration, and checks if it can find the configuration.
- modules\ - Folder for custom modules.
- example\ - Example module.
- content_types\ - CCK Content Type definitions
- testimonial.cck - Exported CCK Content Type
- defaults\ - Collection of default values used in the installation.
- blocks.inc.php - SQL for disabling "Powered by Drupal" and "User login" blocks for a given theme.
- contact.inc.php - Sets contact page defaults, creates menu link
- content.inc.php - Programmatically creating two pages and menu links
- d7-blocks.inc.php - Drupal 7 SQL for disabling "Powered by Drupal" and "User login" blocks for a given theme.
- d7-content.inc.php - Drupal 7 basic page and menu creation
- d7-wysiwyg.inc.php - Drupal 7 SQL for creating WYSIWYG profiles.
- imagecache_presets.inc.php - Exported imagecache presets
- permissions.inc.php - Creates a role, then grants and revokes permissions.
- taxonomy.inc.php - Creates a vocabulary, then terms in that vocabulary.
- users.inc.php - Creates a new user in a given role
- variables.inc.php - Sets site variables, including site slogan, node paths, theme, XML sitemap, disabling user registration, customizing the contact form, and much more.
- wysiwyg.inc.php - SQL for creating two WYSIWYG profiles for CKEditor, one for plain text and one for HTML.
- example.info - Standard module info
- example.install - Implementation of hook_install; in order - variables, blocks, content types, clear content type cache, creates content, sets contact form and menu item, taxonomy, WYSIWYG, permissions, and users
- example.module - hook_imagecache_default_presets
- content_types\ - CCK Content Type definitions
- example\ - Example module.
- Bash INI Parser by Andrés J. Díaz, MIT License.
The Drupal Deployment Skeleton source code is hosted on GitHub.
Please use the issue tracker if you find any bugs or wish to contribute.
Drupal Deployment Skeleton (excluding contributed code) is Copyright (c) 2011 Jon Peck and FluxSauce
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.