Kraftwagen is Drush extensions that provides a set of comands to support a
everything in code and install profile/drush make
based Drupal development
workflow.
archive
: Directory where old builds will be stored when you do not have abuilds
dir.build
: Directory that contains the working Drupal installation or a symlink to the working Drupal installation, in a subdir ofbuilds
.builds
: Optional directory in which multiple builds can be stored.cnf
: Contains settings, the Drupal upload directory and the environment file. The settings and files directory will be symlinked into thebuild
.src
: The actual source of the project, which is a Drupal install profile.tools
: Optional directory in which you can have a Drush and Kraftwagen per project. You can setup this directory using our tools repository.
Kraftwagen provides a set of commands. Some of these commands are public, and some are hidden. All of the hidden commands are called by public commands. The hidden commands are there to allow Kraftwagen to work with automated deployment tools like Capistrano.
drush kw-new-project
: Creates asrc
directory in which the source of a the new project is placed, based on a provided skeleton Git repository. Although it is easily possible to create a new project from scratch without using this command, this will get you up to speed more quickly and allows for a company-wide standard on how Drupal projects are constructed (like modules that always should be enabled or desired default configuration). We provide a skeleton example that you can fork or copy for your own work.drush kw-setup
: Creates acnf
directory in which a few files and a directory are created. The directory is calledfiles
and is intended to become the directory in which the user uploaded files in Drupal are stored. The files are calledenvironment
,settings.php
andsettings.local.php
. Theenvironment
file contains the type of enviroment, like 'production' (which is the default), 'staging', 'testing' or 'development'. Thesettings.php
andsettings.local.php
files are copied from thesrc/cnf
directory.settings.php
should includesettings.local.php
(in our skeleton example this is setup correctly), so all global settings can be insettings.php
and settings that differ per deployment, like database credentials, can be insettings.local.php
.drush kw-update-makefile
: Usually, updating Drupal installations to new versions can be real pain the bottom. With Kraftwagen, all core and contrib projects are saved by just the version number. Everything else will be downloaded when building. This make updating already a breeze, because it will be as simple as updating the number in your.make
file and rebuilding. It can be even more easy. This command accepts the location of a.make
file and will automatically update all version numbers for you. It is recommended to keep the file in version control, because this command will change the file, so you want a rollback.drush kw-build
: This command creates abuild
directory that contains a runnable Drupal installation. It will usesrc/tools/build.make.tpl
to construct a make file and then will feed that file todrush make
to create the installation. Whendrush make
is finished, it will symlink thecnf/files
directory and thecnf/settings.php
andcnf/settings.local.php
intobuild/sites/default
. If you created abuilds
directory, it will not create the build inbuild
. It will instead create the build in datestamped subdirectory ofbuilds
and makebuild
a symlink to this subdirectory.drush kw-init-database
: This command is fairly simple wrapper arounddrush site-install
. The wrapper is just that it will automatically find out the name of the install profile that should be used. It can only be ran in the build.drush kw-update
: This command makes sure all modules that should be enabled, are enabled, and that modules that should be disable, are disable. Then it runs all pending database updates for modules (drush updatedb
). It's third step is reverting all features (drush features-revert-all
) and at last it will run all Kraftwagen Manifests. This command can only be ran in the build.