Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set up Vagrant box exactly like production server

I'm trying to learn how to use Vagrant with the idea of setting up a development environment that should be exactly (if possible) to an already existing production server.

The question here is: what is the easiest way to accomplish that?

I'm a developer and I have full access to the production server, but it's not managed by me. I just know my way around the server a bit to set up websites, work with cPanel, some WHM, etc...

The server runs CentOS 6.5 with Apache, MySQL and PHP.

Is there a way I can "export" that server's configuration with all the applications it has, modules, versions, etc... and use that to create a Vagrant Box? Or is it a matter of manually analyzing everything and writing it down?

If the way to go is the second option, can I get any advice on how to do that without missing anything?

like image 639
Albert Avatar asked Oct 11 '14 06:10

Albert


People also ask

Is vagrant suitable for production?

Unfortunately, the Vagrantfile doesn't contain enough information to build a proper production environment with industry best practices. An Appfile is made to encode this knowledge, and deployment is a single command away.

What is the difference between vagrant and VirtualBox?

Vagrant can be classified as a tool in the "Virtual Machine Management" category, while VirtualBox is grouped under "Virtualization Platform". Some of the features offered by Vagrant are: Boxes. Up And SSH.


1 Answers

This should solve your problem: http://www.vmware.com/products/converter

The idea is to export your existing production server to an image that can be imported into Virtual box :

like image 84
user345602 Avatar answered Sep 27 '22 15:09

user345602