patreon supported

Wooden Mallet

 
With the weather getting somewhat cooling in Minnesota, I've had a renewed interest in working on projects outside the confines of a screen and keyboard. Woodworking was one of my first hobbies. I was fortunate to grow up with a functional wood shop in the garage. It wasn't anything out of The New Yankee Workshop, but there was a bench, a few saws, sander, and some hand tools. It was enough to make a few small projects when the urge struck me. It wasn't until a couple of years ago that I decided I...

Deploying Web stacks DRY-ly with Ansible, Part 2: Users and Logins

 
In the last part we began by setting up the core infrastructure necessary to stand up a new server using automation and Continuous Integration. A Gitlab instance serves as the repository, with Gitlab CI connecting to the target server to deploy playbooks and execute Ansible. Our playbooks were surprisingly sparse due to the fact we relied on Ansible Roles to do most of the heavy lifting. Now, all we need to do is push code to our infrastructure repository, and CI will configure the server for us.

Deploying Web stacks DRY-ly with Ansible, Part 1: Infrastructure

 
I've been working on a new site for the last several months. It runs great locally, but when I started thinking of putting it on a live server, I ran into a series of problems. I was hoping that I could simply upgrade my web server from PHP 5.6 to PHP 7, then deploy my Drupal 8 site in place. Sounds simple, right? unfortunately, PHP 7 introduced compatibility-breaking changes which caused problems for my old, Drupal 7-powered site. If I wanted to install both PHP 5.6 and PHP 7 on the same server, I...

The HAC Metric

 
Whenever I get a bit of free time, I start to wonder what I can do with it. Should I work on some code? Write a blog post? Draw something? Fix something around the house? The worst thing that can happen is that I'll end a weekend or holiday feeling it was wasted no matter what I do, and I guilt myself for days for my supposed laziness. I've written about organizing my weekend time before; organizing your off time for projects can work, but it's an incomplete method. It does nothing to help you decide...

Building a custom migration in Drupal 8, Part 6: Custom Source Plugins

 
In the last post, we went beyond simple node migrations and leveraged the power of the Drupal 8 migration system to break up and reorganize our content into Paragraphs. We created a separate migration for each source field we wanted to convert into a paragraph entity, and then an additional migration that created nodes using the paragraphs. We used psudofields and some creative use of plugins to migrate things just the way we wanted. It sounds like we've handled everything, but we can still go further.

Building a custom migration in Drupal 8, Part 5: Paragraphs

 
In the last post, we migrated our uploaded images and attachments by creating a custom file migration. We explored the process section of our migration *.yml, and enhanced it with custom mappings. We leveraged Drupal 8's powerful process plugin system to even further customize our migrations. We found out we could chain migrations together through the migration_lookup plugin. Finally, we created and ran a simple node migration. So that's it, right? Series over? Heck no! In this part,

Building a custom migration in Drupal 8, Part 4: Files and Content

 
In the last post, we finally wrote and executed our first migrations. We performed a dependency mapping to determine we needed to first migrate roles, then our users. We created new migrations in *.yml directly by searching our Drupal core directory for useful migration_templates. We're four parts in, and we have yet to migrate any nodes! Argh! Can we just start migrating nodes already!? File migrations It's really tempting at this point to jump in and start writing a migration for some of your...

Building a custom migration in Drupal 8, Part 3: Users and Roles

 
In the last post, we laid the technical foundation necessary to create migrations. We installed the Migrate Plus and Migrate Tools modules to support our migrations. We imported our Drupal 7 database locally, and configured settings.php with connection credentials. Finally, we created a migration group to use those connection credentials. But we still haven't migrated any content as of yet. Let's change that. Where to start? Now that we're ready to start creating custom migrations, we...

Building a custom migration in Drupal 8, Part 2: Tools and Modules

 
In the last post we set the stage to build a custom migration in Drupal 8. We installed Drupal 8 locally, and performed some initial, basic configuration. We didn’t get very far in technical tasks, but we spent a lot of time revisiting and rethinking our previous design choices. At this point you should have an idea of how you want your new site to work. Work, not look. We’re interested in functional details, content types, organizational strategies, that sort of thing. Visual appearance is a...

Building a custom migration in Drupal 8, Part 1: Getting started

 
Unlike previous versions, there’s no real way to “upgrade” to Drupal 8. Instead, you set up a completely new Drupal 8 site, then migrate your existing site to your new one. Given a database connection and a files directory, this auto-generated migration can attempt to replicate your entire site. This is great, but it also replicates all your previous design decisions, mistakes, and cruft. Instead, you may want to see moving to Drupal 8 as an opportunity to revisit previous decisions and...