Increase disk space of a vagrant machine

October 26, 2016

Lately I came across a rather big problem of vagrant: Increasing the disk space, because the normal 40GB were in use. There are options to increase RAM or CPU count easily. You can change it like this:

So my thoughts were, that there must be a similar option to disk space as well, but there wasn’t. After some research I found out, there was no easy solution to that. There are already some solutions though, but nothing worked for me completely. I’m currently mainly using kaorimatz ubuntu 16.04 iso. One point which wasn’t working for me is, that other machines used lvm2 as a volume manager. Second problem was, that some people’s new increased hdd’s got attached automagically to the vagrant machine, even though it should give an UUID conflict. So I had to go for my own solution, which is a combination of various solutions out there. I hope this is of any use for someone else out there, who was as frustrated as I was.

read more …

Creating your own PHP dev-env in Vagrant: Bonus 2

June 3, 2016

Table of Contents

Part 1

Part 2

Part 3

Bonus 1

Full Code Base on GitHub

Slowly but surely we get to the end of this series. In this last post, I will write about database access from the host system, while your database is running on the guest machine. Therefore I will present two strategies to do so. Sure you also can

via the terminal and access the database on the CLI. But viewing and fast editing of some tables is much more comfortable from a GUI. In this post I will go over two MySQL applications: MySQL Workbench and PHPMyAdmin. While the Workbench will be installed on your host system and access the database via ssh, PHPMyAdmin will be installed on the guest system, on the existing apache web server. Here we are able to access it over the hosts browser like our web app.

read more …

Tags

Creating your own PHP dev-env in Vagrant: Bonus 1

Table of Contents

Part 1

Part 2

Part 3

Bonus 2

Full Code Base on GitHub

In the previous posts we’ve successfully set up a development environment for PHP. In the following posts I will present some bonus things, which you can do, to optimize your work with vagrant. In this post I will show you how to set a virtual host in apache inside your guest system. Because IP addresses can be forgotten quite easily, it’s much more handy to have a short named address under which you can access your web app. In this project we will create a virtual host for our main project directory called mysite.dev. So let’s get started!

read more …

Tags

Creating your own PHP dev-env in Vagrant: Part 3

Table of Contents

Part 1

Part 2

Bonus 1

Bonus 2

Full Code Base on GitHub

In the previous post we’ve set up the apache web server successfully. Now it’s time to add MySQL and PHP to finish the LAMP stack.

read more …

Tags

Creating your own PHP dev-env in Vagrant: Part 2

Table of Contents

Part 1

Part 3

Bonus 1

Bonus 2

Full Code Base on GitHub

 

In the last post we installed vagrant and enabled the vagrant settings we need in the vagrantfile. We have set a base image of ubuntu 14.04, made a synced folder and enabled a private network connection between host and guest system. Now it’s time to write our first shell scripts, which will configure our guest system to serve as a web server.

read more …

Tags