Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] installing in an existing drupal multisites platform #3545

Open
matoeilD opened this issue Oct 13, 2017 · 3 comments
Open

[docs] installing in an existing drupal multisites platform #3545

matoeilD opened this issue Oct 13, 2017 · 3 comments

Comments

@matoeilD
Copy link

Problem/Motivation

We are having problem understanding how should be correctly installed the console in an existing drupal multisite platform of a dev server.
Some clarifications would be appreciated. I would then be happy to explicit further the documentation

steps:

  • from an existing drupal 8 platform
  • I have been told previously the installation must be done for every sites of the platform
    [docs] doc on how to install drupal console for multisites? #3532 (comment)
  • the install have been done first from the site folder : path/to/data-platforms/platforms/drupal8root/sites/sitenumber1/composer require drupal/console --prefer-dist --optimize-autoloader
  • running a drupal command output [ERROR] Drupal Console is not installed at:
    /data-platforms/platforms/drupal8root
  • the install have been done then from the drupal root folder (containing all sites ) :path/to/data-platforms/platforms/drupal8root/composer require drupal/console --prefer-dist --optimize-autoloader
  • drupal list output
    [ERROR] The specified database connection is not defined: default
    [WARNING] In order to list all of the available commands you should install
    drupal first.

My (naïve ) questions are:

  • from which folder shoud be run the composer command for an existing multisite platform? the drupal root folder ? or all sites folder from /sites
  • in my case i dont install the console then use it to install a drupal instance. I have got installed drupal sites and i want to be able to use drupal console commands. Why am i asked to install drupal first?
  • what is missing in the installation ?
    the doc says :"The first task you should do after installing Drupal Console is to execute the init command. Executing this command will copy the project configurations files to your local computer."
    Is this required when the local computer is where the project "drupal/console" have already been installed to, aka the dev server containing all drupal sites?

Details to include:

  • Drupal 8.4
  • Console version 1.0.2
  • Console Launcher version 1.0.2

Thanks in advance for your precisions

@jmolivas
Copy link
Member

@matoeilD To take interact with drupal multisite you should use the --uri flag ie:

drupal list --uri=site-name 
drupal site:install --uri=site-name 

@matoeilD
Copy link
Author

Thanks for your time.
I am sorry to say it is still not clear to me and it is still not working.
from the /my_site folder

  • drupal list --uri= my_site :
    [ERROR] Drupal Console is not installed at:
    /data-platforms/platforms/drupal8-dev
    -composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader
    -then drupal list --uri= my_site again output a very limited possible commands, why?

Drupal Console Launcher version 1.0.2
Drupal Console version 1.1.1

Usage:
command [options] [arguments]

Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-e, --env[=ENV] The Environment name [default: "prod"]
--root[=ROOT] Define the Drupal root to be used in command execution
--debug Switches on debug mode
--learning Generate a verbose code output
-c, --generate-chain Shows command options and arguments as yaml output to be used in chain command
-i, --generate-inline Shows command options and arguments as inline command
-d, --generate-doc Shows command options and arguments as markdown
-t, --target[=TARGET] Site name you want to interact with (for local or remote sites)
-l, --uri=URI URI of the Drupal site to use (for multi-site environments or when running on an alternate port)
-y, --yes Skip confirmation and proceed
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
about Displays basic information about Drupal Console project
chain Chain command execution
check System requirement checker
exec Execute an external command.
help Displays help for a command
init Copy configuration files.
list Lists all available commands
server Runs PHP built-in web server
debug
debug:chain (dch) List available chain files.
debug:settings (dse) List user Drupal Console settings.
debug:site (dsi) List all known local and remote sites.
dotenv
dotenv:debug Debug Dotenv debug values.
dotenv:init Dotenv initializer.
multisite
multisite:new (mun) Sets up the files for a new multisite install.
multisite:update (muu) Update the files for a multisite installed.
settings
settings:set Change a specific setting value in DrupalConsole config file
site
site:install (si) Install a Drupal project

I have never ran drupal site:install because the drupal site has been previsouly installed using aegir

@jmolivas
Copy link
Member

DrupalConsole is two thing the DrupalConsole Launcher and DrupalConsole itself full explanations here => https://docs.drupalconsole.com/en/getting/project.html

You should install per site => https://docs.drupalconsole.com/en/getting/composer.html
And you could install the launcher => https://docs.drupalconsole.com/en/getting/launcher.html

You have a limited number of commands because DrupalConsole is not finding your drupal installation possible issues => https://docs.drupalconsole.com/en/drupal_console_faq/installation-problems.html

Finally, this issue about DrupalConsosle not properly finding your site could be related to:

drupal site has been previsouly installed using aegir

We have a PR to provide support to aegir #3509

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

No branches or pull requests

2 participants