Ask HN: Save developer time by automating setup?

13 points by xcbnxcbxmcb ↗ HN
As a (self-claimed) advanced developer with 8 years experience (big company, start-up and freelance), I waste a lot of time when I am starting new web projects - researching and installing all necessary run-times & frameworks, creating a new project and then configuring it to work with the DB, mailer etc. All this saps up a lot of time and energy that I feel is better spent actually building my web application.

With a new technology stack, it could be the better part of a day or two (think Ruby on Rails and MongoDB for Windows). When it's a stack I'm very experienced on (say Linux, Nginx, Play Framework, MongoDB), my local setup is quite short (maybe 5 minutes or so) but I still spend a couple of hours or more setting up a new server from scratch, buying a domain, setting up A records, etc. There's also another issue with my local machine becoming a garbage bin with all sorts of DBs, frameworks and IDEs.

Somehow, I feel setting up your machine is a "solved" problem, since I always find my answers on one of the StackExchange sites. I've toyed with building a platform where, in a few seconds, you would have a private VM ready with your chosen stack setup and a new project created with all the right configuration. The only problem is that you would need to code on the VM (in a cloud IDE or through a terminal)

Do other developers on HN also think of this as a problem? Or do you see any allied problems (like getting a new team member to setup everything just right)? Or would a platform that automated setup not be worth your while to use?

11 comments

[ 2.3 ms ] story [ 30.7 ms ] thread
heroku solves half of the problem. You could do something on top of heroku or one of the open source heroku clones.

also take a look at vagrant

Vagrant.
All-in-one solutions (Nitrous, RunKite) provide cloud IDEs and servers, letting you get up and running fast.

PaaS providers (Heroku, DotCloud) host your app, so you don't even have to worry about servers.

Virtual machine tools (Vagrant, VirtualBox, VMWare Fusion) let you run your production setup locally without having to SSH into a remote host.

Laptop configuration (GitHub's Boxen, Pivotal's sprout) let you configure your laptops just like servers.

I'm also working on a project (http://www.stackmachine.com) to solve some of these problems.

Thanks for the great list of tools to explore. I had already tried out Heroku, Nitrous and VirtualBox but new to everything else on that list. I'm trying those out now and have also signed up on StackMachine... most of the tools solve only a part of the problem but I guess I need to figure out the combination to use.
I see a few reasons why this problem has been hard to crack:

1. A week or so of struggling to get a new box set up is acceptable if you're prepared to use it for at least a few months

2. Developers are very particular about environment choices, example: choosing between rbenv, rvm, chruby

3. Mac OS X and Windows developers lag behind in solid package managers, and virtualized dev environments have little (albeit growing) mindshare

I think the right solution will look something like containers/VMs via tools like Docker/Vagrant combined with configuration management tools like Chef/Puppet/Salt/Ansible. Configuration management hasn't taken off though yet among developers and is still mostly perceived as a sysadmin skillset.

I'm new to Vagrant and Chef but a quick walk through the docs and your idea of container + config management sounds extremely powerful! Chef even has recipes to setup applications and combining that with a PaaS/IaaS should automate all machines.
I've just begun capturing my set up using ansible playbooks. Hopefully after this I'll have an environment that is consistent across development and production machines and encapsulated the process of development and deployment in a consistent way for all the platforms I care about.

At the moment, I'm at the point where the same playbook can be used to set up a vagrant VM, my local laptop, and my digital ocean VM. The next step is to work some docker stuff into it.

TL;DR: ansible +1

You need to learn Vagrant and chef or puppet. It will solve all but 90% of your headaches. The domains/A records issue is still a problem, though. I've been looking for something for that too.
If you're just looking to manage your personal environment, probably Vagrant + Chef. If we're talking about for a team or organization, a former co-worker of mine wrote a nifty tool called Boxen [http://boxen.github.com] that's definitely worth checking out.