Magento 2 Bash Install/Restore Script

Overview

Magento 2 Bash Install/Restore Script

Docker Image CI GitHub closed pull requests GitHub closed issues

This script is designed to simplify the installation process of Magento 2 and rapid deployment of merchant code and DB dumps.

m2install can be a helpful tool for support teams and teams who often need to install or deploy merchant backups or dumps.

The main purpose of this script is run m2install, wait a bit and get a working magento instance. Don't waste time on routine operations.

If you have any issues please report them to https://github.com/yvoronoy/m2install/issues

What can m2install exactly do?

  • Can automatically restore backup files created by
  • php bin/magento setup:backup --code --db
  • Can automatically restore support dumps created by Enterpsie Support Tool
  • php bin/magento support:backup:code (db)
  • Script can automatically install vanilla magento

Installation

Download latest version by curl

curl -o m2install.sh https://raw.githubusercontent.com/yvoronoy/m2install/master/m2install.sh

You can install by composer

composer require yvoronoy/m2install

In case you are using bash completion you can download completion for this script.

#For Linux User
curl -o /etc/bash_completion.d/m2install-bash-completion https://raw.githubusercontent.com/yvoronoy/m2install/master/m2install-bash-completion

#For OSX User with brew
curl -o /usr/local/etc/bash_completion.d/m2install-bash-completion https://raw.githubusercontent.com/yvoronoy/m2install/master/m2install-bash-completion

Usage

$ m2install.sh --help
m2install.sh is designed to simplify the installation process of Magento 2
and deployment of client dumps created by Magento 2 Support Extension.

Usage: m2install.sh [options]
Options:
    -h, --help                           Get this help.
    -s, --source (git, composer)         Get source code.
    -f, --force                          Install/Restore without any confirmations.
    --sample-data (yes, no)              Install sample data.
    --ee                                 Install Enterprise Edition.
    --b2b                                Install B2B Extension.
    -v, --version                        Magento Version - it means: Composer version or GIT Branch
    --mode (dev, prod)                   Magento Mode. Dev mode does not generate static & di content.
    --quiet                              Quiet mode. Suppress output all commands
    --skip-post-deploy                   Skip the post deploy script if it is exist
    --step (restore_code,restore_db      Specify step through comma without spaces.
        configure_db,configure_files     - Example: m2install.sh --step restore_db,configure_db
        installB2B --b2b                 - Example: m2install.sh --step installB2B --b2b
        installLiveSearch)               - Example: m2install.sh --step installLiveSearch
    --restore-table                      Restore only the specific table from DB dumps
    --debug                              Enable debug mode
    --php                                Specify path to PHP CLI (php71 or /usr/bin/php71)
    --remote-db                          Remote database name
    --es-host, --elasticsearch-host      Set the Elasticsearch host
    --es-port, --elasticsearch-port      Set the Elasticsearch port
    --uninstall                          Delete database and application from the current folder
    _________________________________________________________________________________________________
    --ee-path (/path/to/ee)              (DEPRECATED use --ee flag) Path to Enterprise Edition.

How to deploy backup/support dumps

In order to deploy the customer dumps you need:

  • Put DB and code dumps to new directory
  • Go to directory and run m2install

How to install Magento 2 using GIT

To install Magento 2 from git repository run m2install with --source git param

  • m2install --source git or
  • m2install -s git

How to install Magento 2 using Composer

To install Magento 2 from composer run m2install with --source composer param

  • m2install --source composer or
  • m2install -s composer

How to Install Magento 2 with Sample Data

  • Run m2install
  • Use wizard to install the sample data.

How to Install Magento 2 with B2B extension

With wizard

  • Run m2install
  • Use wizard to install the B2B

With CLI flags

  • m2install --ee --b2b or
  • m2install --step installB2B --b2b if you already have Magento EE

Remember that you have to install Enterprise Edition to be able to install B2B extension

Wizard

m2install shows you wizard on first run and prompts to save entered values to config file.

