-
-
Notifications
You must be signed in to change notification settings - Fork 645
Drush 9 cannot SSH into Drupal VM #1595
Comments
Hmm... at a quick glance, I'm not sure if there's a simple backwards-compatible way to make this work well. We might have to either drop the feature (managing an alias file on the host), or make it more complicated and have two different templates for |
This is how I'm going to fix it for BLT. Might be marginally less portable, but I think it will still work in most environments: acquia/blt#2241 |
The reason we use Based on
I think we should use ssh:
options: -o PasswordAuthentication=no -i ${env.home}/.vagrant.d/insecure_private_key As for the Anyone want to post ternary operations as a feature request to https://github.com/grasmash/expander? :) |
Where are we with this now? Is the simple fix that we would want to use Since Drush 9.0.0 was just released, it's probably best for us to make sure it'll be fully compatible! |
I'm also just now learning about drush-launcher, and it looks like maybe the old way I globally installed drush globally on my Mac ( |
So, I'm now seeing new Drush-related issues in Drupal VM's automated builds, e.g.:
From: https://travis-ci.org/geerlingguy/drupal-vm/jobs/333562827
From: https://travis-ci.org/geerlingguy/drupal-vm/jobs/333562825 |
Looks like the first problem is actually drush-ops/drush#3330 |
Also related: geerlingguy/ansible-role-drush#41 |
The change for |
Also see: #1672 (preliminary work before I will be able to work any further on this ticket). |
Here's some testing I've done on the host side (with Drush 9.0.0 and launcher inside the VM, as per #1672 WIP):
So after I finish #1672 I'll work on getting the alias files up to snuff. |
Also, here's the generated alias file: 14:09:10 ~/Sites/drupalvm/drupal/drush/sites $ cat drupalvm.site.yml
test:
host: drupalvm.test
options: { }
paths:
drush-script: /var/www/drupalvm/drupal/vendor/drush/drush/drush
root: /var/www/drupalvm/drupal/web
uri: drupalvm.test
user: vagrant
ssh:
options: '-o "SendEnv PHP_IDE_CONFIG PHP_OPTIONS XDEBUG_CONFIG" -o PasswordAuthentication=no -i "${env.home}/.vagrant.d/insecure_private_key"' |
Things are getting... complicated. Basically, Drush 9 no longer automatically looks inside your user home drush:
paths:
alias-path:
- '${env.home}/.drush/sites' I'm thinking I may write those contents to the file if a config file doesn't already exist. But if it does then we'll have to ask the user to add the proper alias-path configuration. Annoying... but I guess it can work. |
Next fun problem: drush-ops/drush#3336 |
For the problem linked above, the issue was having a
The alias will be I'm hoping this won't cause too much of a problem, as it shouldn't cause alias conflicts if you use things like:
But it would cause problems if you have multiple domains in one Drupal VM like:
Note that automated drush alias generation from Drupal VM has always been a little awkward, and I always generate my own aliases and store them in per-project drush configs instead of using global aliases nowadays. I've also updated the documentation to account for this change as part of #1672. This will definitely need to be a minor release... and I'm contemplating making it a major since the Drush integration is essentially different in every way :O |
This is fixed in |
Totally thought Greg and I fixed this the |
Issue Type
Your OS
Summary
DrupalVM provides a template Drush alias file so that Drush knows how to access the VM via SSH:
https://github.com/geerlingguy/drupal-vm/blob/master/provisioning/templates/drupalvm.aliases.drushrc.php.j2
There are a few problems with this for Drush 9:
BLT has started converting its own alias template for Drush 9 but I'm stuck on that last step. I figure we should decide on a collective approach to this.
https://github.com/acquia/blt/blob/9.1.x/scripts/drupal-vm/drupal-vm.aliases.yml
The text was updated successfully, but these errors were encountered: