Skip to content

Commit 2a8ab98

Browse files
author
Benjamin Calef
committed
[v1.5.0] update for magento v2.4.4
1 parent 18458a7 commit 2a8ab98

File tree

6 files changed

+65
-63
lines changed

6 files changed

+65
-63
lines changed

README.md

Lines changed: 50 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
11
# Fast Virtual Machine for Magento2
22

3-
[![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)
4-
[![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)
5-
[![mount](https://img.shields.io/badge/nfs/rsync-blue.svg?longCache=true&style=flat&label=mount)](https://github.com/zepgram/magento2-fast-vm/releases)
6-
[![release](https://img.shields.io/badge/release-v1.4.2-blue.svg?longCache=true&style=flat&label=release)](https://github.com/zepgram/magento2-fast-vm/releases)
7-
[![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)
3+
[![vagrant](https://img.shields.io/badge/vagrant-debian:stretch-blue.svg?longCache=true&style=flat-square&label=vagrant&logo=vagrant)](https://app.vagrantup.com/debian/boxes/stretch64)
4+
[![install-git](https://img.shields.io/badge/git-blue.svg?longCache=true&style=flat-square&label=setup&logo=git)](https://github.com/zepgram/magento2-fast-vm/blob/master/config.yaml.example)
5+
[![install-composer](https://img.shields.io/badge/composer-blue.svg?longCache=true&style=flat-square&label=setup&logo=composer)](https://github.com/zepgram/magento2-fast-vm/blob/master/config.yaml.example)
6+
[![mount](https://img.shields.io/badge/nfs/rsync-blue.svg?longCache=true&style=flat-square&label=mount)](https://github.com/zepgram/magento2-fast-vm/releases)
7+
[![release](https://img.shields.io/github/v/release/zepgram/magento2-fast-vm?longCache=true&style=flat-square)](https://github.com/zepgram/magento2-fast-vm/releases)
8+
[![license](https://img.shields.io/github/license/zepgram/magento2-fast-vm?longCache=true&style=flat-square)](https://github.com/zepgram/magento2-fast-vm/blob/master/LICENSE)
89

9-
![windows](https://img.shields.io/badge/windows-ok-green.svg?longCache=true&style=flat&label=windows&logo=windows)
10-
![apple](https://img.shields.io/badge/mac-ok-green.svg?longCache=true&style=flat&label=mac&logo=apple)
11-
![linux](https://img.shields.io/badge/linux-ok-green.svg?longCache=true&style=flat&label=linux&logo=linux)
10+
![windows](https://img.shields.io/badge/windows-ok-green.svg?longCache=true&style=flat-square&label=windows&logo=windows)
11+
![apple](https://img.shields.io/badge/mac-ok-green.svg?longCache=true&style=flat-square&label=mac&logo=apple)
12+
![linux](https://img.shields.io/badge/linux-ok-green.svg?longCache=true&style=flat-square&label=linux&logo=linux)
1213

1314
![image](https://user-images.githubusercontent.com/16258478/68086496-0d43e100-fe4d-11e9-95ea-2bce3bee9884.png)    ![image](https://user-images.githubusercontent.com/16258478/68086436-70814380-fe4c-11e9-8ef4-6e39388cc679.png)    ![image](https://user-images.githubusercontent.com/16258478/68086442-7545f780-fe4c-11e9-8c5e-518ddba8735d.png)    ![image](https://user-images.githubusercontent.com/16258478/68086695-ba6b2900-fe4e-11e9-8f4f-68feb9bb0db2.png)    ![image](https://user-images.githubusercontent.com/16258478/68086427-62cbbe00-fe4c-11e9-83d5-24aec5b7c686.png)
1415

1516
[![associate-developer](https://user-images.githubusercontent.com/16258478/121844932-02b62280-cce5-11eb-8351-726bbe9eed80.png)](https://www.youracclaim.com/badges/406cc91a-0fda-4a6f-846b-19d7f8b59e0a/public_url)
1617

18+
Major version currently supported:<br>
19+
[![v2.1.*](https://img.shields.io/badge/v2.1-grey.svg?longCache=true&style=flat-square&logo=magento)](https://github.com/magento/magento2/tree/2.1)
20+
[![v2.2.*](https://img.shields.io/badge/v2.2-grey.svg?longCache=true&style=flat-square&logo=magento)](https://github.com/magento/magento2/tree/2.2)
21+
[![v2.3.*](https://img.shields.io/badge/v2.3-grey.svg?longCache=true&style=flat-square&logo=magento)](https://github.com/magento/magento2/tree/2.3)
22+
[![v2.4.*](https://img.shields.io/badge/v2.4-grey.svg?longCache=true&style=flat-square&logo=magento)](https://github.com/magento/magento2/tree/2.4)
23+
24+
Latest supported version:<br>
25+
[![v2.4.4](https://img.shields.io/badge/v2.4.4-grey.svg?longCache=true&style=flat-square&logo=magento)](https://github.com/magento/magento2/tree/2.4.4)
26+
1727
## Requirements
1828

1929
### Virtualbox
@@ -22,7 +32,7 @@ Stable version >= 5.2.0
2232

2333
1. Download the installer for your laptop operating system using the links below.
2434
* [VirtualBox download](https://www.virtualbox.org/wiki/Downloads)
25-
1. Run the installer, choosing all of the default options.
35+
1. Run the installer, choosing all the default options.
2636
* Windows: Grant the installer access every time you receive a security prompt.
2737
* Mac: Enter your admin password.
2838
* Linux: Enter your user password if prompted.
@@ -45,14 +55,15 @@ https://onilab.com/blog/install-magento-2-on-localhost-a-windows-10-guide/
4555

4656
### Pre-installation
4757

48-
&#9888; DO NOT USE SSH KEY WITH PASSPHRASE, this vagrant installation is non-interactive.<br>
49-
If your ssh key has been created with a passphrase, please create an other one.
50-
1. On Windows only: open UEFI BIOS and make sure virtualization is turned 'on'
51-
1. On Windows only: open powershell as administrator and run: ``Add-MpPreference -ExclusionProcess winnfsd.exe``
52-
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``
53-
1. On Linux only: in order to install NFS, run ``sudo apt install nfs-kernel-server``
54-
1. On MacOS only: to avoid issue with guest additions, run ``sudo apt install linux-headers-$(uname -r)``
55-
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``
58+
&#9888; This vagrant installation is non-interactive: DO NOT USE SSH KEY WITH PASSPHRASE.<br>
59+
If your ssh key has been created with a passphrase, please create another one.
60+
61+
System | Steps |
62+
|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
63+
| Windows | 1. Open UEFI BIOS and make sure virtualization is turned 'on'<br>2. Open powershell as administrator and run: ``Add-MpPreference -ExclusionProcess winnfsd.exe``<br>3. 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`` |
64+
| MacOs | 1. To avoid issue with guest additions, run:<br> ``sudo apt install linux-headers-$(uname -r)`` |
65+
| Linux | 1. To install NFS properly, run:<br> ``sudo apt install nfs-kernel-server``
66+
| Linux/MacOS | 2. Open ``/etc/hosts`` as sudo then add ``network_ip`` and ``magento_url``<br>Default values would be: ``192.168.200.50 dev.magento.com``
5667

5768
### Installation
5869

@@ -61,7 +72,7 @@ If your ssh key has been created with a passphrase, please create an other one.
6172
1. Copy/past: ``config.yaml.example`` rename it ``config.yaml``<br>Then customize configurations according to [Yaml config overview](#yaml-config-overview)
6273
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
6374
1. To start install run: ``vagrant up`` (duration: ~20 minutes)
64-
1. Finally run: ``vagrant ssh`` to access to your guest machine
75+
1. Finally, run: ``vagrant ssh`` to access guest machine
6576

6677
### Yaml config overview
6778
Parent Node | Name | Default Value | Allowed Value | Is optional | Description
@@ -83,7 +94,7 @@ Parent Node | Name | Default Value | Allowed Value | Is optional | Des
8394
| magento | url | dev.magento.com | url | no | Magento site host name
8495
| | source | composer | composer / (master/develop..) | no | Define source installation. On git install set the branch name to clone.
8596
| | edition | community | community / enterprise | no | Magento project edition
86-
| | version | 2.4.2 | >=2.2 | no | Magento version release
97+
| | version | 2.4.4 | >=2.2 | no | Magento version release
8798
| | php_version | default | default / 7.x | no | PHP version
8899
| | sample | true | true / false | no | Install sample data
89100
| | mode | developer | developer / production | no | Magento execution mode
@@ -129,7 +140,7 @@ Those provisions will be executed on pre-defined sequences:
129140
- To be executed you must remove the string `-example` from the filename script.
130141
- As an example of use, you can adapt data from your database import by using the script ``100-pre-build.sh``
131142

132-
## Usage
143+
## System usage
133144

134145
### Permission
135146
Magento file system owner is configured for ``vagrant`` user, it means all commands in magento project must be executed by this user.<br>
@@ -154,17 +165,6 @@ Disable cron:
154165
./bin/magento cron:remove
155166
```
156167

157-
### Mysql
158-
Percona server 8.0 is installed for version >= 2.4.0
159-
160-
### Elasticsearch
161-
Version 7.6.x of Elasticsearch is available for Magento.<br>
162-
If your Magento version is lower than 2.4 then version 6.x will be installed.<br>
163-
For version lower than 2.4, you can disable it and fall back to mysql:
164-
```
165-
./bin/magento config:set catalog/search/engine mysql
166-
```
167-
168168
## Configuration
169169

170170
### Package & Software
@@ -188,7 +188,7 @@ For version lower than 2.4, you can disable it and fall back to mysql:
188188
- magento-cloud cli
189189
- bin/magento bash completion
190190

191-
### Credentials
191+
### Access
192192
* User bash terminal
193193
* user: vagrant
194194
* Back-office
@@ -206,15 +206,29 @@ For version lower than 2.4, you can disable it and fall back to mysql:
206206
* Phpinfo
207207
* url: [network_ip]/php
208208

209+
### Mysql
210+
Percona server 8.0 is now installed for Magento >=2.4.0
211+
212+
### PHP
213+
PHP 8.1 is now installed by default for Magento >=2.4.4
214+
215+
### Composer
216+
Composer v2 is now installed by default for Magento >=2.4.2
217+
218+
### Elasticsearch
219+
Version 7.6.x of Elasticsearch is now available for Magento 2.4.0.<br>
220+
For lower Magento version, ES 6.x will be installed.<br>
221+
Otherwise, you can also completely disable elasticsearch by installing this module: https://github.com/zepgram/module-disable-search-engine
222+
209223
## Issues
210224

211225
### Windows 10
212226
There is a known [issue with composer installation](https://github.com/zepgram/magento2-fast-vm/issues/70) on windows 10.<br>
213227
This issue could not be solved yet, and has already been reported 2 times.<br>
214-
- It's related to the computer and BIOS configuration.
215-
- It's only with "nfs" setting for mount option.
228+
- This is related to the computer and BIOS configuration.
229+
- This is only reported on "NFS" mount option.
216230

217-
To solve this, just try to set mount option to "rsync", then after full installation you should be able to fallback to NFS.
231+
To solve this, I recommend to set mount option to "rsync", then after full installation you should be able to fall back to NFS.
218232

219233
### Others
220-
- If you have trouble during installation please open a new issue on this repository.
234+
If you have trouble during installation please open a new issue on this GitHub repository.

config.yaml.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ magento:
1919
url: 'dev.magento.com'
2020
source: 'composer'
2121
edition: 'community'
22-
version: '2.4.3'
22+
version: '2.4.4'
2323
php_version: 'default'
2424
sample: 'true'
2525
mode: 'developer'

provision/001-system-env.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ echo '--- Environment variables ---'
1313

1414
# Set php version
1515
PROJECT_VERSION=${12};
16-
PROJECT_PHP_VERSION='7.4';
16+
PROJECT_PHP_VERSION='8.1';
17+
if $(dpkg --compare-versions "${PROJECT_VERSION}" "lt" "2.4.4"); then
18+
PROJECT_PHP_VERSION='7.4';
19+
fi
1720
if $(dpkg --compare-versions "${PROJECT_VERSION}" "lt" "2.3.6"); then
1821
PROJECT_PHP_VERSION='7.3';
1922
fi

provision/010-system-packages.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ apt-get update -y && apt-get install -y \
4040

4141
# Php Repository
4242
wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add -
43-
echo "deb https://packages.sury.org/php/ stretch main" | tee /etc/apt/sources.list.d/php.list
43+
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
4444

4545
# Percona repository
4646
wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb
@@ -75,11 +75,16 @@ else
7575
fi
7676

7777

78-
# Composer v1.x
78+
# Composer
79+
if $(dpkg --compare-versions "${PROJECT_VERSION}" "lt" "2.4.2"); then
80+
# Composer v1
7981
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --1
80-
81-
# Prestissimo speed up installation
82+
# Prestissimo
8283
sudo -u vagrant composer global require hirak/prestissimo
84+
else
85+
# Composer v2
86+
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
87+
fi
8388

8489
# Postfix
8590
wget -P ~/ https://www.thawte.com/roots/thawte_Premium_Server_CA.pem && \

provision/020-system-services.sh

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -134,36 +134,16 @@ EOF
134134

135135

136136
# Fpm php configuration
137-
sed -i 's/;opcache.enable=.*/opcache.enable=1/' /etc/php/"$PROJECT_PHP_VERSION"/fpm/php.ini
138-
sed -i 's/;opcache.enable_cli=.*/opcache.enable_cli=1/' /etc/php/"$PROJECT_PHP_VERSION"/fpm/php.ini
139-
sed -i 's/;opcache.memory_consumption=.*/opcache.memory_consumption=512/' /etc/php/"$PROJECT_PHP_VERSION"/fpm/php.ini
140-
sed -i 's/;opcache.interned_strings_buffer=.*/opcache.interned_strings_buffer=4/' /etc/php/"$PROJECT_PHP_VERSION"/fpm/php.ini
141-
sed -i 's/;opcache.max_accelerated_files=.*/opcache.max_accelerated_files=60000/' /etc/php/"$PROJECT_PHP_VERSION"/fpm/php.ini
142-
sed -i 's/;opcache.validate_timestamps=.*/opcache.validate_timestamps=1/' /etc/php/"$PROJECT_PHP_VERSION"/fpm/php.ini
143137
sed -i 's/memory_limit = .*/memory_limit = 4G/' /etc/php/"$PROJECT_PHP_VERSION"/fpm/php.ini
144138
sed -i "s|;date.timezone =|date.timezone = ${PROJECT_TIME_ZONE}|" /etc/php/"$PROJECT_PHP_VERSION"/fpm/php.ini
145139
sed -i 's/max_execution_time = .*/max_execution_time = 1800/' /etc/php/"$PROJECT_PHP_VERSION"/fpm/php.ini
146140
sed -i 's/zlib.output_compression = .*/zlib.output_compression = On/' /etc/php/"$PROJECT_PHP_VERSION"/fpm/php.ini
147-
sed -i "s|;sendmail_path.*|sendmail_path=/usr/sbin/sendmail -t -i -f vagrant@$PROJECT_URL|" /etc/php/"$PROJECT_PHP_VERSION"/fpm/php.ini
148-
sed -i "s|;sendmail_from.*|sendmail_from=vagrant@$PROJECT_URL|" /etc/php/"$PROJECT_PHP_VERSION"/fpm/php.ini
149-
sed -i 's/smtp_port.*/smtp_port = 1025/' /etc/php/"$PROJECT_PHP_VERSION"/fpm/php.ini
150-
sed -i "s|;opcache.file_cache=|opcache.file_cache=/tmp/php-opcache/|" /etc/php/"$PROJECT_PHP_VERSION"/fpm/php.ini
151141

152142
# Cli php configuration
153-
sed -i 's/;opcache.enable=.*/opcache.enable=1/' /etc/php/"$PROJECT_PHP_VERSION"/cli/php.ini
154-
sed -i 's/;opcache.enable_cli=.*/opcache.enable_cli=1/' /etc/php/"$PROJECT_PHP_VERSION"/cli/php.ini
155-
sed -i 's/;opcache.memory_consumption=.*/opcache.memory_consumption=512/' /etc/php/"$PROJECT_PHP_VERSION"/cli/php.ini
156-
sed -i 's/;opcache.interned_strings_buffer=.*/opcache.interned_strings_buffer=4/' /etc/php/"$PROJECT_PHP_VERSION"/cli/php.ini
157-
sed -i 's/;opcache.max_accelerated_files=.*/opcache.max_accelerated_files=60000/' /etc/php/"$PROJECT_PHP_VERSION"/cli/php.ini
158-
sed -i 's/;opcache.validate_timestamps=.*/opcache.validate_timestamps=1/' /etc/php/"$PROJECT_PHP_VERSION"/cli/php.ini
159143
sed -i 's/memory_limit = .*/memory_limit = 4G/' /etc/php/"$PROJECT_PHP_VERSION"/cli/php.ini
160144
sed -i "s|;date.timezone =|date.timezone = ${PROJECT_TIME_ZONE}|" /etc/php/"$PROJECT_PHP_VERSION"/cli/php.ini
161145
sed -i 's/max_execution_time = .*/max_execution_time = 1800/' /etc/php/"$PROJECT_PHP_VERSION"/cli/php.ini
162146
sed -i 's/zlib.output_compression = .*/zlib.output_compression = On/' /etc/php/"$PROJECT_PHP_VERSION"/cli/php.ini
163-
sed -i "s|;sendmail_path.*|sendmail_path=/usr/sbin/sendmail -t -i -f vagrant@$PROJECT_URL|" /etc/php/"$PROJECT_PHP_VERSION"/cli/php.ini
164-
sed -i "s|;sendmail_from.*|sendmail_from=vagrant@$PROJECT_URL|" /etc/php/"$PROJECT_PHP_VERSION"/cli/php.ini
165-
sed -i 's/smtp_port.*/smtp_port = 1025/' /etc/php/"$PROJECT_PHP_VERSION"/cli/php.ini
166-
sed -i "s|;opcache.file_cache=|opcache.file_cache=/tmp/php-opcache/|" /etc/php/"$PROJECT_PHP_VERSION"/cli/php.ini
167147

168148
touch /etc/tmpfiles.d/php-cli-opcache.conf;
169149
if ! grep -qF "/tmp/php-opcache" /etc/tmpfiles.d/php-cli-opcache.conf; then

provision/110-magento-app.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ else
3535
fi
3636

3737
# Composer install
38-
sudo -u vagrant COMPOSER_MEMORY_LIMIT=-1 composer install -d "$PROJECT_BUILD" --no-progress --no-interaction --no-suggest
38+
sudo -u vagrant COMPOSER_MEMORY_LIMIT=-1 composer install -d "$PROJECT_BUILD" --no-progress --no-interaction
3939

4040
# Rsync directory
4141
if [ "$PROJECT_BUILD" != "$PROJECT_PATH" ]; then

0 commit comments

Comments
 (0)