$ m2install.sh 
Current Directory: /Users/yvoronoy/Sites/m2/ee202
Configuration loaded from:
Enter Server Name of Document Root (default: http://mage2.dev/): 
Enter Base Path (default: ee202): 
Enter DB Host (default: localhost): 
Enter DB User (default: root): 
Enter DB Password: 
Enter DB Name (default: root_ee202): 
Do you want to install Sample Data (y/N) n
Enter Path to EE or [nN] to skip EE installation: n
--------------------------------------------------
BASE URL: http://mage2.dev/ee202/
DB PARAM: root@localhost
DB NAME: root_ee202
Sample Data will NOT be installed.
Magento EE will NOT be installed.
In order to generate static/di content, add mode param: m2install.sh --mode prod
Are you sure? [y/N] 

How to use configuration files

The config file allows you to store params for DB and URL. Example of config file

HTTP_HOST=http://your-mage-host.com/
BASE_PATH=your/base/path/${CURRENT_DIR_NAME}
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=dbpassword

When you first run m2install script, it shows wizard which prompts to save the config file to your home directory.

m2install uses fallback mechanism to find config files recursively from home directory to current directory. For example if you want to install magento to directory ~/www/m2/ga/magento2ee

you can override config file which is placed in your home directory.

~/.m2install.conf
~/www/.m2install.conf
~/www/m2/.m2install.conf
~/www/m2/ga/.m2install.conf
~/www/m2/ga/magento2ee/.m2install.conf

How to use ssh tunnels for remote DB connection

Make sure that you have correct parameters in .m2install.conf file Parameters example:

REMOTE_DB_HOST=mysql-host:3306
[email protected]
REMOTE_KEY=/Users/path/to/ssh_key
LOCAL_PORT=33060

As a result you will get:

ssh -i /Users/path/to/ssh_key -o StrictHostKeyChecking=no -4fN -L 33060:mysql-host:3306 [email protected] >> /dev/null

All created ssh tunnels pids located in file kill_tunnel.sh in Magento root folder (or pub)

To run you will need only code dump file (Example code.tar.gz).

m2install.sh --remote-db database_name

Make attention that in --remote-db database_name first part before "_" is database user name

Make attention that in bootstrap added SECURE and UNSECURE BASE_URL to prevent DB modification

$_ENV['CONFIG__DEFAULT__WEB__UNSECURE__BASE_URL'] = 'http://magento.local/';
Comments
  • Issue with warning in DB dump

    Issue with warning in DB dump

    My dumps started from lines:

    Warning: Using a password on the command line interface can be insecure.
    mysqldump: Couldn't find table: "log_customer"
    mysqldump: Couldn't find table: "log_quote"
    mysqldump: Couldn't find table: "log_summary"
    mysqldump: Couldn't find table: "log_summary_type"
    mysqldump: Couldn't find table: "log_url"
    mysqldump: Couldn't find table: "log_url_info"
    mysqldump: Couldn't find table: "log_visitor"
    mysqldump: Couldn't find table: "log_visitor_info"
    mysqldump: Couldn't find table: "log_visitor_online"
    mysqldump: Couldn't find table: "index_event"
    mysqldump: Couldn't find table: "index_process_event"
    -- MySQL dump 10.13  Distrib 5.6.28, for Linux (x86_64)
    

    Your script can't remove first one. Please, fix it ASAP!!!

    bug 
    opened by isitnikov 7
  • URGENT!!! Custom admin path

    URGENT!!! Custom admin path

    After deploying I can access admin panel (get 404) because admin/url/custom_path is not empty and admin/url/use_custom_path = 1.

    Please, fix it ASAP!!!!

    bug 
    opened by isitnikov 4
  • Installs a different version without a warning

    Installs a different version without a warning

    I tried to install using this command from magento-sparta repo: m2install.sh -s git --git-branch 2.1.11 --sample-data yes --ee -f The installation finished successfully and only after I've finished testing, I've noticed that it installed develop branch instead (because there was no 2.1.11 branch). Please break installation if the branch has not been found rather then installing develop branch.

    opened by katmoon 2
  • Cannot turn off INSTALL_EE

    Cannot turn off INSTALL_EE

    My ~/.m2install.conf contained the line INSTALL_EE=1

    and it was not possible to turn it off and install only CE in the interactive mode:

    Magento EE will be installed
    Confirm That the Entered Data Is Correct? (y/N) N
    Git CE repository (default: [email protected]:magento-sparta/magento2ce.git): 
    Git EE repository (default: [email protected]:magento-sparta/magento2ee.git): 
    Git branch (default: MDVA-369): 
    Do you want to install Enterprise Edition (y/N) N
    Enter Server Name of Document Root (default: http://web2.sparta.corp.magento.com/): 
    Enter Base Path (default: dev/kmuntianu/MDVA-369): 
    Enter DB Host (default: sparta-db): 
    Enter DB User (default: kmuntianu): 
    Enter DB Password: 
    Enter DB Name (default: kmuntianu_mdva369): 
    Do you want to install Sample Data (y/N) N
    --------------------------------------------------
    Magento code will be downloaded from GIT
    Git CE repository: [email protected]:magento-sparta/magento2ce.git
    Git EE repository: [email protected]:magento-sparta/magento2ee.git
    Git branch: MDVA-369
    BASE URL: http://web2.sparta.corp.magento.com/dev/kmuntianu/MDVA-369/
    BASE PATH: dev/kmuntianu/MDVA-369
    DB PARAM: kmuntianu@sparta-db
    DB NAME: kmuntianu_mdva369
    DB PASSWORD: 
    MAGE MODE: dev
    BACKEND FRONTNAME: admin
    ADMIN NAME: admin
    ADMIN PASSWORD: 123123q
    ADMIN FIRSTNAME: Admin
    ADMIN LASTNAME: Test
    ADMIN EMAIL: [email protected]
    TIMEZONE: America/Chicago
    LANGUAGE: en_US
    CURRENCY: USD
    Sample Data will NOT be installed.
    Magento EE will be installed
    Confirm That the Entered Data Is Correct? (y/N)
    
    bug 
    opened by katmoon 2
  • Need to add one more grep -v to exclude another error message from th…

    Need to add one more grep -v to exclude another error message from th…

    …e mysql dump file

    We started to see the m2install failed due to below error messages

    pv "./php74.database.sql.gz" | gunzip -cf | gunzip -cf | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/'
    | sed -e 's/TRIGGER[ ][`][A-Za-z0-9_]*[`][.]/TRIGGER /'
    | sed -e 's/AFTER[ ]\(INSERT\)\{0,1\}\(UPDATE\)\{0,1\}\(DELETE\)\{0,1\}[ ]ON[ ][`][A-Za-z0-9_]*[`][.]/AFTER \1\2\3 ON /'
    | grep -v 'mysqldump: Couldn.t find table' | grep -v 'Warning: Using a password'
    | mysql -hdb.us-west-2.prd.sparta.ceng.magento.com -uhawi --password="Uz5AXJZWMF3TF_34" --force hawi_492563
    ERROR at line 616782: Unknown command '\"'.======================================================================================> ] 64% ETA 0:02:10
    ERROR at line 616782: Unknown command '\"'.
    

    This was because the below error was seen in the actual line (616782 in above example):

    mysqldump: Couldn't execute 'SHOW FIELDS FROM `inventory_stock_1`': View 'shortys.inventory_stock_1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them (1356)
    

    So "grep -v 'mysqldump: Couldn.t execute'" should address it.

    opened by biyoum 1
  • MDVA-41487: Disable SMTP related modules

    MDVA-41487: Disable SMTP related modules

    Added:

    generic function for disabling selected module after install generic function for disabling modules prior install (in app/etc/config.php file) as post original file overwrite function option to skip post original file overwrite actions

    opened by glo47154 1
  • The getTablePrefix() fails on 2.2.4 with the new array declaration

    The getTablePrefix() fails on 2.2.4 with the new array declaration

    Prior to 2.2.4 the table_prefix in the env.php ended with a coma:

        'table_prefix' => '',
    

    while the 2.2.4 wit the new array declaration don't require the coma anymore:

        'table_prefix' => ''
    

    This lead to the failure of configure_db step, because getTablePrefix() returns single quote character as the table prefix:

    $ grep table_prefix ee224/app/etc/env.php
        'table_prefix' => ''
    $ grep table_prefix ee224/app/etc/env.php | head -n1 | sed "s/[a-z'_ ]*[=][>][ ]*[']//" | sed "s/['][,]//"
    '
    

    The following function should be reworked:

    function getTablePrefix()
    {
        echo $(grep 'table_prefix' app/etc/env.php | head -n1 | sed "s/[a-z'_ ]*[=][>][ ]*[']//" | sed "s/['][,]//")
        return 0;
    }
    
    opened by yyevgenii 1
  • Fix for a slash count for tar command caused by OSX wc output formatting

    Fix for a slash count for tar command caused by OSX wc output formatting

    In current implementation on OS X tar -tf "$1" | grep -v vendor | fgrep pub/index.php | sed 's/pub[/]index[.]php//' | sort | head -1 | tr -cd '/' | wc -c would produce a wrong resulting command because of wc output formatting tar --strip-components= 1 -xf ./......

    opened by aabumuslimov 1
  • If DB dumps have primary key as zero we get empty table

    If DB dumps have primary key as zero we get empty table

    One of the solution use SQL MODE sql_mode=NO_AUTO_VALUE_ON_ZERO

    • It shouldn't override all sql modes
    • It should be per session

    Some solutions:

    • SET @@sql_mode = CONCAT(@@sql_mode, ',', 'NO_AUTO_VALUE_ON_ZERO');
    • Open up a session using expect and push data into the expect statement
    • mysql -u root "password" "database-name" < cat set_sql_mode.sql merchant_file.sql
    • { echo "SET MODE"; gunzip -cf DBDUMP.sql.gz | gunzip -cf; } | sed -e 's/DEFINER[ ]=[ ][^*]**/*/' | less -S
    • { echo "#SET MODE"; pv DBDUMP.sql.gz | gunzip -cf | gunzip -cf; } | sed -e 's/DEFINER[ ]=[ ][^*]**/*/' | mysql -uroot -p root_c -hdb
    • CMD="${CMD}
      | gunzip -cf | sed -e '1iSET @@session.sql_mode = CONCAT(@@session.sql_mode,,, NO_AUTO_VALUE_ON_ZERO);' | sed -e 's/DEFINER[ ]=[ ][^*]**/*/' | ........

    Mysqldump adds next headers:

    --MySQL dump 10.13  Distrib 5.5.54, for debian-linux-gnu (x86_64)
    --
    -- Host: example.host    Database: magento_prod
    -- ------------------------------------------------------
    -- Server version       5.6.27-log
    
    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
    /*!40103 SET TIME_ZONE='+00:00' */;
    /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
    /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
    /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
    /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
    
    enhancement help wanted 
    opened by yvoronoy 1
  • Can't install Magento 2 from GIT if version is a branch name

    Can't install Magento 2 from GIT if version is a branch name

    Faced with an issue, that you can't install Magento 2 from GIT if set version as a branch. For example: v2.4.2-p1.

    Run command: m2install.sh -s git -v v2.4.2-p1 --es-port 9207 --es-host magento2elastic7

    Error on installing stage:

    Running schema recurring...
    [Progress: 416 / 842]
    Module 'Magento_WishlistAnalytics':
    [Progress: 417 / 842]
    Module 'Magento_WishlistGraphQl':
    [Progress: 418 / 842]
    [Progress: 419 / 842]
    Installing search configuration...
    
    In SearchConfig.php line 81:
    
      Could not validate a connection to Elasticsearch. No alive nodes found in your cluster
    
    
    setup:install [--remote-storage-driver REMOTE-STORAGE-DRIVER] [--remote-storage-prefix REMOTE-STORAGE-PREFIX] [--remote-storage-bucket REMOTE-STORAGE-BUCKET] [--remote-storage-region REMOTE-STORAGE-REGION] [--remote-storage-key REMOTE-STORAGE-KEY] [--remote-storage-secret REMOTE-STORAGE-SECRET] [--consumers-wait-for-messages CONSUMERS-WAIT-FOR-MESSAGES] [--backend-frontname BACKEND-FRONTNAME] [--enable-debug-logging ENABLE-DEBUG-LOGGING] [--enable-syslog-logging ENABLE-SYSLOG-LOGGING] [--amqp-host AMQP-HOST] [--amqp-port AMQP-PORT] [--amqp-user AMQP-USER] [--amqp-password AMQP-PASSWORD] [--amqp-virtualhost AMQP-VIRTUALHOST] [--amqp-ssl AMQP-SSL] [--amqp-ssl-options AMQP-SSL-OPTIONS] [--key KEY] [--db-host DB-HOST] [--db-name DB-NAME] [--db-user DB-USER] [--db-engine DB-ENGINE] [--db-password DB-PASSWORD] [--db-prefix DB-PREFIX] [--db-model DB-MODEL] [--db-init-statements DB-INIT-STATEMENTS] [-s|--skip-db-validation] [--http-cache-hosts HTTP-CACHE-HOSTS] [--db-ssl-key DB-SSL-KEY] [--db-ssl-cert DB-SSL-CERT] [--db-ssl-ca DB-SSL-CA] [--db-ssl-verify] [--session-save SESSION-SAVE] [--session-save-redis-host SESSION-SAVE-REDIS-HOST] [--session-save-redis-port SESSION-SAVE-REDIS-PORT] [--session-save-redis-password SESSION-SAVE-REDIS-PASSWORD] [--session-save-redis-timeout SESSION-SAVE-REDIS-TIMEOUT] [--session-save-redis-persistent-id SESSION-SAVE-REDIS-PERSISTENT-ID] [--session-save-redis-db SESSION-SAVE-REDIS-DB] [--session-save-redis-compression-threshold SESSION-SAVE-REDIS-COMPRESSION-THRESHOLD] [--session-save-redis-compression-lib SESSION-SAVE-REDIS-COMPRESSION-LIB] [--session-save-redis-log-level SESSION-SAVE-REDIS-LOG-LEVEL] [--session-save-redis-max-concurrency SESSION-SAVE-REDIS-MAX-CONCURRENCY] [--session-save-redis-break-after-frontend SESSION-SAVE-REDIS-BREAK-AFTER-FRONTEND] [--session-save-redis-break-after-adminhtml SESSION-SAVE-REDIS-BREAK-AFTER-ADMINHTML] [--session-save-redis-first-lifetime SESSION-SAVE-REDIS-FIRST-LIFETIME] [--session-save-redis-bot-first-lifetime SESSION-SAVE-REDIS-BOT-FIRST-LIFETIME] [--session-save-redis-bot-lifetime SESSION-SAVE-REDIS-BOT-LIFETIME] [--session-save-redis-disable-locking SESSION-SAVE-REDIS-DISABLE-LOCKING] [--session-save-redis-min-lifetime SESSION-SAVE-REDIS-MIN-LIFETIME] [--session-save-redis-max-lifetime SESSION-SAVE-REDIS-MAX-LIFETIME] [--session-save-redis-sentinel-master SESSION-SAVE-REDIS-SENTINEL-MASTER] [--session-save-redis-sentinel-servers SESSION-SAVE-REDIS-SENTINEL-SERVERS] [--session-save-redis-sentinel-verify-master SESSION-SAVE-REDIS-SENTINEL-VERIFY-MASTER] [--session-save-redis-sentinel-connect-retries SESSION-SAVE-REDIS-SENTINEL-CONNECT-RETRIES] [--cache-backend CACHE-BACKEND] [--cache-backend-redis-server CACHE-BACKEND-REDIS-SERVER] [--cache-backend-redis-db CACHE-BACKEND-REDIS-DB] [--cache-backend-redis-port CACHE-BACKEND-REDIS-PORT] [--cache-backend-redis-password CACHE-BACKEND-REDIS-PASSWORD] [--cache-backend-redis-compress-data CACHE-BACKEND-REDIS-COMPRESS-DATA] [--cache-backend-redis-compression-lib CACHE-BACKEND-REDIS-COMPRESSION-LIB] [--cache-id-prefix CACHE-ID-PREFIX] [--allow-parallel-generation] [--page-cache PAGE-CACHE] [--page-cache-redis-server PAGE-CACHE-REDIS-SERVER] [--page-cache-redis-db PAGE-CACHE-REDIS-DB] [--page-cache-redis-port PAGE-CACHE-REDIS-PORT] [--page-cache-redis-password PAGE-CACHE-REDIS-PASSWORD] [--page-cache-redis-compress-data PAGE-CACHE-REDIS-COMPRESS-DATA] [--page-cache-redis-compression-lib PAGE-CACHE-REDIS-COMPRESSION-LIB] [--page-cache-id-prefix PAGE-CACHE-ID-PREFIX] [--lock-provider LOCK-PROVIDER] [--lock-db-prefix LOCK-DB-PREFIX] [--lock-zookeeper-host LOCK-ZOOKEEPER-HOST] [--lock-zookeeper-path LOCK-ZOOKEEPER-PATH] [--lock-file-path LOCK-FILE-PATH] [--document-root-is-pub DOCUMENT-ROOT-IS-PUB] [--base-url BASE-URL] [--language LANGUAGE] [--timezone TIMEZONE] [--currency CURRENCY] [--use-rewrites USE-REWRITES] [--use-secure USE-SECURE] [--base-url-secure BASE-URL-SECURE] [--use-secure-admin USE-SECURE-ADMIN] [--admin-use-security-key ADMIN-USE-SECURITY-KEY] [--admin-user [ADMIN-USER]] [--admin-password [ADMIN-PASSWORD]] [--admin-email [ADMIN-EMAIL]] [--admin-firstname [ADMIN-FIRSTNAME]] [--admin-lastname [ADMIN-LASTNAME]] [--search-engine SEARCH-ENGINE] [--elasticsearch-host ELASTICSEARCH-HOST] [--elasticsearch-port ELASTICSEARCH-PORT] [--elasticsearch-enable-auth ELASTICSEARCH-ENABLE-AUTH] [--elasticsearch-username ELASTICSEARCH-USERNAME] [--elasticsearch-password ELASTICSEARCH-PASSWORD] [--elasticsearch-index-prefix ELASTICSEARCH-INDEX-PREFIX] [--elasticsearch-timeout ELASTICSEARCH-TIMEOUT] [--cleanup-database] [--sales-order-increment-prefix SALES-ORDER-INCREMENT-PREFIX] [--use-sample-data] [--enable-modules [ENABLE-MODULES]] [--disable-modules [DISABLE-MODULES]] [--convert-old-scripts [CONVERT-OLD-SCRIPTS]] [-i|--interactive] [--safe-mode [SAFE-MODE]] [--data-restore [DATA-RESTORE]] [--dry-run [DRY-RUN]] [--magento-init-params MAGENTO-INIT-PARAMS]
    
    => afterInstall
    

    Looks like caused by incorrect conditions here:

    ...
        CMD="${BIN_PHP} ${BIN_MAGE} setup:install \
        --base-url=${BASE_URL} \
        --db-host=${DB_HOST} \
        --db-name=${DB_NAME} \
        --db-user=${DB_USER} \
        --admin-firstname=${ADMIN_FIRSTNAME} \
        --admin-lastname=${ADMIN_LASTNAME} \
        --admin-email=${ADMIN_EMAIL} \
        --admin-user=${ADMIN_NAME} \
        --admin-password=${ADMIN_PASSWORD} \
        --language=${LANGUAGE} \
        --currency=${CURRENCY} \
        --timezone=${TIMEZONE} \
        --use-rewrites=1 \
        --backend-frontname=${BACKEND_FRONTNAME}"
        if [ "${DB_PASSWORD}" ]; then
            CMD="${CMD} --db-password=${DB_PASSWORD}"
        fi
        if isElasticSearchRequired && isElasticSearchConfigIsAvailable
        then
                local searchEngine="$(getRecommendedSearchEngineForVersion)"
                CMD="${CMD} --search-engine=$searchEngine --elasticsearch-host=$(getESConfigHost $searchEngine) --elasticsearch-port=$(getESConfigPort $searchEngine) --elasticsearch-index-prefix=${DB_NAME}"
        fi
        runCommand
    }
    
    function isElasticSearchRequired()
    {
      checkIfBasedOnDevelopBranch && return 0
      versionIsHigherThan "$(getMagentoVersion)" "2.4" && return 0
      return 255
    }
    
    function isElasticSearchConfigIsAvailable()
    {
      [[ "$ELASTICSEARCH_HOST" ]] && [[ "$ELASTICSEARCH_PORT" ]] && return 0
      local searchEngine="$1"
      if [[ ! "$searchEngine" ]]
      then
        searchEngine="$(getRecommendedSearchEngineForVersion)"
      fi
      local eshost=$(getESConfigHost "$searchEngine")
      local esport=$(getESConfigPort "$searchEngine")
      [[ "$eshost" ]] && [[ "$esport" ]] && return 0
      return 255
    }
    
    opened by isitnikov 0
  • Force disable admin password reset

    Force disable admin password reset

    INSERT INTO `core_config_data` (`config_id`, `scope`, `scope_id`, `path`, `value`) VALUES (NULL, 'default', '0', 'admin/security/password_is_forced', '0') ON DUPLICATE KEY UPDATE `value` = 0;
    
    opened by yvoronoy 0
  • The updateMagentoEnvFile() generates an empty env.php file

    The updateMagentoEnvFile() generates an empty env.php file

    There's a bug in the updateMagentoEnvFile(). It generates and executed a PHP code which throws the error:

    PHP Warning:  Class 'Tightenco\Collect\Support\Arr' not found in vendor/tightenco/collect/src/Collect/Support/alias.php on line 16
    PHP Parse error:  syntax error, unexpected '=' in vendor/tightenco/collect/src/Collect/Support/Arr.php on line 388
    

    As a result a generated env.php is empty.

    opened by yyevgenii 1
  • Add functionality to generate own directory for each website

    Add functionality to generate own directory for each website

    • Create directory "websites"
    • Create subdirectory for each website
      • websites/website-code/
      • Create in entry point "websites/website-code/index.php"
      • Modify entry point and set website code
    enhancement 
    opened by yvoronoy 0
