Live data from Hacker News

Ask HN: Best practices for OS X dev environments

news.ycombinator.com

51–57 of 57 posts

Re: Ask HN: Best practices for OS X dev environments

#51
post #31
post #23

Earlier quoted context omitted.

Docker just spins up a VM on OS X with boot2docker so you don't get any real benefit here.

Yep, although it creates only one you can run a bunch of containers in it. It feels almost as a native support, but the hack is betrayed by the networking setup. I wish it would be possible to just expose ports on the real localhost.

Absolutely, I should have specified 'a single vm' in my response. I didn't understand that when I was first trying to understand boot2docker, and now I'm using imprecise language to help confuse others. Thanks for clarifying.

Re: Ask HN: Best practices for OS X dev environments

#52

Earlier quoted context omitted.

I've never used Chef, with or without Vagrant, but I have used Puppet. It's generally better to have a shell script install your provisioning tool, or use a box that already has it installed, than depending on Vagrant to do anything for you. Here's a simple example: https://github.com/puphpet/puphpet/blob/master/archive/puphp...

...or switch to a provisioning tool that doesn't need to be installed on guest VMs (e.g. Ansible), saving a little time every time you provision. Otherwise, another option is to either use prebuilt Vagrant boxes with your CM tool already installed, or build your own using Packer.

I liked Ansible a lot; during our evaluation I had a single Ansible file provisioning a sample dev setup in around 50 lines. We need to support windows servers primarily, much to my objection, so the 'blessing' of the machine to automate Ansible on windows required a manual step at the time, which wasn't acceptable for our use case. We ended up picking chef, both for it's more agnostic approach to OS's, but also it's much more developer friendly, regardless of it's overly verbose generators, git repository litter, and quirks that still have me scratching my head.

Re: Ask HN: Best practices for OS X dev environments

#53
post #42

It is interesting to see everybody using VM's and containers. Personally I have a web server I do all my work on, so I can get to that from my mac over: http, ftp, ssh, and vnc. I do all my work online so I can easily point any device (or ask a friend with an exotic device to click a link to test something) and I can also work from any device with an internet connection. This setup has let me be flexible, travel, wor…

That's what git is for, I don't see how a webserver could replace several vagrang boxes

Re: Ask HN: Best practices for OS X dev environments

#54
post #45
post #25

Earlier quoted context omitted.

How do people find the battery life overhead? A quick test showed a Flask dev server tool 25% in a VM compared to less than 2% natively. That would seriously restrict my ability to develop on the move or away from my desk.

First, 25% of the VM's CPU (seen in the VM's "top") is not the same as 25% of the host CPU. Second, do you develop on the move unplugged for large stretches of time? Where is that place that doesn't have a plug?

> First, 25% of the VM's CPU (seen in the VM's "top") is not the same as 25% of the host CPU.

I'm talking about host CPU

> Second, do you develop on the move unplugged for large stretches of time? Where is that place that doesn't have a plug?

Anywhere with sunshine and fresh air. We don't get many sunny days in the UK and I'm damned if I'm spending them indoors.

Re: Ask HN: Best practices for OS X dev environments

#55
post #54
post #45

Earlier quoted context omitted.

First, 25% of the VM's CPU (seen in the VM's "top") is not the same as 25% of the host CPU. Second, do you develop on the move unplugged for large stretches of time? Where is that place that doesn't have a plug?

> First, 25% of the VM's CPU (seen in the VM's "top") is not the same as 25% of the host CPU. I'm talking about host CPU > Second, do you develop on the move unplugged for large stretches of time? Where is that place that doesn't have a plug? Anywhere with sunshine and fresh air. We don't get many sunny days in the UK and I'm damned if I'm spending them indoors.

Well, if you're based in the UK, you should be alright with an 8 hour battery to make it through those sunny days without recharging.

Re: Ask HN: Best practices for OS X dev environments

#56

Earlier quoted context omitted.

It's called Docker.

Docker is not a VM and only works on Linux.

boot2docker is a commandline interface to docker that works on Windows, Mac and Linux. (Maybe *BSDs too.)

On non Linux systems, it downoads a prebuilt VM, and runs it with Virtualbox.

This is how Docker currently works on other OSes.

Re: Ask HN: Best practices for OS X dev environments

#57
post #55
post #54

Earlier quoted context omitted.

> First, 25% of the VM's CPU (seen in the VM's "top") is not the same as 25% of the host CPU. I'm talking about host CPU > Second, do you develop on the move unplugged for large stretches of time? Where is that place that doesn't have a plug? Anywhere with sunshine and fresh air. We don't get many sunny days in the UK and I'm damned if I'm spending them indoors.

Well, if you're based in the UK, you should be alright with an 8 hour battery to make it through those sunny days without recharging.

That's my point. This would be an extra 20-25% on top of what I'm already getting.

Which is a big chunk of time.

Post reply on HN