Live data from Hacker News

Faster Web Development With Virtual Machines at deviantART

dt.deviantart.com

31–40 of 46 posts

Re: Faster Web Development With Virtual Machines at deviantART

#31
Disclaimer: I am the creator of what I'm about to plug here.

If anyone is looking for an easy, low-risk, documented method of beginning development in VMs, check out Vagrant[1], which is what I wrote this for. Creating dev VMs from scratch is pretty tedious and there are a lot of steps involved. Vagrant abstracts this away and provides a tool to automate all of this in a reproducible manner.

[1]: http://vagrantup.com

Re: Faster Web Development With Virtual Machines at deviantART

#32
This reminds me of facebook development, where you need to have a live fqdn for all of your environments. We used to use a staging server and had a similar problem with huge amounts of small unnatural commits for things you would normally test locally. I ended up moving to using ssh tunnels to a server, where each dev has a subdomain redirecting to their dev box through the tunnel. This has the added benefit that you can work locally from anywhere you have wifi. Whether you use tunnels or VMs, both are a solid way to do development.

Re: Faster Web Development With Virtual Machines at deviantART

#33

Disclaimer: I am the creator of what I'm about to plug here. If anyone is looking for an easy, low-risk, documented method of beginning development in VMs, check out Vagrant[1], which is what I wrote this for. Creating dev VMs from scratch is pretty tedious and there are a lot of steps involved. Vagrant abstracts this away and provides a tool to automate all of this in a reproducible manner. [1]: http://vagrantup.com

I love vagrant! It was super easy to create an archlinux base box and i've been using chef to automatically provision environments. Setting up the environment for a new project takes minutes and is both totally automated and separated from my actual OS. Thanks!

Re: Faster Web Development With Virtual Machines at deviantART

#34

Disclaimer: I am the creator of what I'm about to plug here. If anyone is looking for an easy, low-risk, documented method of beginning development in VMs, check out Vagrant[1], which is what I wrote this for. Creating dev VMs from scratch is pretty tedious and there are a lot of steps involved. Vagrant abstracts this away and provides a tool to automate all of this in a reproducible manner. [1]: http://vagrantup.com

I started using vagrant last week to debug my Chef scripts and it is indeed awesome. Vagrant uses Chef (chef-solo) configure your VM from bare image to working server.

I see that is has a plug in system for other provision systems like Puppet, but the chef support works great out of the box.

I was hoping to contribute to the project by integrating fog the ruby library which talks to many cloud systems including EC2 so someone could build an image via Chef or Puppet, dev and test in their image, then provision and upload to the cloud. Could probably do this without integrating with vagrant by building a clever rake or capistrano script.

Re: Faster Web Development With Virtual Machines at deviantART

#35
Another benefit of this approach is that it takes seconds to revert to a good state if you destroyed your dataset in a mishap. use snapshots or just restart VM from original image. all while using your preferred code editor (the app source is mounted from the host OS)

Re: Faster Web Development With Virtual Machines at deviantART

#36

It's not clear to me why they don't just run development on their local machines. I'm not familiar with PHP, though. I'm all for having a build/test vm, though.

Any moderately complex app has a few moving parts. At least you have the web server and the DB. The DB has settings like the default character set, table types etc. These have to be kept in sync across all instances, dev, stage, and prod. The web server also has modules and a conf file with mod_rewrite rules which change and should be kept in sync. Sometimes you update a library or a version of ruby. Add a noSQL server, message bus, file storage, email, etc and you can see how it becomes a serious issue. And the problem grows exponentially the more developers there are each with one or more dev instances which have to get the latest changes and be kept up to date.

These things all have to be dealt with and should not be thrown over the wall and "let the sysadmin deal with it." That's where the value of the OS and infrastructure is a set of code and config files which are kept in source control next to our code and versioned with it is so valuable. Run "vagrant up" and a fresh consistant build every time. Then develop in php, python, perl, ruby or brainfuck if you want.

Re: Faster Web Development With Virtual Machines at deviantART

#37

I only skimmed the article but I assume it’s about the benefits of running VMs to have solid dev environments with zero setup cost. Let me ask another question: Will it become feasible to move code, tools and everything else into web services? Imagine you have your favorite editor (emacs, TM, vim) running in a browser window. Only that it’s live-updating like, e.g., Ethercodes or Wave. And you have very straight-forw…

I'm sure it will happen one day, but it's quite a big challenge and you're up against all those bad habits build over the last 20 years. For example, developers really like customization. It's quite hard to provide a hosted environment that is fully customizable.

Also, parenthesis mismatch in paragraph 3.

Re: Faster Web Development With Virtual Machines at deviantART

#38
If commits were an issue before this, they should really have considered using git or something. You shouldn't aim for fewer commits, but less expensive commits, i.e. nothing goes over a network. Plus you can squash later if you really need to.

Anyway, VMs are cool but has anyone tried developing with NixOS? It seems even more suited for the tasks they want since it has rollbacks and so on: http://nixos.org/

Re: Faster Web Development With Virtual Machines at deviantART

#39
Having a VM you can trivially reimage is very helpful because you can test that (re)deploying packages to it is going to work, you didn't miss any dependencies that happen to be present on your desktop but not on your production servers, and uninstall won't leave cruft behind.

Re: Faster Web Development With Virtual Machines at deviantART

#40
post #2

After talking with a few small PHP teams this seems like the logical conclusion whenever growing a team of PHP developers. Its just very hard to perfectly recreate your server environment locally on multiple OS's. Its a great solution, but I much prefer working with RoR or Python/Django where recreating the server environment locally is much easier.

Your last sentence is an example of when I would like to vote "my displeasure" with a down arrow.

As others have mentioned, you make a bold claim, yet fail to give anything concrete as proof that it is "much easier".

Post reply on HN