-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from zepgram/develop
Develop
- Loading branch information
Showing
12 changed files
with
232 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
/.vagrant | ||
/.idea | ||
/.DS_Store | ||
/ssh | ||
/www | ||
/vagrant-ssh | ||
/config.yaml | ||
/.DS_Store | ||
/extra/001-env.sh | ||
/extra/100-pre-build.sh | ||
/extra/120-post-build.sh | ||
/extra/120-post-build.sh | ||
/db-dump.sql.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
[![vagrant](https://img.shields.io/badge/vagrant-debian:stretch-blue.svg?longCache=true&style=flat&label=vagrant&logo=vagrant)](https://app.vagrantup.com/debian/boxes/stretch64) | ||
[![dev-box](https://img.shields.io/badge/git/composer-blue.svg?longCache=true&style=flat&label=setup&logo=magento)](https://github.com/zepgram/magento2-fast-vm/blob/master/config.yaml.example) | ||
[![mount](https://img.shields.io/badge/nfs/rsync-blue.svg?longCache=true&style=flat&label=mount)](https://github.com/zepgram/magento2-fast-vm/releases) | ||
[![release](https://img.shields.io/badge/release-v1.2.0-blue.svg?longCache=true&style=flat&label=release)](https://github.com/zepgram/magento2-fast-vm/releases) | ||
[![release](https://img.shields.io/badge/release-v1.3.0-blue.svg?longCache=true&style=flat&label=release)](https://github.com/zepgram/magento2-fast-vm/releases) | ||
[![license](https://img.shields.io/badge/license-MIT-blue.svg?longCache=true&style=flat&label=license)](https://github.com/zepgram/magento2-fast-vm/blob/master/LICENSE) | ||
|
||
![windows](https://img.shields.io/badge/windows-ok-green.svg?longCache=true&style=flat&label=windows&logo=windows) | ||
|
@@ -23,7 +23,7 @@ Stable version >= 5.2.0 | |
1. Run the installer, choosing all of the default options. | ||
* Windows: Grant the installer access every time you receive a security prompt. | ||
* Mac: Enter your admin password. | ||
* Linux: Enter your root password if prompted. | ||
* Linux: Enter your user password if prompted. | ||
1. Reboot your laptop if prompted to do so when installation completes. | ||
1. Close the VirtualBox window if it pops up at the end of the install. | ||
|
||
|
@@ -35,26 +35,30 @@ Stable version >= 2.2.0 | |
* [Vagrant download](https://www.vagrantup.com/downloads.html) | ||
1. Reboot your laptop if prompted to do so when installation completes. | ||
|
||
## Installation | ||
## Configurations | ||
|
||
### Related guide | ||
- Made by Onilab for Windows 10: | ||
- Made by Onilab for Windows 10:<br> | ||
https://onilab.com/blog/install-magento-2-on-localhost-a-windows-10-guide/ | ||
|
||
### First installation | ||
### Pre-installation | ||
|
||
⚠ DO NOT USE SSH KEY WITH PASSPHRASE, this vagrant installation is non-interactive.<br> | ||
If your ssh key has been created with a passphrase, please create an other one and add it to your git account. | ||
If your ssh key has been created with a passphrase, please create an other one. | ||
1. On Windows only: open UEFI BIOS and make sure virtualization is turned 'on' | ||
1. On Windows only: open powershell as administrator and run: ``Add-MpPreference -ExclusionProcess winnfsd.exe`` | ||
1. On Windows only: open ``C:\Windows\System32\drivers\etc\hosts`` as administrator then add ``network_ip`` and ``magento_url``<br>Default values would be: ``192.168.200.50 dev.magento.com`` | ||
1. On Linux only: in order to install NFS, run ``sudo apt install nfs-kernel-server`` | ||
1. On Linux/MacOS only: open ``/etc/hosts`` as sudo then add ``network_ip`` and ``magento_url``<br>Default values would be: ``192.168.200.50 dev.magento.com`` | ||
|
||
### Installation | ||
|
||
1. Clone this project: ``git clone [email protected]:zepgram/magento2-fast-vm.git`` | ||
1. On linux only in order to install NFS, run: ``sudo apt install nfs-kernel-server`` | ||
1. On windows only, make sur virtualization is turned 'on' in UEFI BIOS | ||
1. Copy and past ``ssh.example``, rename it ``ssh`` and put your ``id_rsa`` and ``id_rsa.pub`` keys | ||
1. Copy and past ``config.yaml.example``, rename it ``config.yaml`` and add your configurations according to [Yaml config overview](#yaml-config-overview) | ||
1. As admin open your host file: ``C:\Windows\System32\drivers\etc\hosts`` for Windows or ``/etc/hosts``for Linux/macOS and add vm_conf[network_ip] and magento[url]<br> | ||
Default values would be: ``192.168.200.50 dev.magento.com`` | ||
1. On windows 10 start your terminal as administrator and uncomment option ``# v.gui=true`` in VagrantFile. You can disable it after first setup | ||
1. Run: ``vagrant up`` in your terminal: setup start! (duration: ~20 minutes) | ||
1. Once installation is done run: ``vagrant ssh`` to access to your guest machine | ||
1. Copy/past: ``ssh.example`` rename it ``ssh`` then put your ``id_rsa`` and ``id_rsa.pub`` keys | ||
1. Copy/past: ``config.yaml.example`` rename it ``config.yaml``<br>Then customize configurations according to [Yaml config overview](#yaml-config-overview) | ||
1. If you want to import an existing database: create a compressed sql dump and name it ``db-dump.sql.gz``.<br>You must also fill ``crypt_key`` in config.yaml | ||
1. To start install run: ``vagrant up`` (duration: ~20 minutes) | ||
1. Finally run: ``vagrant ssh`` to access to your guest machine | ||
|
||
### Yaml config overview | ||
* Vmconf | ||
|
@@ -88,13 +92,14 @@ Default values would be: ``192.168.200.50 dev.magento.com`` | |
* edition: magento project edition, used only on composer source installation (community) | ||
* 'community' install magento community edition | ||
* 'enterprise' install magento enterprise edition | ||
* version: set magento version and also define PHP version (2.3.*) | ||
* version: set magento version and also define PHP version (2.3.3) | ||
* php_version: override the default required version by yours, for example '7.1' (default) | ||
* sample: install sample data, used only on composer source installation (true) | ||
* mode: magento mode (developer) | ||
* currency: set currency (USD) | ||
* language: set language (en_US) | ||
* time_zone: set time zone (Europe/London) | ||
* crypt_key: crypt key under your app/etc/env.php (only required if db-dump.sql.gz exist) | ||
|
||
|
||
### Path | ||
|
@@ -103,8 +108,8 @@ Default values would be: ``192.168.200.50 dev.magento.com`` | |
|
||
### Mount options | ||
|
||
#### RSYNC - new (v1.2.0) | ||
Only usefull on path set to ``root``.<br> | ||
#### RSYNC | ||
Only useful on path set to ``root``.<br> | ||
* Loss of performance is due to files generated on the fly, by excluding them you can mount the whole directory ``root`` and get performance equal to an ``app`` mount. | ||
* The ``vagrant rsync-auto`` is launched by default on vagrant up, even with that if you need to force an update you can run ``vagrant rsync``. <b>Terminal should be kept open for rsync-auto: do not close it.</b> | ||
* Rsync is unilateral, your host machine push files to guest but not the other way.<br> | ||
|
@@ -135,13 +140,9 @@ Those provisions will be executed on pre-defined sequences: | |
## Usage | ||
|
||
### Permission | ||
Magento file system owner is configured for ``magento`` user, it means all commands in magento project must be executed by this user.<br> | ||
By default command line ``vagrant ssh`` will log you as magento user.<br> | ||
* To logout and get back to vagrant user you can run ``exit`` | ||
* To login as magento user you can run ``sudo su magento`` or ``bash`` | ||
* To re-apply magento permission you can run ``permission`` in command line, used only for ``app`` path and ``default`` mount. | ||
|
||
<b>FI: Password for magento user is ``magento``</b> | ||
Magento file system owner is configured for ``vagrant`` user, it means all commands in magento project must be executed by this user.<br> | ||
By default command line ``vagrant ssh`` will log you as vagrant user.<br> | ||
* To re-apply magento permission you can run ``permission`` in command line: this is only applicable for ``app`` path or ``default`` mount configurations. | ||
|
||
### Command line | ||
* magento (Magento CLI for your project) | ||
|
@@ -170,7 +171,8 @@ Disable cron: | |
- gitflow | ||
- vim | ||
- mariadb | ||
- apache2 | ||
- nginx | ||
- php-fpm | ||
- redis-server | ||
- composer | ||
- magento-cloud CLI | ||
|
@@ -184,11 +186,10 @@ Disable cron: | |
|
||
### Credentials | ||
* User bash terminal | ||
* user: magento | ||
* password: magento | ||
* user: vagrant | ||
* Back-office | ||
* url: magento[url]/admin | ||
* user: admin | ||
* user: magento.admin | ||
* pass: admin123 | ||
* Database | ||
* user: vagrant | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.