Releases(1.0.4)
  • 1.0.2(Nov 10, 2016)

  • 1.0.1(Jun 14, 2016)

  • 1.0.0(Feb 11, 2016)

    Enhancement

    • #35 Update version
    • #31 Script should able restore backups created by bin/magento setup:backup
    • #28 Implement install sample data for M2 beta
    • #38 Display executed SQL Queries while restoring
    • #27 Add possibility skip static content generation enhancement
    • #26 Add possibility to skip DI Compilation
    • #24 Add possibility choose magento version trough arguments
    • #23 Add a possibility install sample data by arguments
    • #22 Add a possibility to choose CE or EE edition through arguments
    • #21 Change file permission to 2777 instead 0777 to var media folders

    Fixed Bugs

    • #33 Issue with warning in DB dump
    • #30 Restore magento support dumps with prefixes
    • #29 Restore admin password doesn't work when admin already exists
    • #25 Install with --force params rewrite config file
    • #20 Sample Data doesn't install on community edition
    Source code(tar.gz)
    Source code(zip)
  • v0.1.9-beta(Jan 8, 2016)

    Fixed bugs and improvements

    • #11 Wizzard doesn't working correctly without BASE_PATH
    • #12 Wizzard regenerates DB NAME
    • #13 Script is asking EE PATH, should prompt Default EE Path
    • #14 When source git or composer and current directory not empty show error
    • #15 While restoring support dumps restore original .htaccess file
    • #16 Prompt override config file if entered values different
    • #17 Add params --force to force install without any questions or wizzard
    • #18 While restoring dumps update table prefix, crypt key, install date
    • #19 While restore support dumps wizard shouldn't prompt install sample data or EE
    Source code(tar.gz)
    Source code(zip)
  • v0.1.8-beta(Jan 5, 2016)

  • v0.1.7-beta(Jan 4, 2016)

  • v0.1.6-beta(Dec 8, 2015)

  • v0.1.5-beta(Dec 5, 2015)

  • v0.1.1-beta(Dec 4, 2015)

