joomla-cms
joomla-cms copied to clipboard
[4.3] Add a CLI installation for Joomla
This PR adds a method to install Joomla via command line to simplify API tests and installations with one-click-setups. The new installation method can be triggered by running php installation/joomla.php install
in the root of the Joomla folder. The different options are documented by running php installation/joomla.php help install
.
All options can be given either by option directly on the command line or when running the install command interactively. If a default value is given for an option and that option is not defined, that default value is taken.
Summary of Changes
This adds a new CLI entry file, similar to cli/joomla.php
to the installation with all necessary steps to run the installation. The code uses as much of the current installation as possible and validates the options from the setup.xml
file.
Testing Instructions
- Run
php installation/joomla.php install
in your installation and check that afterwards Joomla is properly installed. - Run
php installation/joomla.php install
with all necessary CLI options
If you are using a dev version (checked out the GIT version) the installation folder is preserved, otherwise the folder is deleted.
Documentation Changes Required
The CLI installation needs to be documented. The initial documentation is done in installation/INSTALL
Acknowledgement
I'd like to thank Mittwald for supporting this improvement.
excited to try this. would it not make more sense for it to be in the cli folder?
Unfortunately the application in the /cli
folder does only work when Joomla is already installed. Since the installer should also be removed when the installation is done, it needs to be part of the /installation
folder.
Unfortunately the application in the
/cli
folder does only work when Joomla is already installed. Since the installer should also be removed when the installation is done, it needs to be part of the/installation
folder.
Fair enough
Please use the same terminology and field order as in the regular web site install
Especially as the error messages are based on the web install terminology
Passwords should not be displayed in plain text to prevent over-the -shoulder attacks
Create and fill database...OK
==>
Creating and populating database...OK
Its a statement of what is happening and not a question.
Same for the others
Please add some sort of installation complete message. Otherwise no one would know if the installer has bombed out or completed
other than these cosmetic issues it appears to work
there isn't a prebuild for 4.3 branch yet ?
Please add some sort of installation complete message. Otherwise no one would know if the installer has bombed out or completed
It actually contains a success message and your installation did indeed fail. Good question why. Looking into it.
It actually contains a success message and your installation did indeed fail. Good question why. Looking into it.
The files in the folder installation were removed but not the folder. (There is an existing issue on that I believe?) BUT there should have been some sort of message
The files in the folder installation were removed but not the folders. (There is an existing issue on that I believe?)
I am not aware of any existing issue.
The files in the folder installation were removed but not the folders. (There is an existing issue on that I believe?)
I am not aware of any existing issue.
#37909
Ah that one.
Please use the same terminology and field order as in the regular web site install
Especially as the error messages are based on the web install terminology
I reordered the fields. Unfortunately we need different text for the CLI options than for the web installer. Since the CLI is always in english, the current solution is acceptable for me.
Passwords should not be displayed in plain text to prevent over-the -shoulder attacks
The symfony console package does not allow to hide this input in any way.
Create and fill database...OK
==>
Creating and populating database...OK
Its a statement of what is happening and not a question.
Same for the others
Done
there isn't a prebuild for 4.3 branch yet ?
Not yet, but I will create a PR to fix that. I don't want to do this in this PR.
The language you are using is not correct!!
there isn't a prebuild for 4.3 branch yet ?
Not yet, but I will create a PR to fix that. I don't want to do this in this PR.
Done #38331, #38332
Passwords should not be displayed in plain text to prevent over-the -shoulder attacks
The symfony console package does not allow to hide this input in any way.
of course it does - just look at the cli for creating a user
I reordered the fields.
why? What is the reasoning. A lot of thought went into the ordering.
I have tested this item :red_circle: unsuccessfully on 6ca4269b432d587420ecd4c65d1824825e565048
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38325.
I reordered the fields.
why? What is the reasoning. A lot of thought went into the ordering.
You asked for it... I reordered the fields the way they are displayed in CLI, not in the web installer.
Passwords should not be displayed in plain text to prevent over-the -shoulder attacks
The symfony console package does not allow to hide this input in any way.
of course it does - just look at the cli for creating a user
mea culpa. You are right. Going to fix that tomorrow.
I mis read that as being - no I wont change the order as I have reordered them here.
But please change the language strings as suggested - what you have done is wrong
from a 1st look
database not on localhost doesn't work
on a 2nd look the db_password can be empty in the web installer
Passwords should not be displayed in plain text to prevent over-the -shoulder attacks
Fixed.
from a 1st look database not on localhost doesn't work
fixed.