Be patient with the vagrant up
as it can take up to an hour depending on your connection.
Simple vagrant build for a general php/mysql setup on nginx. This will boot up an nginx/php/mysql ubuntu box for a single instance. It uses host manager for easy local DNS configuration.
This particular box also installs some CakePHP dependencies.
-
Navigate inside the vagrant folder and create the guest machine
vagrant up
-
After the installation finishes, visit the chosen domain:
http://app.dev
All settings can be found in vagrant/config.yaml
.
Puppet modules are managed by Librarian-Puppet Add any extra modules to the Puppetfile
MySQL can be accessed internally on the box by SSHing into it using vagrant ssh
, or, by using a desktop client (or command-line) from your host machine. The MySQL server package has been pre-configured to allow access from your remote machine using a combination of the private IP address from vagrant and the generated users credentials. You can connect using a command (from your host machine) like the following:
mysql --host=192.168.99.16 --user=username --password=password
Create a new SSH connection with the following settings
MySQL Host: 192.168.99.16
Username: root
Password: 123456
SSH Host: 192.168.99.16
SSH User: vagrant
SSH password: vagrant
There is a statement included in the puppet files to search your $siteRoot
for a package.json
file. If one is found, then the command npm install
will be run on your behalf. The longer a project runs the more likely its dependencies will change. If you add or remove packages from your package.json
file, simply run vagrant provision
to have it re-run the npm install
command.
Please note that running vagrant up
for the first time can come with some issues to fix up. If you run into any issues please refer to the troubleshooting documentation and if you have anything to add to this please do.