Skip to content

monsieurbiz/vagrant-magento

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vagrantfile & Puppet manifests for Magento

--DEPRECATED--

Requirements

You just need Vagrant :)

How start

Edit the Vagrantfile: vim Vagrantfile

  • Change the VM IP if needed. Default is: 10.0.0.2 (10.0.0.1 is your machine)
  • Change the RAM or number of CPUs if needed.
  • On the puppet part: change the factors
    • Change hostname with the development domain of your website
    • Change db_* variables with your information or keep default values
    • If you change the document_root don't forget to change the synced directory

Then up the VM: vagrant up

Now you can access to your Magento : http://your-domain.org:8080

If you want do remove the port 8080 and access to your website via http://your-domain.org/ , you can do it with ipfw.
Example : ipfw add 100 fwd 127.0.0.1,8080 tcp from any to me 80 as root
ipfw isn't possible on Windows (but Windows sucks right?)

MySQL

You need to use an SSH connection.

With the information below you can connect to the MySQL server running on the virtual machine.

Default information

  • SSH Host: 10.0.0.2
  • SSH User: vagrant
  • SSH Pass: vagrant
  • SSH Port: 2222 (default by vagrant)
  • MySQL Host: 127.0.0.1
  • MySQL Port: 3306
  • MySQL User: magento
  • MySQL Pass: magento

Import database

If file exists database.sql.gz in the main directory (where the Vagrantfile is), puppet will import the database during the first up.

Virtualhost

Per default the variable MAGE_IS_DEVELOPER_MODE is set to true.

The virtualhost is set on the htdocs directory.

Mails

MailCatcher is installed and configured into the /etc/php5/apache2/php.ini file.

How it works

If mailcatcher is stopped: all emails are lost.

If mailcatcher is started: all emails are catched.

If you want to start MailCatcher, simply run this command (with vagrant user) : mailcatcher --ip 0.0.0.0

Then go to : http://localhost:1080

If you need to stop the mailcatcher daemon : Clic on "Quit" on the top right corner of the MailCatcher Web UI.

Packages

Are installed:

  • apache-mpm-itk (with magento virtualhost)
  • mysql-server (with custom my.cnf)
  • mysql-client
  • php5 (and some modules)
  • screen (with custom .screenrc for root)
  • vim
  • wget
  • curl
  • git
  • composer.phar
  • mailcatcher (gem)

For Magento developers