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

Magento setup:install interactive shell #11425

Merged
merged 3 commits into from
Oct 28, 2017

Conversation

denisristic
Copy link
Contributor

@denisristic denisristic commented Oct 13, 2017

Run magento setup console command interactively

Description

I've added -i|--interactive flag to setup:install command.
It is doing validation of parameters and it uses ChoiceQuestions on SelectConfigOption.
Also on the end it dumps command to rerun from console.
When you run php bin/magento setup:install -i shell looks like this:

Backend frontname (will be autogenerated if missing)? magento2.local
Encryption key?
Database server host? localhost
Database name? magento2
Database server username? dbuser
Database server engine?
Database server password? dbpass
Database table prefix?
Database type?
Database  initial set of commands?
If specified, then db connection validation will be skipped [optional]?
http Cache hosts?
Session save handler?
  [0] files
  [1] db
  [2] redis
 > 0
Fully qualified host name, IP address, or absolute path if using UNIX sockets?
Redis server listen port?
Redis server password?
Connection timeout, in seconds?
Unique string to enable persistent connections?
Redis database number?
Redis compression threshold?
Redis compression library. Values: gzip (default), lzf, lz4, snappy?
Redis log level. Values: 0 (least verbose) to 7 (most verbose)?
Maximum number of processes that can wait for a lock on one session?
Number of seconds to wait before trying to break a lock for frontend session?
Number of seconds to wait before trying to break a lock for Admin session?
Lifetime, in seconds, of session for non-bots on the first write (use 0 to disable)?
Lifetime, in seconds, of session for bots on the first write (use 0 to disable)?
Lifetime of session for bots on subsequent writes (use 0 to disable)?
Redis disable locking. Values: false (default), true?
Redis min session lifetime, in seconds?
Redis max session lifetime, in seconds?
Default cache handler?
  [0] redis
 > 0
Redis server?
Database number for the cache?
Redis server listen port?
Default cache handler?
  [0] redis
 > 0
Redis server?
Database number for the cache?
Redis server listen port?
Set to 1 to compress the full page cache (use 0 to disable)?

URL the store is supposed to be available at. Deprecated, use config:set with path web/unsecure/base_url?
Default language code. Deprecated, use config:set with path general/locale/code? en_US
Default time zone code. Deprecated, use config:set with path general/locale/timezone? America/New_York
Default currency code. Deprecated, use config:set with path currency/options/base, currency/options/default and currency/options/allow? USD
Use rewrites. Deprecated, use config:set with path web/seo/use_rewrites?
Use secure URLs. Enable this option only if SSL is available. Deprecated, use config:set with path web/secure/use_in_frontend?
Base URL for SSL connection. Deprecated, use config:set with path web/secure/base_url?
Run admin interface with SSL. Deprecated, use config:set with path web/secure/use_in_adminhtml?
Whether to use a "security key" feature in Magento Admin URLs and forms. Deprecated, use config:set with path admin/security/use_form_key?

(Required) Admin user? admin
(Required) Admin password? admin123
(Required) Admin email? admin@example.com
(Required) Admin first name? Magento
(Required) Admin last name? Admin

Try re-running command: php bin/magento setup:install --backend-frontname=magento2.local --db-host=localhost --db-name=magento2 --db-user=dbuser --db-passwordd=dbpass --session-save=files --cache-backend=redis --page-cache=redis --language=en_US --timezone=America/New_York --currency=USD --admin-user=admin --admin-password=admin123 --admin-email=admin@example.com --admin-firstname=Magento --admin-lastname=Admin

Magento does not actually check for values on input (like database host if it is valid IP, domain or localhost) but instead it checks everything on the end

Manual testing scenarios

  1. run in console php bin/magento setup:install -i or php bin/magento setup:install --interactive

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds on Travis CI are green)

@okorshenko okorshenko self-assigned this Oct 25, 2017
@okorshenko okorshenko added this to the October 2017 milestone Oct 25, 2017
@okorshenko okorshenko merged commit ce12a74 into magento:2.2-develop Oct 28, 2017
okorshenko pushed a commit that referenced this pull request Oct 28, 2017
[EngCom] Public Pull Requests - 2.2-develop
 - MAGETWO-82954: Admin product search - Pressing enter does not submit #4696 #11827
 - MAGETWO-82953: Fix #11581: Reference to wrong / non-existing class #11830
 - MAGETWO-82887: X-Magento-Tags header containing whitespaces causes exception #11767
 - MAGETWO-82886: Improve error reporting for products images import. #11779
 - MAGETWO-82754: Magento setup:install interactive shell #11425
 - MAGETWO-81594: Issue #6924: Unmask exception message during product import #11363
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants