Valkyrie provides a number of Drush commands, which are well documented within Drush itself. Run the following to review these commands:
$ drush help --filter=valkyrie
These break down into three categories:
- Setting up a project
- Building a platform (Drupal code-base) and site.
- Tools to ease development
Once you've installed Valkyrie and its dependencies, the first things you'll want to do is create a new project. In this context, a 'project' is a directory containing all the components required to launch and configure a local VM.
The 'drush valkyrie-new' command (aliased to 'vnew') will create such a project. Besides creating the directory, this command will copy Valkyrie itself into a hidden folder within the project. This ensures that the project will keep running, regardless of updates to the Valkyrie Drush extension. This directory's contents are committed into a git repository to make tracking changes easier. Any customizations can be done here, in isolation from the system install, and shared with other team members via git.
To create a project run
drush vnew [name]. You may only need one project
since it will be running Aegir which supports
multiple platforms/sites. For simplicity, we suggest naming your first project
drush vnew valkyrie
This will create a folder named "valkyrie" in the current working directory and will spin up and provision a VM. This will take a while so go grab a coffee/beer.
During the provisioning process you should see a couple highlighter notices.
One is an SSH key for the
aegir user within VM (in case you want to add it as
a deploy key to private repos.) The other is a login link for accessing your
locally installed Aegir that forms the backbone of Valkyrie. An easier way to
access the front-end is to simply run:
drush @v uli
Updating a Project
If you've updated the Valkyrie Drush extension (i.e., via 'drush dl valkyrie'), you may want to update your projects to use some if the new code. Within a project, this will affect mostly the Vagrantfile (and associated code) and the Puppet code used to configure the VM. To update the Valkyrie code cached in a project, run the following from the project root:
drush valkyrie-update # or 'drush vup'
This will copy in a fresh version of Valkyrie from the recently updated Drush extension. To apply any changes in VM configuration, re-run the provisioners in Vagrant:
$ vagrant provision
If there is any reason to rollback from an update, you should be able to use git, like so:
$ git checkout .valkyrie/valkyrie
Building platforms and sites
valkyrie-generate-platform (vgp) Generate a platform. valkyrie-platform-rebuild (vpr) Rebuild a site's platform. valkyrie-site-clone (vsc) Clone a site from a git repo. valkyrie-site-generate (vsg) Create and install a new git-based site. valkyrie-site-reinstall (vsr) Reinstall a site.
valkyrie-logs (vlog) Tail the Apache error log. valkyrie-sql-snapshot (vss) Cache a sql-dump for later diffing. valkyrie-sql-diff (vsd) Diff the current sql-dump with an earlier snapshot.