Skip to content

Instantly share code, notes, and snippets.

@jmolivas
Last active May 27, 2016 21:33
Show Gist options
  • Save jmolivas/bcf4ac4e000c3913f3c864cc083c4aed to your computer and use it in GitHub Desktop.
Save jmolivas/bcf4ac4e000c3913f3c864cc083c4aed to your computer and use it in GitHub Desktop.

DrupalVM + DrupalConsole

Instructions to execute DrupalConsole commands remotely using site alias against a DrupalVM site.

NOTE: make sure you make changes according to your DrupalVM custom configuration.

Allow paswordless ssh connection

Execute this instruction:

cat ~/.ssh/id_rsa.pub | ssh [email protected] "mkdir -p ~/.ssh && cat >>  ~/.ssh/authorized_keys"

Create a new site-alias file.

Path: ~/.console/sites/drupalvm.yml

dev:
  root: /var/www/drupalvm/drupal
  host: 192.168.88.88
  user: vagrant
  console: /usr/local/bin/drupal

Execute Drupal Console

drupal @drupalvm.dev list

Set default site alias (this will be available on 1.0.0-beta1)

Update file ~/.console/config.yml and add

application:
  default:
    global:
      options:
        target: drupalvm.dev
@geerlingguy
Copy link

You can cut out the "Allow paswordless ssh connection" section by setting up the alias like the following:

dev:
  root: /var/www/drupalvm/drupal
  host: 192.168.88.88
  user: vagrant
  keys:
    private: ~/.vagrant/insecure_private_key
  console: /usr/local/bin/drupal

@jmolivas
Copy link
Author

Thanks for the clarification @geerlingguy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment