Skip to content

Commit d946683

Browse files
author
Benjamin Calef
authored
Merge pull request #102 from zepgram/develop
[v1.6.0] update vm to debian bullseye
2 parents d2732a2 + e223b2e commit d946683

File tree

6 files changed

+21
-68
lines changed

6 files changed

+21
-68
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
/extra/001-env.sh
99
/extra/100-pre-build.sh
1010
/extra/120-post-build.sh
11-
/db-dump.sql.gz
11+
/db-dump.sql.gz
12+
/*.log

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Fast Virtual Machine for Magento2
22

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)
3+
[![vagrant](https://img.shields.io/badge/vagrant-debian:bullseye-blue.svg?longCache=true&style=flat-square&label=vagrant&logo=vagrant)](https://app.vagrantup.com/geerlingguy/boxes/debian11)
44
[![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)
55
[![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)
66
[![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)
@@ -44,7 +44,7 @@ Stable version >= 5.2.0
4444
Stable version >= 2.2.0
4545

4646
1. Download the installer for your laptop operating system using the links below.
47-
* [Vagrant download](https://www.vagrantup.com/downloads.html)
47+
* [Vagrant download](https://www.vagrantup.com/downloads)
4848
1. Reboot your laptop if prompted to do so when installation completes.
4949

5050
## Configurations
@@ -222,6 +222,13 @@ Otherwise, you can also completely disable elasticsearch by installing this modu
222222

223223
## Issues
224224

225+
### Linux
226+
On version 1.6.0, I updated the machine to debian 11 bullseye, since I personally got this error:
227+
```shell
228+
mount.nfs: Connection timed out
229+
```
230+
Just fall back to default mount to avoid this issue, if you have any information about this issue please let me know.
231+
225232
### Windows 10
226233
There is a known [issue with composer installation](https://github.com/zepgram/magento2-fast-vm/issues/70) on windows 10.<br>
227234
This issue could not be solved yet, and has already been reported 2 times.<br>

Vagrantfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ end
3737
# Vagrant configure
3838
Vagrant.configure(2) do |config|
3939
# Virtual machine
40-
config.vm.box = 'geerlingguy/debian9'
40+
config.vm.box = 'geerlingguy/debian11'
4141

4242
# Host manager configuration
4343
config.vm.define vmconf['host_name']
@@ -56,6 +56,9 @@ Vagrant.configure(2) do |config|
5656
v.customize ['modifyvm', :id, '--ioapic', 'on']
5757
# Enable symlink
5858
v.customize ['setextradata', :id, 'VBoxInternal2/SharedFoldersEnableSymlinksCreate/var/www/', '1']
59+
# Resolve issue due to ssh lock https://github.com/hashicorp/vagrant/issues/11777
60+
v.customize ["modifyvm", :id, "--uart1", "0x3F8", "4"]
61+
v.customize ["modifyvm", :id, "--uartmode1", "file", File::NULL]
5962
# Uncomment option below to avoid issues with VirtualBox on Windows 10
6063
# v.gui=true
6164
end
@@ -75,7 +78,7 @@ Vagrant.configure(2) do |config|
7578
end
7679
# Linux NFS specification
7780
if OS.is_linux
78-
config.vm.synced_folder hostDirectory, guestDirectory, create: true, :nfs => true,
81+
config.vm.synced_folder hostDirectory, guestDirectory, create: true, :nfs => true,
7982
linux__nfs_options: ['rw','no_subtree_check','all_squash','async'], nfs_version: 4, nfs_udp: false
8083
else
8184
config.vm.synced_folder hostDirectory, guestDirectory, create: true, :nfs => true

config.yaml.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
vmconf:
22
machine_name: 'Vagrant Magento 2'
3-
network_ip: '192.168.200.50'
3+
network_ip: '192.168.60.0'
44
host_name: 'zepgram'
55
memory: '4096'
66
cpus: '1'

provision/010-system-packages.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ apt-get update -y && apt-get install -y \
3535
libsqlite3-dev libxml2-utils build-essential software-properties-common \
3636
postfix mailutils libsasl2-2 libsasl2-modules ca-certificates libnss3-tools \
3737
apt-transport-https openssl redis-server nginx \
38-
python ruby ruby-dev openjdk-8-jdk openjdk-8-jre \
38+
python ruby ruby-dev rubygems openjdk-11-jdk openjdk-11-jre \
3939
vim git git-flow
4040

4141
# Php Repository

provision/020-system-services.sh

Lines changed: 3 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ mysql -u root -ppassword -e "GRANT ALL PRIVILEGES ON * . * TO 'vagrant'@'localho
1818
mysql -u root -ppassword -e "GRANT ALL PRIVILEGES ON * . * TO 'vagrant'@'%';"
1919
mysql -u root -ppassword -e "FLUSH PRIVILEGES;"
2020

21-
# Mysqld conf
22-
if ! grep -qF "innodb_buffer_pool_size" /etc/mysql/percona-server.conf.d/mysqld.cnf; then
23-
cat <<EOF >> /etc/mysql/percona-server.conf.d/mysqld.cnf
21+
# Mysql conf
22+
if ! grep -qF "innodb_buffer_pool_size" /etc/mysql/mysql.conf.d/mysqld.cnf; then
23+
cat <<EOF >> /etc/mysql/mysql.conf.d/mysqld.cnf
2424
# Innodb
2525
innodb_buffer_pool_size = 1G
2626
innodb_log_file_size = 256M
@@ -75,64 +75,6 @@ MAIL_END
7575
# -----------------------------------------------------------------------------------------------------
7676

7777

78-
# Redis conf
79-
cat <<'EOF' > /etc/systemd/system/rc-local.service
80-
[Unit]
81-
Description=/etc/rc.local Compatibility
82-
ConditionPathExists=/etc/rc.local
83-
84-
[Service]
85-
Type=forking
86-
ExecStart=/etc/rc.local start
87-
TimeoutSec=0
88-
StandardOutput=tty
89-
RemainAfterExit=yes
90-
SysVStartPriority=99
91-
92-
[Install]
93-
WantedBy=multi-user.target
94-
EOF
95-
96-
cat <<'EOF' > /etc/rc.local
97-
#!/bin/sh -e
98-
#
99-
# rc.local
100-
#
101-
# This script is executed at the end of each multiuser runlevel.
102-
# Make sure that the script will "exit 0" on success or any other
103-
# value on error.
104-
#
105-
# In order to enable or disable this script just change the execution
106-
# bits.
107-
#
108-
# By default this script does nothing.
109-
110-
exit 0
111-
EOF
112-
113-
chmod +x /etc/rc.local
114-
systemctl enable rc-local
115-
116-
echo never > /sys/kernel/mm/transparent_hugepage/enabled
117-
sysctl -w net.core.somaxconn=65535
118-
sysctl vm.overcommit_memory=1
119-
120-
head -n -1 /etc/rc.local > /etc/rc.temp.local ; mv /etc/rc.temp.local /etc/rc.local
121-
cat <<'EOF' >> /etc/rc.local
122-
echo never > /sys/kernel/mm/transparent_hugepage/enabled
123-
sysctl -w net.core.somaxconn=65535
124-
125-
exit 0
126-
EOF
127-
128-
cat <<'EOF' >> /etc/sysctl.conf
129-
vm.overcommit_memory=1
130-
EOF
131-
132-
133-
# -----------------------------------------------------------------------------------------------------
134-
135-
13678
# Fpm php configuration
13779
sed -i 's/memory_limit = .*/memory_limit = 4G/' /etc/php/"$PROJECT_PHP_VERSION"/fpm/php.ini
13880
sed -i "s|;date.timezone =|date.timezone = ${PROJECT_TIME_ZONE}|" /etc/php/"$PROJECT_PHP_VERSION"/fpm/php.ini

0 commit comments

Comments
 (0)