Kraftwagen is Drush extensions that provides a set of comands to support a
everything in code and install profile/
drush make based Drupal development
build: Directory that contains the working Drupal installation or a symlink to the working Drupal installation, in a subdir of
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 the
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 a
srcdirectory 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 a
cnfdirectory in which a few files and a directory are created. The directory is called
filesand is intended to become the directory in which the user uploaded files in Drupal are stored. The files are called
environmentfile contains the type of enviroment, like 'production' (which is the default), 'staging', 'testing' or 'development'. The
settings.local.phpfiles are copied from the
settings.local.php(in our skeleton example this is setup correctly), so all global settings can be in
settings.phpand settings that differ per deployment, like database credentials, can be in
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
.makefile and rebuilding. It can be even more easy. This command accepts the location of a
.makefile 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 a
builddirectory that contains a runnable Drupal installation. It will use
src/tools/build.make.tplto construct a make file and then will feed that file to
drush maketo create the installation. When
drush makeis finished, it will symlink the
cnf/filesdirectory and the
build/sites/default. If you created a
buildsdirectory, it will not create the build in
build. It will instead create the build in datestamped subdirectory of
builda symlink to this subdirectory.
drush kw-init-database: This command is fairly simple wrapper around
drush 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.