Description
We are trying to set up local M2 EE dev environments on Windows 10 workstations to support our new manged M2 ECE instance. All commands below were run using Git Bash as Admin.
Install Steps
- Installed Git Bash (2.15.0 64-bit), Composer (1.5.2), VirtualBox (5.1.30) and Vagrant (1.8.5)
- Installed vagrant
hostmanager
,vbguest
andhost-shell
plugins - Configured Git
core.autocrlf false
,core.eol LF
anddiff.renamelimit 5000
globals - Generated SSH keys and added to GitHub and M2 ECE dev environment on AWS
- Cloned
[email protected]:paliarush/magento2-vagrant-for-developers.git
intoC:\Users\JordanG\Documents\Source\Magento
- Copied
..\vagrant-magento\etc\config.yaml.dist
toconfig.yaml
and configured EE repository url to point to M2 ECE dev master git, CE repository url to point to our forked M2 CE repo,composer_prefer_source: 1
and upped memory and cpus - Copied
..\vagrant-magento\etc\composer\auth.json.dist
toauth.json
and configured GitHub personal access token and Magento public and private access keys - Uncommented
vb.gui=true
in Vagrantfile to avoid issues with VirtualBox on Windows 10 - Ran
bash init_project.sh
from..\vagrant-magento
with PHPStorm closed
Install Results
Only one error logged, in cache flushing step: Can't remove /var/www/magento2ce/app/etc/env.php: Text file busy, skipping file.
M2 CE storefront and admin sites working:
EE directory populated with correct source from M2 ECE AWS dev master Git repo: C:\Users\JordanG\Documents\Source\Magento\vagrant-magento\magento2ce\magento2ee
So all is well up to this point.
Switching to EE
- Run PhpStorm as admin and open directory
C:\Users\JordanG\Documents\Source\Magento\vagrant-magento
- Click yes:
- Choose ignore for
Unregistered VCS root detected. The directory C:\Users\JordanG\Documents\Source\Magento\vagrant-magento is under Git, but is not registered in the Settings.
- Some background tasks fire up:
- VCS connections made:
- After initial wave of background tasks completed in PhpStorm, run
bash m-switch-to-ee
with PhpStorm open - Eventually, automated progress stops and this is logged:
WARNING: > [Action Required] Wait while Magento2 code is uploaded in PhpStorm and press any key to continue...
Not sure how long to wait... nothing seems to be happening in PhpStorm... wait 10-15 minutes... - Hit a key in bash to continue script execution
Front end now shows setup page:
Switching to EE results in error
A quick search reveals RabbitMQ may not be properly installed/configured on the VM?
Per official docs, --amqp-host is:
For magento Commerce only. Do not use the
--amqp
options unless you have already set up an installation of RabbitMQ. See RabbitMQ installation for more information about installing and configuring RabbitMQ.
Switching to EE "without" RabbitMQ results in error
- Commented these lines out in:
C:\Users\JordanG\Documents\Source\Magento\vagrant-magento\scripts\guest\m-reinstall
- Run
bash m-switch-to-ee -f
with PhpStorm open - Wait for arbitrary amount of time while Magento2 code is uploaded in PhpStorm, before pressing a key to continue... how do you know when this is done?
Last-ditch efforts
-
Tried flushing cache with
bash m-bin-magento cache:flush
but got error:
-
Tried flushing cache with
bash m-clear-cache
- got one error:
-
Seems like it worked because custom module in app/code that was committed to M2 ECE AWS dev master Git repo is installed in the admin site:
But vagrant is still not switched to the EE source cloned from ECE repo. The admin sites show different versions and have all different menu options available:
-
Tried
recompiling: bash m-bin-magento setup:di:compile
- that fails:
-
Tried re-deploying static content:
bash m-bin-magento setup:static-content:deploy
- works but vagrant is still not in EE 'mode' -
On VM, apache2 sites-enabled does't point to EE dir... bad sign?
<VirtualHost *:80> DocumentRoot "/var/www/magento2ce" ServerName magento2.vagrant129 <Directory "/var/www/magento2ce"> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> ErrorLog "${APACHE_LOG_DIR}/error.log" CustomLog "${APACHE_LOG_DIR}/access.log" common </VirtualHost>
Next steps?
Clearly there are some RabbitMQ issues when switching to EE, but there also seems to be some other things going wrong under the hood here. Are there any steps here where we're doing something wrong or out of order? Any feedback would be greatly appreciated!!!
Thank you!