Vagrant

Sandbox / Code Snippets /

Vagrant Root user

Most of the time you can happily work within your Vagrant box using 'sudo' to perform restricted actions, however from time to time you might want to actually become the root user, for instance when you want to set a system timezone like so...
Sandbox / Code Snippets /

Get past Symfony cache issues on your Vagrant Box

I use Vagrant for my development environments, but Symfony has some cache directories that need to be written, which was causing me issues. There are instructions on the 'Getting started' page as to how to cercumvent this, however none of them worked for me. After a little search I found the answer on ServerValt. Login into your Vagrant box...
Sandbox / Developer / Vagrant /

Vagrant Provisioning, getting set up

  • Written: 6 years ago
  • Category: Vagrant
  • Comments: 6
In the last article "What is provisioning? A brief overview", we discussed what provisioning is and why its really super useful. It was only an introduction to the principles of why we should use provisioning when setting up our projects, so if you haven't read it, give it a look now before we get started. To get started we need to tell Vagrant to use a provisioner. For the rest of the article I will be using Puppet. I talked in the "Getting started with Vagrant" article, about setting up the Vagrantfile and adding our box config. This is so when run the "vagrant up" command, we have a working Unix installation ready and waiting for us to communicate with. It is within this config file that we must add our extra provisioning commands...
Sandbox / Developer / Vagrant /

What is provisioning? A brief overview

  • Written: 6 years ago
  • Category: Vagrant
  • Comments: 2
Vagrant manages the machine you are creating for your project, the connection and port forwarding so you can communicate with it, but its just a blank Unix box. A blank box is fine if you want to install the software by hand and then configure it yourself, however what happens if you loose the box for whatever reason, and the software must be installed again? Ok, so now do this a few times and it will definitely be the dullest part of your day. This is where provisioning comes in, a provisioner allows you to automate the process of setting...
Sandbox / Developer / Vagrant /

Getting started with Vagrant

  • Written: 6 years ago
  • Category: Vagrant
  • Comments: 4
The first thing to do when started with Vagrant is to install box Vagrant itself and VirtualBox. Once they have been installed on your host (local) machine, its now time to tweak a couple of settings on your machine. These instructions will be for a Mac as thats what I am currently using, the settings are the same for both, but the process might be a little different on windows. Chances are that if you are using Linux then you already know this stuff and you're the master of the universe.
Sandbox / Developer / Vagrant /

Vagrant, a simple overview

  • Written: 6 years ago
  • Category: Vagrant
  • Comments: 1
So now that we have a general overview of what the hell Vagrant is and why you should be using it, there are a few bits that need to be explained before we can dive in and start creating local projects. Vagrant Boxes Boxes are at the core of Vagrant. They are a self contained operating system held within a file. They are not actually part of Vagrant, but VirtualBox, however the team behind Vagrant have been so kind as to make a central repository of Boxes that can be downloaded at vagrantbox.es. While you can download the boxes and store them on your computer, you can also just copy the URL and add it to your configuration file, so Vagrant will download and store it when it is creating your project. There are hundreds of boxes on vagrantbox.es, so incase you're not sure which to pick, the "Ubuntu precise 32 VirtualBox" is a good starting point. Basic Commands At its core, Vagrant is pretty simple, you have a handful of commands to create (up), restart (reload), access (ssh), suspend (suspend), switch off (halt) and delete (destroy). The rest is done from the configuration file and through the Chef or Puppet provisioning. So if we have a box ready to be made active with a configuration file in place, all we would do is write the following...
Sandbox / Developer / Vagrant /

What the hell is Vagrant?!

  • Written: 6 years ago
  • Category: Vagrant
  • Comments: 3
Good question! This is the first in a series of articles I intend to write on Vagrant and why its f*cking awesome! Vagrant is probably the most exciting thing to happen to local development environments since I first installed Xampp on my Windows machine and saw I had a working Apache environment all set up and ready to process pages just like the actual internet. No more FTP'ing files to a remote server before I can see if the two lines of code I changed actually worked! Mimicking the production environment So, if we have a working Apache setup, why bother spending time learning how to set...