Drupal for (distributed) development teams
and reliable, staged, single-command deployments
- Storing configuration as code, in version control; instead of in the database.
- Referring to 3rd party code instead of copying them into your project.
- Multiple deployment targets (local, staging, production, etc.)
- Single-command deployments with Capistrano.
- Kick-start new projects from skeletons.
With Drupal 8 beta releases being pumped out by our beloved core developers and the number of critical issues only decreasing, it is time to think about the future of Kraftwagen.
Kraftwagen in its current form only works for Drupal 7. We need to think about if Kraftwagen or parts of it are still needed for Drupal 8. And if we still need Kraftwagen, how we are going to implement this.
Please join the discussion on Trello.
One of Drupal’s core values is
“easy to use”. Yet what that means to
end-users (who use FTP to upload Drupal to a web host, and customize
it through the admin interface), is different from what that means to
developers (who customize Drupal extensively, need staged deployments
and use version control systems to collaborate).
Kraftwagen makes Drupal “easy to use” for developers.
Kraftwagen consists of a Drush
extension and set of Drupal modules, all
and hosted on github.
It reuses existing work where possible, for example:
version control systems (git, subversion, mercurial, etc.) and
Because Drupal stores a lot a configuration details in the database,
version control systems cannot be used to track changes. This makes it
hard for a team of developers to collaborate, or to stage changes to a
separate deployment target before rolling them out in production.
Kraftwagen primarily solves this issue by using
to sync aspects of Drupal project’s different installations
to the same state. These aspects can be: configuration details in the
database, creation of base-line content, setting up static files or
any other aspect of a Drupal project that can be controlled from PHP.
Kraftwagen extends Drupal with:
- The kraftwagen Drush extension
— provides a set of Drush commands to manage an install
profile based Drupal development and deployment workflow.
- The kw-itemnames Drupal module
— allowes human names to be assigned to items that are
mapped to numeric primary keys.
- The kw-manifests Drupal module
— adds support idempotent migrations (manifests).
Besides these extensions an integration with Capistrano
facilitates single-command deployments. A must in the age of continuous delivery.
The following goals were set when developing Krafwagen:
- Everything in code™
- We wanted to make sure all the required information to run an
application or website is in source code. If some developer checks
out the project from a repository, he should be able the get it
running, without manual steps in Drupal’s admin interface or copying
- Don’t reinvent the wheel
- A lot of effort has already been done in this area and we wanted to
build on top of that. That’s why Kraftwagen is built on top of Drush.
Kraftwagen commands are only thin convience wrappers around existings
commands or sequences of commands. This also means that most concepts
in Kraftwagen should sound familiar to any seasoned Drupal developer.
- Version control independence
We didn’t want a tool that completely locks us into Subversion, Git or
any other version control mechanism. Of course we all love version control
and use it whenever we can, but a toolchain should not depend on a specific
flavor of version control. Currently there is one Git dependent
command: the command to start a new project uses Git to download the
- Environment awareness
Drupal itself doesn’t make any difference between staging, production
and development environments. In production you’ll want the
Devel module disabled,
while in development environments it should be enabled. When copying
around database dumps this is almost impossible to do automatically.
module extends Drupal with the notion of environments.
- Transparent in use
Developers should naturally understand the workflows that Kraftwagen
facilitates. Therefore Kraftwagen’s command line commands report
what they are doing and error messages are constructive.
Getting started with Kraftwagen
should be a breeze for any seasoned Drupal developer.
Kraftwagen is a open source project that welcomes contributions from the community.
All development happens on our Github
respositories; needless to say that we welcome pull-requests and issue tickets.
There is also a mailing list for Kraftwagen,
it allows for discussions, sharing of insights and posts of otherwise Kraftwagen related
stuff. We will also announce release there, so make sure to subscribe.