We are always innocent, unless, from laziness or for convenience, we decide to overlook the novelty of the moment.
This is a guest post from Kate Marshalkina, a Russian Drupal developer who works for Licel LLC. Enjoy the read and check out some of her other work.
Drush Make is well-known as an advanced tool for Drupal distribution building. But it also can be very useful for those who have never dealt with distributions. One great example is applying patches like a boss.
In this article I’ll show you how I use Drush Make to automate some of my routine tasks and help me to discover great Drupal stuff.Drush Make commands
Drush Make includes 2 commands which are already built in Drush itself:
- make — Turns a .makefile into a Drupal codebase.
- make-generate — Generates a .makefile from the current Drupal site.
Both commands are related to a .makefile — flat text file with Drush Make instructions. You can read more about .makefile syntax here.
But for now, let's go deeper and see Drush Make in action.Rebuild your development environment
How often do you install a new and clean Drupal site for development, testing or demonstration purposes? Additionally to Drupal core, developers usually have a predefined list of favorite modules like Administration Menu, Views or something more special. With Drush Make you can automate this process greatly by combining all the projects you need into one file and lettting Drush Make build it for you.
Here is an example .makefile for a multilingual testing site:; Drush Make API version. api = 2 ; Drupal core. core = 7.x ;Common modules. projects[admin_menu][subdir] = "contrib" projects[ctools][subdir] = "contrib" projects[token][subdir] = "contrib" projects[views][subdir] = "contrib" ; Development modules. projects[devel][subdir] = "development" ; Multilingual modules. projects[fallback_language_negotation][subdir] = "contrib" projects[variable][subdir] = "contrib" projects[i18n][subdir] = "contrib" projects[i18nviews][subdir] = "contrib" ; Load some translations. translations = de translations = ru
This file can be saved locally (in ~/.drush/make-files/d7_i18n.make for example) or hosted on a remote server like GitHub.
To use it, let’s run the make command to prepare our custom build on our server (in /var/www/drupal_test.local for example):$ drush make d7_i18n.make /var/www/drupal_test.local
The first run can be quite long, but the next time Drush will take most of projects from its cache.
As a result, the latest Drupal core, contrib modules and translations from the .makefile will be downloaded and placed in appropriate folders. Now you can go to your site's URL and run the install.php or run the installation process directly with Drush:$ drush si --db-url="mysql://user:password@localhost/databasename" --site-name="Drupal Multilingual"
Additionally, you can also generate a tarball from the .makefile with --tar option:$ drush make d7_i18n.make drupal_multilingual --tar
Add to that a couple of features (based on Features module) and you’ll end up with your own distro.Download dependencies
Have you ever noticed that some contrib modules provide .make or .make.example file? These usually contain a list of specific external libraries (like the jQuery Colorbox plugin for the Colorbox module). These file can be built inside existing Drupal codebases using the --no-core flag. As an example, let’s say you want to download the Chosen module:$ drush dl chosen Project chosen (7.x-2.0-beta4) downloaded to sites/all/modules/contrib/chosen. $ drush make sites/all/modules/contrib/chosen/chosen.make.example --no-core chosen downloaded from https://github.com/harvesthq/chosen/releases/download/v1.1.0/chosen_v1.1.0.zip
In this case, the proper jQuery plugin was downloaded and unzipped into the proper directory inside the libraries/ folder. Isn’t that handy?
Module developers, please, add a .make.example file into your Drupal.org projects if you are using any external libraries. Instead of building custom Drush commands like chosen-plugin, we can use Drush Make. Just compare 117 lines to 7.Generate makefile from existing site
You can easily share a custom Drupal build with Drush Make. First run generate-makefile command from Drupal root to generate a skeleton:$ drush generate-makefile drupal_custom_build.make
The generated file drupal_custom_build.make will contain instructions for all enabled projects with specific versions. If a project has .git folder, Drush Make will automatically set appropriate properties:projects[redirect][type] = "module" projects[redirect][download][type] = "git" projects[redirect][download][url] = "http://git.drupal.org/project/redirect.git" projects[redirect][download][branch] = "7.x-1.x" projects[redirect][download][revision] = "0b7b8dc2d58cb277874d87c91c45f0a361e148f7"
This file still needs a quick manual review. For example, you can add patch references. In my project, 2 patches are applied to the Redirect module:projects[redirect][patch] = "https://drupal.org/files/issues/redirect-global-905914-145.patch" projects[redirect][patch] = "https://drupal.org/files/issues/redirect.circular-loops.1796596-146.patch"
The resulting .makefile may be very useful if you want to share your working environment with a colleague or to provide definitive info for troubleshooting.Bonus! Explore Drupal world!
Finally, the Drush Make file itself is a good read for discovering new cool contrib projects. Check out well-tested Commerce Kickstart or OpenScholar .makefiles with plenty of interesting projects inside.
I hope this article will help you use Drush more widely, to automate some of your tasks or to even build your first distribution!About the Author
Kate is a passionate web developer from Russia who fell in love with Drupal in 2011.
She cares about multilingual stuff, usability and performance.
All week, members of the CivicActions team will be in Austin, Texas for DrupalCon 2014. If you plan on attending, you can find us at booth 608 in the Exhibit Hall.
The Civic Lounge offers all kinds of ways to co connect with fellow civic-minded Drupalistas, including:
- a full schedule of civic-focused events, including Birds of a Feather (BoF) sessions and social events
- group text messaging using GroupMe to coordinate with the civic community
- updates on the #civiclounge hashtag
- and best of all, information regarding our Speakeasy Happy Hour on Wednesday night from 5-7pm
So, come find us at the booth, join the party and connect with your Civic-Drupal community. We can't wait to see you there!Topics
The monthly Drupal core bug fix release window is scheduled for this Wednesday. However, the last release was a month ago and this is DrupalCon week, so there won't be a bug fix release this month. Enjoy DrupalCon (those of you who are there)!
Upcoming release windows include:
- Wednesday, June 18 (security release window)
- Wednesday, July 2 (bug fix release window)
I'm on the plane headed to my 4th DrupalCon, and this one is looking like a good time.
So much is happening this year. Drupal 8 is getting closer and closer to release, more and more Drupal businesses and services are being launched, and we continue to develop our Drupal products.
While my session on DevShop wasn't accepted, I am personally involved in a lot of BoF sessions this year.Drupal.org & GitHub, Living in Harmony: HubDrop.io
On Tuesday, I'll be discussing the future of Drupal.org and GitHub integration via HubDrop.io, our git-mirror-as-a-service. If you are interested in moving your module development to GitHub, but want to keep the code going to drupal.org to keep integrated with it's release system, than HubDrop is for you.
We will chat about what HubDrop is, what it will be in the future, and we'll fan the long-running flamewar over whether drupal code hosting should just move to GitHub.
Room 10A (Ashday), 3rd floor. Tuesday - 5:00 to 6:00The Great Multisite Debate
This BoF session was spawned by what I thought was a simple question posted on Twitter:May 16, 2014
After a flurry of replies, Jakub Suchy from Acquia suggested to continue the conversation as a DrupalCon BoF.
Apparently I touched on a controversial subject!
Multisite is a powerful (some would say dangerously so) feature of Drupal that let's you host many sites pointed at a single codebase on a server, and the Drupal hosting as a service companies out there are starting to offer multisite and multisite-like services.
Aegir is built on the concept of multisite, but it's not a requirement to use it.
During a temporary lapse in judgement, I offered to moderate this throwdown, so wish me luck.
Expect to see representatives from the Aegir project, Pantheon, Acquia, and more. It's bound to be a spirited debate!
Room 8A - JustDigital | 3rd floor. Thursday · 10:45-11:45Aegir Hosting Project
Now that I've been invited to become a maintainer of the Aegir project, Christopher Gervais (the aegir lead) has invited me to join him at the Birds of a Feather session.
Come see what's new in Aegir 3, chat with other aegir users, and talk about what might be in store for the future.
Room 8B - Unicon | 3rd floor. Thursday · 02:15-03:15Future of DevShop, Aegir, & Open Cloud Software
As an alternative to my session on DevShop, I've scheduled a BoF on the future of DevShop. I'd like to have a conversation about what people are interested and where things could go from here.
As the year progresses I plan on releasing more tools for Aegir & DevShop for cloud management.
If you haven't heard of DevShop yet, go read my session proposal: DevShop: Drupal DevOps in a Box
So the BoFs are certainly where it is at this year. I hope to see you there. Please don't be afraid to get in touch if you'd like to meetup beyond the BoFs!
Tags: Planet DrupalDrupalCon
You’ve probably come across this situation before. When visiting a certain site, you see a browser warning that the website is using mixed content — both HTTP and HTTPS together.
Avoiding mixed content is nothing new to some web developers, but read on if you’re looking for a quick fix to prevent both mixed content warnings and CSRF attacks, which are the underlying reason why browsers have those warnings in the first place.Introducing HSTS
For somebody working in a development agency, estimation is a critical part of the job. Different companies handle this process differently, and the method can be anything from a wild guess ("That'll cost around $n") to a very methodic approach.
DrupalCon Austin 2014 kicks off today in Austin, Texas, at the Austin Convention Center. More than 3,300 people are expected to attend the event, which offers educational and networking opportunities for the mix of developers, designers, IT managers, agencies and Fortune 500 companies that make up the Drupal community.
In the first post of this series, we looked at why Symfony is being included in Drupal 8, and what that means for longtime Drupal developers. Now that we've considered the implications, just what is getting incorporated into Drupal?
Drupal is not using Symfony as a full stack framework. Rather, it is taking advantage of specific components. This post is essentially a list of these components with a link and a brief description for each.
Title: High Performance Drupal
Authors: Jeff Sheltren & Narayan Newton
Title: Drupal for Designers & Drupal Development Tricks for Designers
Author: Dani Nordin
Want to use the most awesome version of Drupal on the most awesome Drupal hosting? ;) This guide is for you!Let's Get Started!
First, head to http://www.acquia.com/acquia-cloud-free to set up your new site. This process takes a few minutes, but worry not; you can bide your time watching helpful tutorial videos! Once your site is provisioned, you'll be taken to the Acquia Cloud workflow page.
Banckle.Helpdesk for Drupal module provide personalized customer support services with web based ticketing management system.
Helpdesk Automation - Invisible to Customers Leverage the benefits of help desk automation, without your customers having to go through any changes. Send responses from the Banckle.Helpdesk web app, get delivered as simple and personalized emails to your customers..