Owner
Yarik Voronoy
Magento
Yarik Voronoy
Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Strategery 123 Nov 20, 2021
Install an execute script of specify quality tools to your git pre-commit hook, and it executes only for changed files

Quality Hook Installer Install an execute script of specify quality tools to your git pre-commit hook, and it executes only for changed files Install

Kay W. 2 Dec 15, 2022
A tool that allows to quickly export data from Magento 1 and Magento 2 store and import it back into Magento 2

Simple Import / Export tool A tool that allows to quickly export data from Magento 1 and Magento 2 store and import it back into Magento 2. Table data

EcomDev B.V. 51 Dec 5, 2022
A highly compressed version of the magento 1.9 sample data and a script to create it.

Compressed Magento 1.9 Sample Data The following variations are available: 65M compressed-magento-sample-data-1.9.2.4.tgz 64M compressed-magento-sampl

Vinai Kopp 120 Sep 9, 2022
A simple shell script which loads a magento environment

A simple shell script to load up a Magento environment and execute PHP code Very experimental and should only be ran on dev servers REQUIRES php pcntl

beeplogic 28 Feb 4, 2022
Helper script to aid upgrading magento 2 websites by detecting overrides. Now supports third party module detections

ampersand-magento2-upgrade-patch-helper Helper scripts to aid upgrading magento 2 websites, or when upgrading a magento module This tool looks for fil

