drupal

DrupalCon and DrupalCamp news + free DrupalCon ticket!

DrupalCon Austin

This week, the DrupalCon Austin sessions have been posted, and I'm thrilled to have one of my session submissions (in the DevOps track) selected: DevOps for Humans: Ansible for Drupal Deployment Victory!.

The session will go over how Ansible can be used to realize faster, easier, and more successful Drupal deployments, as well as Ansible's ability to make sure that every environment is 'like production', so you don't ever have surprises when you deploy code to its final destination.

If you're interested in building a DevOps culture for your company or consultancy, or if you're already using tools like Puppet or Chef, and want to see what Ansible might offer (YAML and Twig-like template syntax (Jinja2), for starters—just like Drupal 8!), please join me for the session at DrupalCon. The session will cover some of the material I'm writing about in my book-in-progress, Ansible for DevOps.

Meet Phergie, an efficient PHP IRC bot

The Drupal community uses IRC extensively for collaboration and community building. A permanent and ever-helpful fixture of the official #drupal-* IRC channels, and in the Drupal community itself, is the humble Druplicon bot. Druplicon is a Drupal-based IRC bot that was created in 2005, and is still going strong as part of the Bot module for Drupal.

Bots like Druplicon do a lot of nice things—they can remind people of things after they were away for a while, they can store facts, track karma, throw people virtual beers, store and retrieve helpful facts, and relay important information. For example, when a build fails in Jenkins, a bot can post a message in IRC. Similarly, if a server goes down, or is under heavy load, the bot could post a message.

What if you want your own bot for a different IRC channel? Drupal's Bot requires an entire Drupal environment to run, and while the bot is not too heavy on resources, an always-connected, efficient and pluggable bot would be better off on its own. And in PHP-land, there's just such a bot. Meet Phergie, a PHP IRC Bot.

Phergie logo

Announcing DrupalCamp STL.2014 - April 26 in St. Louis, MO

DrupalCamp STL 2014 Logo

St. Louis is getting ready for its first-ever DrupalCamp! On April 26, 2014, DrupalCamp St. Louis will open up with a keynote by Brad Nowak, a Business Development Manager at Palantir. The Camp will have sessions covering a variety of topics, like Drupal 8 and how your business can benefit from Drupal's flexibility. It will be held at Washington University's West Campus in Clayton, MO, just a few blocks from a MetroLink station and only a few minutes away from Downtown St. Louis!

Online registration is open already, and for the next couple of weeks, earlybird registration is only $15! For that tiny fee you get:

  • A free lunch from Lywelyns
  • An snazzy t-shirt
  • A full day's worth of Drupal learning from some great Drupal users and developers in St. Louis and the midwest
  • A fun after party paid for by our excellent sponsors

Space is limited, so register early to guarantee a spot at the first DrupalCamp in the region!

Also, if you're interested in speaking at the Camp, please submit your session; we'd love to hear about sites you've built, new things in Drupal, business uses of Drupal, project management, site building, etc.!

Multisite Apache Solr Search with Domain Access

Using one Apache Solr search core with more than one Drupal website isn't too difficult; you simply use a module like Apache Solr Multisite Search, or a technique like the one mentioned in Nick Veenhof's post, Let's talk Apache Solr Multisite. This kind of technique can save you time (and even money!) so you can use one Hosted Apache Solr subscription with multiple sites. The only caveat: any site using the solr core could see any other site's content (which shouldn't be a problem if you control all the sites and don't expose private data through solr).

There are two ways to make Apache Solr Search Integration work with Domain Access (one of which works similarly to the methods mentioned above for multisite), and which method you use depends on how your site's content is structured.

Solr Search with Domain Access - Siloed Content

If the content you are indexing and searching is unique per domain (just like it would be unique per multisite Drupal instance), then you can set up Domain Access to index content with a different Apache Solr hash per site, like so:

Ansible Playbooks for Drupal 8 Testing and Mac Dev

Lately, I've been working a lot with Ansible, a simple but powerful infrastructure management platform. I now use Ansible playbooks and ad-hoc commands to manage all of Midwestern Mac's infrastructure (this site, Hosted Apache Solr, Server Check.in, and many ancillary servers), and as a result, I've started using Ansible for pretty much any kind of work I need to do in development—including configuring my own Mac, and developing with Drupal 8.

Meet Ansible

Ansible Logo - Black transparent

For those who haven't heard of Ansible before, it's often described as being a little like Puppet or Chef, used for configuration management. You define the configuration of a server, and Ansible makes sure the server is configured as defined. But Ansible goes quite a bit further—it's also great for deploying applications (especially in tandem with tools like Jenkins), running commands on servers, and day-to-day management of a few, hundreds, or even thousands, of servers—it's an end-to-end configuration management tool. Ansible also has a great, and rapidly-growing community, building it up and making it markedly better every release.

Ansible uses YAML to define configuration (just like Drupal 8!), and is relatively easy to pick up, especially if you already have some experience on the command line. You can read more about it in a book I'm writing, Ansible for DevOps, and hopefully, I'll be able to tell you more about Ansible in person at DrupalCon Austin—I've submitted a session titled DevOps for Humans: Ansible for Drupal Deployment Victory! (please leave a comment and let me know what you want to hear!).

Drupal development VM (Vagrant + Ansible)

I used to use MAMP (a simple-to-install Apache + MySQL + PHP setup for Macs) for all my development, which made adding virtual hosts to Apache relatively simple. However, there are many downsides to developing with MAMP—I could never configure things like drush, APC, the version of PHP, MySQL, or auxiliary tools like XDebug and Solr, exactly how I wanted or needed them.

Debugging Varnish VCL configuration files

If you're a Drupal or PHP developer used to debugging or troubleshooting some code by adding a print $variable; or dpm($object); to your PHP, and then refreshing the page to see the debug message (or using XDebug, or using watchdog logging...), debugging Varnish's VCL language can be intimidating.

VCL uses C-like syntax, and is compiled when varnish starts, so you can't just modify a .vcl file and refresh to see changes or debug something. And there are only a few places where you can simply stick a debug statement. So, I'll explain four different ways I use to debug VCLs in this post (note: don't do this on a production server!):

Simple Error statements (like print in PHP)

Sometimes, all you need to do is see the output of a variable, like req.http.Cookie, inside vcl_recv(). In these cases, you can just add an error statement to throw an error in Varnish and output the contents of a string, like the Cookie:

error 503 req.http.Cookie;

Save the VCL and restart Varnish, and when you try accessing a page, you'll get Varnish's error page, and below the error message, the contents of the cookie, like so:

Varnish error debug message

Pages

Subscribe to RSS - drupal