mage2_vagrant
mage2_vagrant copied to clipboard
I don't understand the setup instruction for installing mage2_vagrant
I could partially install it by mixing your instruction with another instruction I had for installing a program in vagrant. But when I open 'http://mage2.dev/setup' it says: "page is not available."
Your instruction misses the following:
(1) It doesn't have "vagrant init ubuntu/trusty64", and "vagrant up --provider virtualbox"
(2) It says nothing regarding installing php7 (or php 5.6); I installed it myself; I don't know if I should have added php.
(3) It doesn't have anything regarding installing composer. I added the command myself and installed composer; I don't know if I should have added composer.
(4) It says nothing regarding "composer init". I added the command myself.
(5) I ended up with two "Vagrantfile" files, (1) in the main directory, i.e., magento, that I created myself and filled the "Vagrantfile" in that directory with my own info, which is more likely incorrect, and (2) in mage2_vagrant directory, which already had info inside. Should I have two "Vagrantfile" files?
(6) It says nothing regarding creating "composer.json". I created it myself.
Also the instruction itself is vague, I don't understand the following:
(1) In paragraph 5, should I copy and paste the following after vagrant up, but before vagrant ssh? "echo '192.168.56.10 mage2.dev' >> /etc/hosts" (2) In paragraph 7, it says open or create the file "~/.composer/auth.json". No such file exist so I created it myself. But it doesn't say in what directory I should create the ".composer" hidden folder. I created the ".composer" folder in the directory of mag2_vagrant, as follows: "mag2_vagrant/.composer/auth.json". I don't know if it is in a correct directory. (3) In paragraph 8, it says install Magento 2 by running Via CLI (recommended), but it doesn't say what is the command line that I have to enter. So I chose the second option. However, after going through a long process of installation, including entering the Public key, Private Key, and Token Key, and downloading the large Magento 2 application, when I open "http://mage2.dev/set", it says page is not available.
Hi @Brian1111,
Reading through your issue report leads to me to believe something went astray early on. I'm curious what version of Vagrant and Virtual Box you're running. I'll go through each of the numbered items below:
-
This Vagrant configuration does not use Ubuntu. As indicated in the README.md, it's built upon the Debian linux distribution - Version 7 (Codename Wheezy). I have assumed the most common, and default, provider will be virtual box so there is no need to specify the provider when running
vagrant up
. -
The
Vagrantfile
instructs vagrant to provision (install necessary software/dependencies) via Puppet. If you're not familiar with Puppet, it's a configuration management tool. In this case it will install php, mysql, composer, apache, any some other packages automatically after bringing up the guest virtual machine. The version of PHP at this time that is installed is 5.6. -
As with PHP, Puppet should take care of installing composer.
-
There is no need to run
composer init
- this is ran when creating a composer package/project. While it appears to be possible to install Magento 2 via composer that's not the approach being taken with this project. -
You should not have to create a second
Vagrantfile
and in the majority of cases there is no need to modify the suppliedVagrantfile
. -
As I mentioned previously, there's no need to create a
composer.json
file. We've included the Magento 2 files via a git submodule (data/magento2/composer.json
). If you're missing thedata/magento2
directory, then when you cloned this project you did not initialize/clone the submodules. Did you happen to clone the project via GUI instead of running the suggestedgit clone --recursive https://github.com/rgranadino/mage2_vagrant.git
command ?
Regarding instructions:
-
The steps are written and listed in consecutive order. They should be followed as such. In short, Yes. You should add the
mage2
hostname after step 4 (vagrant up
) but before step 6 (vagrant ssh
). Once the user has ranvagrant ssh
, the instructions assume the user's environment where the proceeding commands will be ran is going to be the guest virtual machine. -
The instructions assume the user is working within the guest virtual machine at this point. In *nix operating systems the
~
(tilde) is short hand for the current user's Home directory. In our case this would expand to the guest machine's/home/vagrant
directory. It looks like you ended up adding it to the host machine which would not be correct. -
The command which should be ran is
reinstall
. Hopefully the above information will provide you enough details/context to start over and follow the instructions as outlined. Assuming you get to step 8 without any errors you will run isreinstall
from within the guest virtual machine.
Hi @rgranadino Thank you for the information. I will try to figure it out based on the information that you gave me. I have never used Puppet; I will look to find out about it. Also, I haven't used Debian Linux distribution; I don't think it is much different from Ubuntu.