Ampersand 242 Dec 18, 2022
Phalcon 3.x BB Debugger Strong and easy install.

Phalcon BB Debugger Phalcon Version: 3.x BB Debugger Version: 1.0.3 Change Log See ChangeLog What is BB Debugger ? The bb debugger, written for the ph

İsmail 6 Oct 7, 2022
Easily install PHP extension in Docker containers

Easy installation of PHP extensions in official PHP Docker images This repository contains a script that can be used to easily install a PHP extension

Michele Locati 2.8k Jan 4, 2023
An installer package that let's you install NodeJS and NPM as a Composer dependency.

NodeJS installer for Composer This is an installer that will download NodeJS and NPM and install them in your Composer dependencies. Installation is s

TheCodingMachine 106 Sep 30, 2022
A composer plugin, to install differenty types of composer packages in custom directories outside the default composer default installation path which is in the vendor folder.

composer-custom-directory-installer A composer plugin, to install differenty types of composer packages in custom directories outside the default comp

Mina Nabil Sami 136 Dec 30, 2022
This module adds a command to easily generate "modules" in Laravel and install them using composer.

Laravel Module Create This module adds a command to easily generate "modules" in Laravel and install them using composer Installation Simply install t

null 2 Feb 18, 2022
Helper plugin to install SilverStripe recipes

