![]() bash_aliases file, installed Apache, set up 2 vhosts, installed pHP 5.4 along with 5 PHP modules, installed PEAR, XDebug, XHProf and Composer. ![]() In 100 lines, you’ve installed several server tools ( build-essential, python-software-properties, puppet-lint, vim, curl, zip), created a. To install Apache, for example, you would do:Īpache::vhost Puppet uses a DSL, which is a fancy term for, “This language we invented”, to install software. Puppet is powerful, logical and appears to be favored more by true dev ops (of which I am not one). Why? Because I Chef is geared more toward people familiar with Ruby, I couldn’t get Salt’s hello world working, and terminal commands are hard to maintain. To handle installing software on your VM, there are several tools available to you, including Puppet, Chef, Salt, or god forbid straight terminal commands and bash scripts. You could install everything by hand, but that sounds like work and no one likes to work! Puppet Great, you’ve got a VM up and running… now what? How do you make it useful? You need Apache, PHP, MySQL, XDebug, XHProf! Or Nginx, Postgresql, MongoDB! You can check to see that the shared folders are actually set up: You now have a fully functional virtual machine! What, you don’t see it? That’s because it’s invisible by default! To access your new VM, just $ vagrant ssh and Vagrant will connect you to your VM via SSH. To get Vagrant working, you simply open the terminal, cd into the folder where the Vagrantfile is located and run $ vagrant up. ![]() Here we have named our box, precise64, we have told Vagrant where to download the box if it has not done so before,, we give the box its own local IP address, 192.168.56.101, and we set up shared folders between our operating system ~/www and the VM /var/www Kick it off synced_folder "~/www", "/var/www", id: "vagrant-root" end They’re basically minimal images using the VM provider of your choice (VirtualBox, VMWare, and others).īoxes, get it? Vagrants (homeless people) live in boxes? Classy!Ī typical, minimalistic Vagrantfile may look like The operating systems must come in prepackaged files called boxes. The official ones are all Ubuntu flavors, in both 32 and 64 bit architectures, but there’s a ton of operating systems to choose, from Debian to CentOS, to more esoteric ones like Amazon, DigitalOcean and Rackspace. ![]() You start by deciding what operating system you want to use. Enter VagrantĪ vagrant file is really just a single, small, easy to understand text file called … “Vagrantfile”. There’s also no way for me share my VM with other people, unless I want to upload a 1GB file to the internet, not once but everytime I change something on it. If you screw your system up, and you will, you have to start over from scratch. It has over 30 steps, takes over 15 minutes to complete from start to finish (after you’ve done it several times), and is error prone because people fat-finger their keyboards.Įvery time I needed to make a change on the virtual machine I would walk on egg shells. Why not manually manage a virtual machine?Ī year or so ago I wrote a long-winded tutorial on setting up a Debian virtual machine using Virtualbox. It helps you create a new VM from the ground up, and allows you to destroy it at will. Simply put, Vagrant makes virtual machines disposable items. Eliminate inconsistencies between your development environment and your production environment by mimicking prod as close as possible. Nothing makes me go into table-flipping mode faster than this phrase. Some programs on your daily OS may interfereĭid you know Skype uses port 80 by default, unless you tell it otherwise? What other programs that you use may interfere in unknown ways with a server? It works on my machine If PEAR is no problem for you, think about how involved tools like memcached, APC, Gearman, etc, are to install on a proper server and then think about the steps that may require to be different on a non-server OS. PEAR is old, it should work 100% of the time. Attempting to install any PEAR packages would cause my hair to fall out. I used to develop using XAMPP on Windows. So why would you want to give this up and use a slow, bulky and cryptic virtual machine? Some tools are difficult to install Tools such as XAMPP, MAMP, Homebrew, etc, make installing a basic LAMP stack on your computer extremely easy. PuPHPet is an unpronounceable GUI tool to help take the pain out of working with both! Why should I use a virtual machine?īeing a PHP developer has a much lower barrier to entry than Python, Ruby. Puppet is a command line tool to install software on virtual machines. Vagrant is a command line tool to manage virtual machines.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |