acquia / acsf-tools

Command line tools for working with Acquia Cloud Site Factory
21 stars 25 forks source link

How to execute out of a context of a site #4

Open seanhamlin opened 7 years ago

seanhamlin commented 7 years ago

I am looking to see if these tools can help me create drush aliases for a few ACSF instances I have access to. Ideally I am after something self contained, that does not need to bootstrap drupal in order to run.

Currently I do not know this is possible:

 12:10:06  ~/projects/govcms-acsf-tools   8.x-dev ✘ ✭  ⬡ v8.4.0 
$ drush --include=. help sfa
Fetch the drush aliases for all the sites in your factory.

Examples:
 drush acsf-tools-fetch-aliases            Fetch drush aliases for all the sites in your factory.

Aliases: sfa
 12:10:21  ~/projects/govcms-acsf-tools   8.x-dev ✘ ✭  ⬡ v8.4.0 
$ drush --include=. sfa
Command acsf-tools-generate-aliases needs a higher bootstrap level to run - you will need to invoke drush from a more functional  [error]
Drupal environment to run this command.
The drush command 'sfa' could not be executed.

Looking at the drush command, it is expected to bootstrap to DRUSH_BOOTSTRAP_DRUPAL_SITE. Why is this the case?

Also, are you expected to run Drupal 8 on the ACSF instance? What is the significance of the 8.x branch in this repo?

msherron commented 6 years ago

Hi @seanhamlin yes d8 is currently required. I'm using the YAML component from Symfony to parse config files. If I refactored to use something local to this project, I could both remove the need to bootstrap drupal and this library should be D7 compatible. I'll look around. Thanks!

sherakama commented 5 years ago

I was able to get this to run by running composer install in the plugin and re-routing the include paths to not to assume a Drupal 8 structure but rather, to be relative to the plugin. I installed this tool in my ~/.drush directory and not within a Drupal project.