SilverStripe recipe-plugin Introduction This plugin enhances composer and allows for the installation of "silverstripe-recipe" packages. These recipes

Silverstripe CMS 10 Oct 4, 2022
Install a brand new, shiny website.

Deutsch English Svenska Install 0.8.76 Install a brand new, shiny website. How to install a website Installing is unzipping one file and you are ready

Anna 2 Nov 4, 2022
This Magento 2 extension integrates EasyTranslate into Magento 2.

EasyTranslate Magento 2 Connector This Magento 2 extension integrates EasyTranslate into Magento 2. Mind that you need to have an account with EasyTra

Easytranslate ApS 0 Oct 7, 2022
Magento-Functions - A Resource of Magento Functions

Magento-Functions A Resource of Magento Functions Table of Contents Category Product User Cart Checkout General Account [Working w/ URL's] (#urls) Cat

Bryan Littlefield 28 Apr 19, 2021
Magento - Magento Community Editions

Magento Community Edition /// THIS REPOSITORY IS DEPREACTED /// 1.9.4.1 will be the last version update. Please switch over to OpenMage! Either to the

FireGento e. V. 107 Oct 17, 2022
Magento-Vagrant-Puppet-Nginx - Installs magento and a nginx server

Magento-Vagrant-Puppet-Nginx Installs Magento MySQL PHP PHP-FPM Nginx n98-magerun Setup git submodule init git submodule update vagrant up Modify pupp

Christian Münch 61 Aug 10, 2022