Assistance setting up an efficient vagrant system

3

first time on superuser; I'm a novice trying to move from humble local wamp development to a more professional and productive vagrant/linux environment

At the moment I have a basic vagrant file which is

Vagrant.configure("2") do |config|
    config.vm.box ="precise32"
    config.vm.box_url = "http://files.vagrantup.com/precise32.box"
    config.vm.network :private_network, ip: "192.168.33.10"
    config.vm.synced_folder "./", "/var/www/"
end

Once inside the VM via ssh I continue by installing apache2 php5, npm, gulp,composer,laravel etc... literally everything I could want for efficient development.

Then if I start a new project I have to set all this up again, I know I can set a bash script to automate the process by adding config.vm.provision :shell, :path =>'file.sh' but everything still has to get downloaded. How can I use the already downloaded versions in many projects?

Does anyone have tips / good setups their willing to share with a novice.

[please don't suggest chef/puphpet, I create basic packages with them and get a load of errors on vagrant up which are beyond my technical understanding of fixing]

Kie

Posted 2014-03-22T09:43:57.813

Reputation: 31

Answers

1

Try using PuPHPet as it helps you create everything needed for web dev.

Also, you shouldn't modify the operating system settings without applying those modifications in Vagrant settings file. The whole idea around vagrant is that you can seamlessly destroy and recreate the env in minutes without worrying about the configuration. If you modify the os outside Vagrant than you loose the changes once you destroy it.

Alexandru Savin

Posted 2014-03-22T09:43:57.813

Reputation: 113

0

Probably the easiest is to use the vagrant-cachier plugin.

Another option is to use a caching proxy server (like polipo) and the vagrant-proxyconf plugin. The catch here is that the proxy server can't cache HTTPS traffic without SSL injection hacks.

tmatilai

Posted 2014-03-22T09:43:57.813

Reputation: 1 892