yvoronoy / m2install Goto Github PK
View Code? Open in Web Editor NEWMagento 2 Bash Install/Restore Script
Home Page: http://magento.com/
License: GNU General Public License v2.0
Magento 2 Bash Install/Restore Script
Home Page: http://magento.com/
License: GNU General Public License v2.0
Script should works correctly when for base urls like:
site1.com
site2.com
site3.com
Because at now it works correctly only in case when you deploy magento in subfolders
site1.com/instance1
site2.com/instance2
Composer should EE directly without downloading CE and then EE.
Script should prompt resave (override) existent config if you entered different values
Set file permissions
If code dump don't compressed from current directory
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!!!
Change file permission to 2777 instead 0777 to var media folders
When you run script with params --source git or composer we should check current directory and if it doesn't empty show error message.
Because there is no installed wget by default on Mac Os
Throw error when select install EE but path doesn't exists
Restore magento support dumps with prefixes
Sample Data doesn't install on community edition
Display executed SQL Queries while restoring
Magento EE generates and grab information about Foreign Keys.
Script should check required tools and throw error if there is no required tools:
Add a possibility to choose CE or EE edition through arguments
Code dump created by scheduled backup doesn't included pub/static.php file
While restore support dumps wizard shouldn't prompt install sample data or EE
m2install.sh --code-dump code.dump.filename.tar.gz --db-dump db.dump.sql.gz
Update version
Wizzard regenerates DBNAME every time when wizzard shows.
Wizzard should takes previous entered DBNAME
Wizzard should works correctly without BASE PATH for example http://mage2.dev/
HTTP_HOST=http://mage2.dev/
BASE_PATH=/$CURRENT_DIR_NAME
DB_HOST=localhost
DB_USER=m
DB_PASSWORD=
COMPOSER_VERSION=2.0.0
MAGENTO_EE_PATH=./magento2ee
GIT_CE_REPO=[email protected]:magento/magento2.git
GIT_EE_REPO=[email protected]:path-to-ee-repo.git
GIT_BRANCH=2.0
Issue depends from magento/magento2#2915
and it has been fixed internally but still didn't include in release
So while restore backup files we should rename it.
Add params --force to force install without any questions or wizzard
Since bin/magento support::backup::code doesn't backup .htaccess we should restore original .htaccess file
While restoring dumps update table prefix, crypt key, install date
Magento has backup functionality for code, db and media.
M2Install script should able to restore these backups
at now script shows
Please wait Code dump start extract - OK
but should write what exactly command is executed:
gunzip -c code.dump.tar.gz | gunzip -cf | tar -x
Reset password doesn't work if username admin exists and email is different
Install with --force params rewrite config file
Implement --step params and add ability run partial step:
Examples:
Use Cases
Imagine you restore DB dump manually and you will need update DB configuration.
You restore code & DB dumps and then you will have changed the code, you will need restore code dump without DB.
Issue caused because there is no .htaccess file in pub/static folder
You can specify paths to --code-dump and --db-dump
m2install.sh --code-dump c6f70277cd3e3b773e787b3c.zip --db-dump c6f70277cd3e3b773e787b3c14.sql.gz
Use filename like db_dump (1).sql.gz
Try to restore.
Actual result: m2install.sh: eval: line 124: syntax error near unexpected token `('
DB is empty
Script is asking EE PATH, should prompt Default EE Path
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.