Hi there,
If you are a web developer, and your terminal is Windows machine.
I am sure you must have faced many hurdles in your development tasks, as most of web hosting servers are Linux based. And doing development on windows, testing deploying on Linux may raise bugs due to environmental differences.
So its best to have development environment, similar to your UAT and Prod environment.
This leaves you with several options.
Well I will not waste any time by giving exact definition what exactly is vagrant, for that please click here.
In simple words, Vagrant provides you ready boxes to create VMs on your local machine.
Once you install Vagrant, it installs virtual box as well. In case you want to increase resources on your VM, you need to tweak same on Virtual box config.
So why its good as compare to managing VMs?
Vagrant.configure("2") do |config|
config.vm.define :lamp do |lamp|
lamp.vm.box = "ubuntu/bionic64"
lamp.vm.network "forwarded_port", guest: 3306, host: 8306, protocol: "tcp"
lamp.vm.network "forwarded_port", guest: 80, host: 8380, protocol: "tcp"
lamp.vm.hostname = "lamp"
lamp.vm.synced_folder "local/", "/home/jthakar/local"
end
end
That's all for this post.
If you are a web developer, and your terminal is Windows machine.
I am sure you must have faced many hurdles in your development tasks, as most of web hosting servers are Linux based. And doing development on windows, testing deploying on Linux may raise bugs due to environmental differences.
So its best to have development environment, similar to your UAT and Prod environment.
This leaves you with several options.
- Get hosted linux server - good option but price can be issue for some of us.
- Get a separate machine to run linux and use it as dev env.
- Install VM ware, Virtual box and manually manage VMs on your windows terminal.
- Use Vagrant.
Well I will not waste any time by giving exact definition what exactly is vagrant, for that please click here.
In simple words, Vagrant provides you ready boxes to create VMs on your local machine.
Once you install Vagrant, it installs virtual box as well. In case you want to increase resources on your VM, you need to tweak same on Virtual box config.
So why its good as compare to managing VMs?
- Installing VMs will take time, on Vagrant it just takes time on first as process downloads vagrant box. (vagrant box is equivalent to iso).
- Creating deleting vms takes hardly minute.
Vagrant.configure("2") do |config|
config.vm.define :lamp do |lamp|
lamp.vm.box = "ubuntu/bionic64"
lamp.vm.network "forwarded_port", guest: 3306, host: 8306, protocol: "tcp"
lamp.vm.network "forwarded_port", guest: 80, host: 8380, protocol: "tcp"
lamp.vm.hostname = "lamp"
lamp.vm.synced_folder "local/", "/home/jthakar/local"
end
end
That's all for this post.
No comments:
Post a Comment