Closed marama2 closed 5 years ago
Hi,
It's look like magento2.1 doesn't have a package for bundle-sample-data with php7.0
Sample data are installed in this file at line 33:
https://github.com/zepgram/magento2-fast-vm/blob/master/provision/110-magento-app.sh#L33
You might encounter same error for others sample modules, but not all of them.
I recommend you to set sample data to false in config.yaml.
Then you could try to install them after the full vagrant setup by interactive mode with
bin/magento sampledata:deploy
Hi Benjamin,
thank you very much for your Kind -and extremely quick- answer.
I had eliminated that already in my first runs… but I had lots of
other Problems there still.
Therefore, I reverted back to your original files. All that I changed
from these original files is
The posted log is from this attempt.
Best regards,
Udo
Zitat von Benjamin Calef notifications@github.com:
Hi,
It's look like magento2.1 doesn't have a package for
bundle-sample-data with php7.0 Sample data are installed in this file at line 33: https://github.com/zepgram/magento2-fast-vm/blob/master/provision/110-magento-app.sh#L33 You might encounter same error for others sample modules, but not
all of them. I recommend you to set sample data to false in config.yaml. Then you could try to install them after the full vagrant setup by
interactive mode withbin/magento sampledata:deploy
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/zepgram/magento2-fast-vm/issues/16#issuecomment-497934831
Well it's look like you've missed composer credentials in config.yaml: composer: username: 'magentoUsernameKey' password: 'magentoPasswordKey'
You can find them in your Magento account: https://devdocs.magento.com/guides/v2.3/install-gde/prereq/connect-auth.html
Aaaaargh… tried to keep the files as original as possible and forgot to enter the Magento keys.
Now, the vagrant file has ended installation and I would expect to find '==> zepgram: Vagrant machine ready to use for John Doe ==> zepgram: ==> zepgram: magento dev.magento.com ==> zepgram: phpinfo 192.168.200.50/phpinfo ==> zepgram: adminer 192.168.200.50/adminer ==> zepgram: mailcatcher 192.168.200.50:1080'
I can ping the machine with ip and with dev.magento.com but no http connection to these four addresses above.
There is a full documentation in README.md with 8 seps that explains all you have to do on your side to make it work. There it's probably the 5th step that you are missing:
Add vm_conf[network_ip] and magento[url] in your hosts file. Add 127.0.0.1 localhost if it's not already the case C:\Windows\System32\drivers\etc\hosts on Windows, /etc/hosts on Linux/macOS. For default values: 192.168.200.50 dev.magento.com
Thank you, very appreciated!
hosts file is fine already, ping dev.magento.com is resolved to 192.168.200.50 properly: PS C:> ping dev.magento.com Ping wird ausgeführt für dev.magento.com [192.168.200.50] mit 32 Bytes Daten: Antwort von 192.168.200.50: Bytes=32 Zeit=1ms TTL=64 Antwort von 192.168.200.50: Bytes=32 Zeit<1ms TTL=64
It should be accessible in your navigator through https. https://dev.magento.com If it's not the case could you send me a screenshot of the navigator page ?
Wouldn't believe this: Windows 10 Edge returns not found, http://prntscr.com/nwao6a Firefox returns the proper page, http://prntscr.com/nwaozc
It seems that Windows 10 Edge does
Calling https://dev.magento.com returns an SSL warning first and then a blank page… but I will search for that in the next steps. Thank you for your help!!!
What ever drove me to base my development machine here on Windows... whenever this project is done, I will for sure return to linux
Filtered this Windows-Issue out, I now returned to settings for my project:
config.disksize.size = '60GB' (needed for large media content)
config.yaml settings url: 'dev.magento.com' source: 'composer' edition: 'community' version: '2.1.13' sample: 'false' mode: 'developer'
010-system-packages.sh if $(dpkg --compare-versions "${PROJECT_VERSION}" "lt" "2.2"); then MAGENTO_PHP_VERSION="7.0"; fi (Magento 2.1.13 allows PHP7.0 max)
Issues are now: Restarting apache2 service brings up two errors on PHP version: https://prnt.sc/nwb8m3
vagrantfile ends again with error on /srv/magento/bin/magento not found. The file is present as normal in the Magento environment. Suspicious is a bit that all files in /srv/magento have owner vagrant:www-data, I would have expected magento:www-data?
In your screenshot it's not an error, I disable all php module by default to let only one enabled corresponding to the php version installed, which is 7.0 in your case. But you're right concerning the owner it should be magento:www-data
At this point run vagrant destroy and then vagrant up. You can also take a look at this tutorial made by Onilab for w10: https://onilab.com/blog/install-magento-2-on-localhost-a-windows-10-guide/
I checked the one with Onilab, recreated ssh-keys, tried again, failed again.
There are two parts in the log that I am not sure about:
Quite in the beginning, it says that my keys would have been replaced due to unsafety. In fact, /home/magento/.ssh contains identical keys that I provided in the vagrant directory: http://prntscr.com/nwc3go --> could it be that numerous ssh commands fail due to key mismatch?
Later in the script, I find the environment variable for SETUP_USER vagrant, which might be the cause for the wrong owner in the /srv/magento directory? http://prntscr.com/nwc0nx --> can I setup the SETUP_USER to magento somewhere in the script?
Concerning the first point those private keys are related to vagrant and are automatically generated, it's not link to the setup it self so you can ignore it.
Concerning the second point, SETUP_USER must be set to vagrant user on first vagrant up. After the vagrant up, files are mounted and correct roles are assigned through bindfs plugin. This indicates 2 things, which are related :
In fact the full setup is working I tried it few hours ago on w10, so they might be something wrong on your side. Could you please send me your config.yaml ?
By the way a colleague of mine had an error on the mount because the project was opened in a text editor. When you ran vagrant up don't forget to close every editor that might have access to vagrant files. In deed windows keep property of files and the mount can't be done.
I am sure that the mistake must be somewhere over my side :) Another point I observe: the virtualbox does not have any shared folder installed (app)... just might be another mount issue.
Attached the config.yaml, I will try in parallel with all files closed in whatever editor.
Well it's interesting! Your config.yaml is fine. Tell me if it works and we'll go further if it's not 👍
No other ideas. One trial was just to be sure that all older Vagrant boxes were cleared (vagrant global-status --prune). No joy. Can't think of anything else: My notebook is brand new, just bought it to have a designated development environment. Software versions are: Virtualbox version 6.0.8, Vagrant 2.2.4
Could it be still something with the ssl keys? I have regenerated them in putty, exported the public one and saved the private one. Compared keys in the virtual machine (/home/magento/.ssl) and in the vagrant folder. Identical. Also, I am able to connect via "vagrant ssl", so I would think that this should be fine. What does NOT work however is that putty connection fails.
What checks could I run to see whether (or why) the mounts are running? How are they called in vagrantfile?
If your composer installation worked ssh keys are fine.
Concerning the mount you can check it just by seeing the www/magento/app not empty in your host machine.
One last solution that I see is concerning the NFS option, you can try to mount this folder without NFS by setting it to false and reload vagrant using vagrant reload
I will try this as next step. Currently, there is another vagrant up running. I would like to check the var/log folder more closely. What I found in whatever.log was that creation of user Virtualbox (or similar ?) failed. I will report as soon as vagrant up finishes.
Ok. Auth.log reports failure of adding user vboxadd quite early, http://prntscr.com/nwe0gf
daemon.log reports a problem in generating the interfaces http://prntscr.com/nwe1s3 and postfix http://prntscr.com/nwe2d2
Final run for today: When installing magento version 2.3.1, vagrant ends with reporting the http-Interfaces. The owner of the /srv/magento directory is now magento:www-data as expected. Difference I would say is that in one case, all php7.2 modules are loaded, when attempting to have it run with Magento 2.1.13 and php7.0, it failes and has a conflict in owner of the web root directory.
Ok. I'll take a look to fix the setup for magento2.1 Sorry for the inconvenience.
Sorry for the inconvenience? Other way round: Thank you very much for supporting me!!! Please be aware that i changed one line in 010-system-packages.sh:
MAGENTO_PHP_VERSION="7.2"; if $(dpkg --compare-versions "${PROJECT_VERSION}" "lt" "2.3"); then MAGENTO_PHP_VERSION="7.1"; fi if $(dpkg --compare-versions "${PROJECT_VERSION}" "lt" "2.2"); then MAGENTO_PHP_VERSION="7.0"; fi
Yep thanks for that, I just checked and php7.1 start only with Magento 2.1.16, so I'll fix that To be more flexible I'll add an option in config.yaml to force php version. For example Magento2.3.* is available with php7.1 and 7.2 so the choice must be open. As I said I'll try a full setup with 2.1.13 on my side, and I'll add those fix on next release.
Hi hope your fine,
It's fixed with release v1.2.0 I tried with nfs and rsync and it worked well, keep me informed on your side.
Running great now :) :)
Thank you very much for your support. email will follow ;)
Hi, I'm struggling with this virtual machine quite some time already. First, I modified config.yaml to my own needs (M.2.1.13) and made a change to enforce PHP7.0 and had lots of no-joy. To eliminate my own potential mistakes, I now took your original again. Changes made: copied ssh keys to Directory ssh & uncommenting # v.gui=true
Still fails, last lines of vagrant report is: ` zepgram: create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [] [] []
zepgram: 1/2: http://repo.packagist.org/p/provider-latest$171f3560ee0f99757671c1f039c524673ab3e64a89c76599852053047741ce1d.json
zepgram: 2/2: http://repo.packagist.org/p/provider-2019-01$1f3f3a6254adeff2c22659a929fa84b42be754809f216a81d82f524ce761e370.json
zepgram: Finished: success: 2, skipped: 0, failure: 0, total: 2
zepgram: 1/2: http://repo.packagist.org/p/provider-latest$171f3560ee0f99757671c1f039c524673ab3e64a89c76599852053047741ce1d.json
zepgram: 2/2: http://repo.packagist.org/p/provider-2019-01$1f3f3a6254adeff2c22659a929fa84b42be754809f216a81d82f524ce761e370.json
zepgram: Finished: success: 2, skipped: 0, failure: 0, total: 2
zepgram: 1/2: http://repo.packagist.org/p/provider-latest$171f3560ee0f99757671c1f039c524673ab3e64a89c76599852053047741ce1d.json
zepgram: 2/2: http://repo.packagist.org/p/provider-2019-01$1f3f3a6254adeff2c22659a929fa84b42be754809f216a81d82f524ce761e370.json
zepgram: Finished: success: 2, skipped: 0, failure: 0, total: 2
zepgram:
zepgram: [InvalidArgumentException]
zepgram: Could not find a matching version of package magento/module-bundle-sample-data. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).
zepgram:]…
zepgram: Loading composer repositories with package Information
zepgram: Updating dependencies (including require-dev)
zepgram: Nothing to install or update
zepgram: Generating autoload files
zepgram: sudo
zepgram:
zepgram: /srv/magento/bin/magento: command not found
zepgram: sudo
zepgram:
zepgram: /srv/magento/bin/magento: command not found
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.`
zepgram: zepgram: require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [