Skip to content

Commit bf43628

Browse files
authored
Merge pull request #4 from DemacMedia/1.0.4
1.0.4: Changes to allow vhost to support multiple site aliases
2 parents 2d422b7 + 0666105 commit bf43628

File tree

3 files changed

+243
-82
lines changed

3 files changed

+243
-82
lines changed

README.md

+69-28
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Demac Flavoured vagrant-lamp
22

3+
Jump to [Goal](#goal) | [Requirements](#requirements) | [Setup](#setup) | [Configuration](#configuration) | [Change History](#change-history)
4+
35
### Goal
46
The goal of this project is to create an easy to use, reliable development environment.
57
This was built as a MAMP/WAMP replacement, meeting the requirements of Magento 1 & 2
@@ -24,38 +26,54 @@ specifically.
2426
# Run Vagrant Up to download and setup the VM
2527
vagrant up
2628

27-
###Configuration
29+
### Configuration
2830
- Guest Host Entries:
2931
- Add host entries to files/hosts.txt to have them added to Guest machine on provisioning
3032
- config.yml settings
31-
- vagrant_hostname: Hostname on Guest VM `OPTIONAL - can leave default demacvm.dev`
32-
- vagrant_machine_name: Vagrant Machine Name, used for creating unique VM `OPTIONAL - can leave default demacvm`
33-
- vagrant_ip: IP addressed used to access Guest VM from Local machine `OPTIONAL - can leave default 192.168.33.10`
34-
- vagrant_public_ip: Public IP address of VM `OPTIONAL - recommended leave defualt empty`
33+
- vagrant_hostname: Hostname on Guest VM
34+
OPTIONAL - can leave default `demacvm.dev`
35+
- vagrant_machine_name: Vagrant Machine Name, used for creating unique VM
36+
OPTIONAL - can leave default `demacvm`
37+
- vagrant_ip: IP addressed used to access Guest VM from Local machine
38+
OPTIONAL - can leave default `192.168.33.10`
39+
- vagrant_public_ip: Public IP address of VM
40+
OPTIONAL - recommended leave defualt `empty`
3541
- vagrant_synced_folders: Shared Folders from HOST machine to Guest
3642
- local_path: Path on Host machine to share
3743
- destination: Path on Guest machine to mount share
38-
- type: Share Type \[[nfs](https://www.vagrantup.com/docs/synced-folders/nfs.html)|[smb](https://www.vagrantup.com/docs/synced-folders/smb.html)|[rsync](https://www.vagrantup.com/docs/synced-folders/rsync.html)\] `OPTIONAL - recommended leave defualt empty`
39-
- create: Create directory on HOST machine if it doesn't exist `OPTIONAL - recommended leave defualt true`
44+
- type: Share Type \[[nfs](https://www.vagrantup.com/docs/synced-folders/nfs.html)|[smb](https://www.vagrantup.com/docs/synced-folders/smb.html)|[rsync](https://www.vagrantup.com/docs/synced-folders/rsync.html)\]
45+
OPTIONAL - recommended leave default as empty. Mac OS users may use nfs but not recommended for the mysql share as nfs bind may run out of connections
46+
- create: Create directory on HOST machine if it doesn't exist
47+
OPTIONAL - recommended leave default `true`
4048
```
41-
#Example of Multiple Shared Folders
49+
# Example of Multiple Shared Folders
4250
vagrant_synced_folders:
43-
- local_path: ~/Sites/projects_directory
51+
- local_path: ~/projects/www
4452
destination: /srv/www
45-
type:
53+
type: nfs
4654
create: true
47-
- local_path: ~/Sites/projects_directory2
48-
destination: /srv/www2
55+
56+
- local_path: ~/projects/mysql
57+
destination: /srv/mysql
4958
type:
5059
create: true
60+
owner: 500 # mysql user not created yet, but will have this id when the box is provisioned
61+
group: 500 # mysql group not created yet, but will have this id when the box is provisioned
62+
63+
- local_path: ~/projects/backup
64+
destination: /srv/backup
65+
type: nfs
66+
create: true
5167
```
52-
- vagrant_memory: Memory to assign to VM `OPTIONAL - can leave default 2048, recommended 3096`
53-
- vagrant_cpus: CPU Cores to assign to VM `OPTIONAL - can leave default 2`
68+
- vagrant_memory: Memory to assign to VM
69+
OPTIONAL - can leave default `2048`, recommended `4096` or more for M2 projects
70+
- vagrant_cpus: CPU Cores to assign to VM
71+
OPTIONAL - can leave default `2`
5472
55-
####The following are installed:
73+
#### The following are installed:
5674
5775
- Apache2 with mpm\_event
58-
- Percona 5.6 (Server and Client)
76+
- Percona 5.6 (MySQL Server and Client)
5977
- Varnish
6078
- Redis
6179
- PHP-FPM 5.4, 5.5, 5.6 & 7.0 /w Xdebug (via PHPFARM)
@@ -67,20 +85,43 @@ specifically.
6785
- mailhog
6886
6987
70-
####The following Extra Tools are available:
71-
- Composer (Added to PATH)
72-
- N98-Magerun (Added to PATH)
73-
- modman (Added to PATH)
74-
- PHPUnit (Added to PATH)
75-
- redis-setup (Added to PATH)
76-
- Add,Remove or List Redis instances
88+
#### The following Extra Tools are available:
89+
- Composer
90+
- N98-Magerun and N98-Magerun2
91+
- modman
92+
- PHPUnit
93+
- redis-setup
94+
- Add / Remove or List Redis instances
7795
7896
```Usage: redis-setup add|remove|list -n name [-p port] [-s save]```
79-
- vhost (Added to PATH)
80-
- Add,Remove Apache virtualhost entries
97+
- vhost
98+
- Add / Remove Apache virtualhost entries
8199
82-
```Usage: vhost add|remove -d DocumentRoot -n ServerName -p PhpVersion [-a ServerAlias] [-s CertPath] [-c CertName]```
83-
- mysql-sync (Added to PATH)
100+
```Usage: vhost add|remove -d DocumentRoot -n ServerName -p PhpVersion [-a ServerAlias] [-s CertPath] [-c CertName] [-f]```
101+
- mysql-sync
84102
- Sync Remote Database to VM Mysql instance
85103
86-
```Usage: mysql-sync -i remote-ip -p remote-port -u remote-username -d remote-database```
104+
```Usage: mysql-sync -i remote-ip -p remote-port -u remote-username -d remote-database```
105+
106+
## Change History
107+
- 1.0.0 (2016-04-01 to 2017-02-03)
108+
- Initial unversioned releases
109+
- 1.0.1 (2017-10-16)
110+
- Added SSL support for `vhost` function (was on a separate branch)
111+
- 1.0.2 (2018-01-16)
112+
- Major refactoring to allow php versions, users and groups to be configured much more easily
113+
- PHP 7.0.8 replaces PHP 7.0.6 and freeType support added for all PHP versions
114+
- Added two new mandatory external shares /srv/backup and /srv/mysql used for backups and live mysql databases
115+
- Mysql databases now live on host machine and so can survive a `vagrant destroy` / `vagrant up` cycle
116+
- Added `vhelp` command with user help
117+
- Added `vstatus` command to show memory and disk use and availablity of key services
118+
- Added `xdebug` command for simple enabling / disabling of XDebug in all installed PHP instances added
119+
- Added `backypMysql` / `restoreMysql` for easy backup / restore of all mysql databases and users to the external /srv/backup mount
120+
- Added `backupWebconfig` / `restoreWebconfig` for easy backup / restore of all newly added vhosts and associated SSL certificates
121+
- Added `phpRestart` to restart all installed php FPM services in a single operation
122+
- 1.0.3 (2018-01-18)
123+
- Added n98-magerun2 and simple alias `n98` that automatically selects correct version of n98 for the instance in question
124+
- 1.0.4 (2018-01-22)
125+
- Changes to `vhost` command to allow it to support multiple aliases in a single operation
126+
- Changes to `vhost` command to add -f (force) flag that can bypass confirmation messages
127+
- Provisioner script now identifies and upgrades all existing legacy vhost configurations to support SSL and be backed up by the `backupWebconfig` command

0 commit comments

Comments
 (0)