acquia / blt

Acquia's toolset for automating Drupal 8 and 9 development, testing, and deployment.
https://docs.acquia.com/blt/
GNU General Public License v2.0
442 stars 394 forks source link

Creating a new project with BLT - instructions not clear for usage with Drupal VM #2302

Closed therobyouknow closed 6 years ago

therobyouknow commented 6 years ago

On https://blt.readthedocs.io/en/stable/readme/creating-new-project/#creating-a-new-project-with-blt

I followed steps 1-3 OK, inside the Drupal VM I already have.

Questions:

My system information:

Output of blt doctor:

If you provide a link in your template as to a guide as to how to use this tool then I will read about it to be able to use it to give you the output you need.

When I run this command:

 blt vm

I get the following output:

vagrant@redwebbase:/var/www/drupalvm/html/docroot$ blt vm
No command 'blt' found, did you mean:
 Command 'btt' from package 'blktrace' (universe)
 Command 'llt' from package 'storebackup' (universe)
 Command 'lbt' from package 'lbt' (universe)
 Command 'slt' from package 'slt' (universe)
 Command 'bls' from package 'bareos-tools' (universe)
 Command 'bls' from package 'bacula-sd' (universe)
 Command 'bat' from package 'bareos-bat' (universe)
 Command 'bat' from package 'bacula-console-qt' (universe)
 Command 'lt' from package 'looptools' (universe)
 Command 'bld' from package 'bld' (universe)
blt: command not found

And I expected this to happen: I don't know - your instructions aren't clear

danepowell commented 6 years ago

To answer your questions in short: you should run all BLT commands (including those in the readme) on your host machine, not inside of a VM. I'm not sure that we support re-using an existing VM while creating a new project, you'll probably have a much easier time just creating a new VM from scratch. If you don't like the Vagrantfile and box/config.yml provided by default, you're welcome to provide your own after running blt vm but before the VM is actually provisioned.

Maybe there's some confusion here about how BLT works in relation to a VM.

BLT only supports running commands on a host machine (not inside of a VM). When using BLT, a VM should really only be used to hold your LAMP stack. When you execute BLT commands on the host machine, BLT dynamically determines whether individual commands need to be proxied into the VM.

This doesn't mean you can't run BLT entirely within a VM (this is a workaround used by some Windows developers), but it's not supported.

It sounds like you are trying to install and run BLT entirely within a VM, is that correct? If so, you should instead run the commands in the readme on the host machine. If you can suggest a change to the docs that would clarify this, it would be welcome.

therobyouknow commented 6 years ago

Thanks Dane, I would suggest a visual symbol/prefix or similar before each command in the docs to specify where it should be run. E.g. "on your host, in your blt folder" run this command etc.

grasmash commented 6 years ago

I would suggest a visual symbol/prefix or similar before each command in the docs to specify where it should be run.

Every single BLT command is designed to be run on the host machine, although frankly they are designed to work inside and outside of the virtual machine. So, a visual symbol should not be necessary.

The fact that the BLT command was not available inside of your virtual machine indicates that there was an issue provisioning it. This script is responsible for installing the command alias, and is executed by Drupal VM here.

Did your machine provision successfully? Do you have this configuration in your box/config.yml file?

grasmash commented 6 years ago

Executing blt vm will now output All blt commands executed on your host machine will be executed against this VM.