vagrant


Mar. 5, 2015

Homestead provision

Laravel Homestead commands: Available commands: destroy Destroy the Homestead machine edit Edit the Homestead.yaml file halt Halt the Homestead machine help Displays help for a command init Create a stub Homestead.yaml file list Lists commands resume Resume the suspended Homestead machine run Run commands through the Homestead machine via SSH ssh Login to the Homestead machine via SSH status Get the status of the Homestead machine suspend Suspend the Homestead machine up Start the Homestead machine update Update the Homestead machine image There is missing provision command Solution is: list all vagrant instance $ vagrant global-status id name provider state directory ------------------------------------------------------------------------------------- 6e1aa44 default virtualbox poweroff /Users/[whoami]/.composer/vendor/laravel/homestead then run provision with id $ vagrant provision 6e1aa4

Feb. 26, 2015

My Vagrant LAMP stack

I was using Vaprobash as basic starting Vagranfile which is working perfectly ‘post is here’. However, there are too many settings I will never use, I think it’s a better idea I make my own Vagranfile. I vagranted up a new empty box, and run each commands to setup my LAMP environment, and recorded each command to shell scripts, that make sure all commands are just what I need. Download my Vagrant LAMP: My Vagrant LAMP TODO: remote call shell scripts like Vaprobash use puppet might be better

Feb. 6, 2015

Vagrant Move Project Directory

I started to move my development works on my local envirnoment setup to Vagrant. Since I like to reinstall my system once major update released like Mac OSX 10.9 to 10.10, this will save lots of time for me. And also, I watched this video Get Off MAMP on Laracast to push me move to Vagrant. Recently, I have moved one of my projects to a new directory, and it told me path is not correct once I vagrant up my project. Becuase I am using Vaprobash as basic start Vagrantfile, it is using NFS to sync folder between your local and box, which will modify /etc/exports. What I need to do after I move existing project to another directory, I just need modify /etc/exports and update the directory path to new one.

Jun. 20, 2013

Jekyll and Vagrant

Sometimes I want to run jekyll on office’s computer which is using windows. I dont want to spend too much time to setup ruby or compile setup on windows, or even install linux on office’s computer. Vagrant is a quick virtual machines to do the work! Follow the instruction on vagrant website, and vagrant init in your project folder. Then open Vagrantfile to configure Vagrant Vagrant.configure("2") do |config| config.vm.box = "precise32" config.vm.network :forwarded_port, guest: 4000, host: 4000 config.vm.provision :shell, :inline => "sudo apt-get update && sudo apt-get -y install build-essential ruby-compass && sudo /opt/vagrant_ruby/bin/gem install jekyll rdiscount --no-ri --no-rdoc" end Then you are ready to start VM $vagrant up $vagrant ssh $cd /vagrant $jekyll server After vagrant up successflly. You should be able to visit via http://localhost:4000 by your web browser.