It is expected that Magento 2 project source code will be located and managed on the host.
Development Environment:
- Ubuntu vagrant box
- Developer tools:
- git
- vim
- curl
- htop
- wget
- composer
- NGINX
- PHP 7.0.x with all extensions necessary for Magento 2: cli, intl, mcrypt, culr, pear, fpm, mbstring, mysql, xls, imagick, gd, opcache, zip
- MySQL 5.6
- XDebug
- Installs Magento 2
Please read Vagrant Docs if you never used Vagrant before.
Software listed below should be available in PATH (except for PHP Storm).
-
Open terminal and navigate into the directory to the one which you want to contain Magento project.
-
Clone (download) project with Vagrant configuration:
git clone [email protected]:Evozon-PHP/magento2-vagrant-ansible.git magento2
-
Change directory, navigate to project directory:
cd ./magento2
-
Config Environment:
vim ansible/vars/variables.yml
magento: install: '0' install_sample: '1' db_name: magento db_password: magento db_user: magento admin_user: admin admin_password: admin123admin admin_firstname: John admin_lastname: Doe admin_email: [email protected] public_key: MAGENTO_PUBLIC_KEY_HERE private_key: MAGENto_PRIVATE_KEY_HERE
-
Start up virtual machine and Install Magento2:
vagrant up
-
Point a host name to VM Private Network IP in /etc/hosts:
sudo echo '192.168.33.99 magento2.local' >> /etc/hosts
Some of default settings are available for override. Upon a successful installation, you'll see the location and URL of the newly-installed Magento 2 application in console.
- Access storefront at
http://magento2.local
- Access admin panel at
http://magento2.local/admin/
- Magento admin user/password:
admin/admin123admin
- MySQL DB host:
localhost
(not accessible remotely) - MySQL DB name:
magento
- MySQL DB user/password:
magento:magento
.
- Back-office port:
:15672
- Back-office user and password:
variables.yml
- The user is set in path
roles/memcache/vars/{linux-dist}.yml
- Add your custom values in
roles/redis/defaults/main.yml
- Nginx and Varnish are bot set to run on port
80
, to disable on of them, just uncomment the role fromplaybook.yml
- Add your custom values in
roles/varnish/defaults/main.yml
- Specify the config path in
roles/varnish/vars/{linux-dist}.yml
- Add your custom values in
roles/elasticsearch/defaults/main.yml
- Blackfire depends on the PHP role, so install php before
- After the install is complete,
vagrant ssh
to your server and run the commandblackfire-agent -register
to register your server id and token