Skip to content

Commit 2e6b8f8

Browse files
author
Benjamin Calef
authored
Merge pull request #97 from zepgram/develop
[v1.5.0] update for magento v2.4.4
2 parents 3370d65 + c1d4471 commit 2e6b8f8

File tree

6 files changed

+52
-56
lines changed

6 files changed

+52
-56
lines changed

README.md

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![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)
44
[![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)
55
[![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)
6+
[![release](https://img.shields.io/badge/release-v1.5.0-blue.svg?longCache=true&style=flat&label=release)](https://github.com/zepgram/magento2-fast-vm/releases)
77
[![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)
88

99
![windows](https://img.shields.io/badge/windows-ok-green.svg?longCache=true&style=flat&label=windows&logo=windows)
@@ -22,7 +22,7 @@ Stable version >= 5.2.0
2222

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

4646
### Pre-installation
4747

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``
48+
&#9888; This vagrant installation is non-interactive: DO NOT USE SSH KEY WITH PASSPHRASE.<br>
49+
If your ssh key has been created with a passphrase, please create another one.
50+
51+
System | Steps |
52+
|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
53+
| 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`` |
54+
| MacOs | 1. To avoid issue with guest additions, run:<br> ``sudo apt install linux-headers-$(uname -r)`` |
55+
| Linux | 1. To install NFS properly, run:<br> ``sudo apt install nfs-kernel-server``
56+
| 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``
5657

5758
### Installation
5859

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

6667
### Yaml config overview
6768
Parent Node | Name | Default Value | Allowed Value | Is optional | Description
@@ -83,7 +84,7 @@ Parent Node | Name | Default Value | Allowed Value | Is optional | Des
8384
| magento | url | dev.magento.com | url | no | Magento site host name
8485
| | source | composer | composer / (master/develop..) | no | Define source installation. On git install set the branch name to clone.
8586
| | edition | community | community / enterprise | no | Magento project edition
86-
| | version | 2.4.2 | >=2.2 | no | Magento version release
87+
| | version | 2.4.4 | >=2.2 | no | Magento version release
8788
| | php_version | default | default / 7.x | no | PHP version
8889
| | sample | true | true / false | no | Install sample data
8990
| | mode | developer | developer / production | no | Magento execution mode
@@ -129,7 +130,7 @@ Those provisions will be executed on pre-defined sequences:
129130
- To be executed you must remove the string `-example` from the filename script.
130131
- As an example of use, you can adapt data from your database import by using the script ``100-pre-build.sh``
131132

132-
## Usage
133+
## System usage
133134

134135
### Permission
135136
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 +155,6 @@ Disable cron:
154155
./bin/magento cron:remove
155156
```
156157

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-
168158
## Configuration
169159

170160
### Package & Software
@@ -188,7 +178,7 @@ For version lower than 2.4, you can disable it and fall back to mysql:
188178
- magento-cloud cli
189179
- bin/magento bash completion
190180

191-
### Credentials
181+
### Access
192182
* User bash terminal
193183
* user: vagrant
194184
* Back-office
@@ -206,15 +196,33 @@ For version lower than 2.4, you can disable it and fall back to mysql:
206196
* Phpinfo
207197
* url: [network_ip]/php
208198

199+
### Mysql
200+
Percona server 8.0 is now installed for Magento >=2.4.0
201+
202+
### PHP
203+
PHP 8.1 is now installed by default for Magento >=2.4.4
204+
205+
### Composer
206+
Composer v2 is now installed by default for Magento >= 2.4.2
207+
208+
### Elasticsearch
209+
Version 7.6.x of Elasticsearch is now available for Magento 2.4.0.<br>
210+
If your Magento version is lower than 2.4.0 then version 6.x will be installed.<br>
211+
For version lower than 2.4.0, you can disable it and fall back to mysql search engine:
212+
```
213+
./bin/magento config:set catalog/search/engine mysql
214+
```
215+
Otherwise, you can also completely disable elasticsearch by installing this module: https://github.com/zepgram/module-disable-search-engine
216+
209217
## Issues
210218

211219
### Windows 10
212220
There is a known [issue with composer installation](https://github.com/zepgram/magento2-fast-vm/issues/70) on windows 10.<br>
213221
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.
222+
- This is related to the computer and BIOS configuration.
223+
- This is only reported on "NFS" mount option.
216224

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

219227
### Others
220-
- If you have trouble during installation please open a new issue on this repository.
228+
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)