5 ms·
Automating the setup of my perfect developer environment on OSX 10.8
- liamk 14y agoI've started doing something similar, except I also use vagrant to ensure that my development OS is the same as production. I also find it easier keeping everything for dev within a VM.
- nachteilig 14y agoI'm doing this too, and it's funny because one of the things I originally liked about OS X was that the UNIX roots allowed me to run my dev environment locally. Still, Vagrant makes this all pretty easy.
- roderikvdv 14y agoI'm a big fan of Vagrant but all our developers use MacBook Air's with 4GB memory and lots of different projects at the same time it's just a pain to use Vagrant. We compensated this by using a few staging servers and using Vagrant if there are issues at this level (almost never btw)
- FilterJoe 14y agoTerrific concept. What tools (if any) exist to do this kind of thing on Linux VM? Do they work equally well for non Ruby environments (I'm thinking specifically Python/Django)? I've spent the last week mucking around with VMware/bitnami to try to get a nice clean Python/Django/Pycharm VM for myself (with a template Django project that gracefully does both development and deployment). I'm almost done but what a long hard slog it's been.
- roderikvdv 14y agoOn linux it is even more easy, since most of the packages are in apt etc. Several recipes have a switch for use on our own servers and vm's: https://github.com/pivotal/pivotal_workstation/blob/master/recipes/wget.rb https://github.com/pivotal/pivotal_workstation/blob/master/r... And there is nothing in the result that has anything to do with ruby, just chef and the recipes are in ruby. We use it for setting up our dev environments and servers for PHP websites. Although we use Capistrano for the actual site deployment and not Chef.
- FilterJoe 14y agoroderikvdv's answer was helpful. I also found a long post discussing Django VMs specifically using vagrant: http://stevelosh.com/blog/2011/06/django-advice/ http://stevelosh.com/blog/2011/06/django-advice/
- jlarocco 14y agoIn theory this should be super easy on most Linux systems because of the software repos. On Debian based systems, on your existing development machine, you can do: dpkg --get-selections > installed_stuff.txt Then copy the file "installed_stuff.txt" to the new machine/VM and do: dpkg --set-selections < installed_stuff.txt It becomes a little more difficult when there are dependencies that aren't in the package system. Another thing I've found useful is to have a git repo with my config files. Then on a new machine I can clone the repo and have access to all of them. I've been meaning to write a script that copies everything to the right location, but haven't got around to it yet.
- roderikvdv 14y agoCheck out http://dotfiles.github.com http://dotfiles.github.com Most scripts have these bootstrap files, my dotfiles and more are based on this repo https://github.com/mathiasbynens/dotfiles https://github.com/mathiasbynens/dotfiles with a very good setup script.
- FilterJoe 14y agoThanks for that - looks like a huge time saver! Unfortunately, it won't fully automate setup. Things like entering passwords for a service you want to set up, tinkering with desktop, firefox or other app settings, etc. But still - this gets you a big head start.
- dhotson 14y agoBabushka is also great for this kind of thing: http://babushka.me/ http://babushka.me/
- sacrilicious 14y agoAbsolutely, similar-looking ruby, too. I was disheartened by the wheel reinvention, but to each his own.
- hockeybias 14y agoAlways entertaining to see phrases like 'perfect development environment' in the same sentence as OSX...
- jrogers65 14y agoEasier way to get a good development environment and not have to deal with a crippled window manager: http://www.ubuntu.com/ http://www.ubuntu.com/ On a more serious note, what is with the fad of running OSX and doing all of your work in a VM? OSX is terrible for anything serious and is enough of a pain in the ass that one must use a VM just to run their web application on their development machine. Why not just use Linux? Why not use Windows and run a VM in that? At least you'll get the benefit of being able to run more software. I'm finding it very difficult to understand the justification for such setups and, from personal experience, I find that it's better to avoid shops which operate in such a way altogether.
- zacharydanger 14y agoHe's not running his dev environment in a VM. Just automating the setup of an OS X box for development. It's worth noting that most of these recipes can be easily modified for use on Ubuntu.
- deanclatworthy 14y agoThat's not true. The author is setting up his development environment on the host machine (OSX)
- deanclatworthy 14y agoNot everyone has a say in the environment they use at work, and some people prefer using OSX for certain things. OSX has some decent tools for actually doing the coding in, for example. Regarding your point about just using Linux. Even if I did run Linux as my desktop machine, I'd still use VMs and Vagrant because it allows me to have an (almost) identical setup to production. It's also much easier to spin up virtual machines running different version of software using this method. Just change one line of config, wait two minutes to spin up and you're good to go. You also don't have all kinds of crap from other projects polluting your environment too.
- mitchty 14y agoAnd what if your development environment is for iOS apps? How will ubuntu help you out installing xcode? Ubuntu is not the end all of things. The "fad" of running things in a vm is so that you can validate that you've not forgotten something about your setup and deploy process. If you run it locally on your workstation that you've tweaked umpteen million ways you may have forgotten about some tweak you made and boom your deploy doesn't work. Fully automating a vm build and setup for local use helps work those kinks out. I'm not a web guy but do the same thing for my ec2 setups. Also some of use prefer not to use Linux or Windows as our workstation. At work now I am typing this on an Arch linux box, but prefer osx for regular use primarily because of the less bs situation. In addition using windows for the base os means things like having to deal with stuff like cygwin/etc.... and their stupid peculiarities and quirks.
- deanclatworthy 14y agoGreat post. I am currently doing something very similar and documenting the process :) I'd recommend chef librarian over soloist though.
- sciurus 14y agoI'll admit that I don't see what the advantage of soloist is. What I would probably do is build the runlist via include_recipe statements in pivotal_workstation::default. Then I would create a Berkfile (http://berkshelf.com/ http://berkshelf.com/) for it, use 'berks install --path' to bundle pivotal_workstation and all its dependencies, and tar that up and upload it somewhere. The bootstrap then becomes something like gem install chef echo {"run_list": "recipe[pivotal_workstation]"} > node.json chef-solo -j node.json -r http://example.com/pivotal_workstation.tar.gz The JSON could of course be customized if you needed to set any attributes.
- ritezel 14y agoCo-maintainer of pivotal_workstation and soloist here. The as-yet unreleased Soloist 1.0.0, head of master on https://github.com/mkocher/soloist https://github.com/mkocher/soloist, uses Librarian to yank in dependencies if you have a Cheffile. Soloist itself is just a tool to simplify generating a runlist and specifying node attributes. In fact, it just reads out of a single YAML file and does what that file says. It even gives you what might be considered role support. Plus we totally take pull requests!
- sacrilicious 14y agoVaporware at the moment, but keep an eye out for Github's https://github.com/boxen https://github.com/boxen which purports to do similar with Puppet. Demo'd here: http://www.youtube.com/watch?v=YlKXRdSAZhY http://www.youtube.com/watch?v=YlKXRdSAZhY While I'm linking up stuff, another take on masterless Puppet is https://github.com/unixorn/miyamoto https://github.com/unixorn/miyamoto So many of these systems are still too big and complicated. I consider myself an amateur, and therefore I bootstrap with manually getting Dropbox, 1Password, and then update babushka links to do the rest from the canonical sources via github.
- specialist 14y agoGreat tips. Thanks. I also use TotalFinder (tabbed finder replacement) as well as Asepsis (prevents .DS_Store files) from binaryage.com. I'm a Java dev, flipping back and forth between IntelliJ and Eclipse. Using Eclipse since the pre-1.0 alpha, I still find it more comfortable. But IntelliJ's rate of improvement has prompted me to use it more. I've become good friends with SSH. We do lots of deploy/ops work at this gig. I'd love to figure out how to put the remote host's hostname into the tab/title/prompt. I haven't tried zsh yet, not excited about putting zsh on all the remotes (which are a mix of Windows and Linux). Our databases are Oracle, SQL Server, some legacy mainframe stuff. I use Squirrel SQL. I don't like it much. I haven't found any generic SQL clients as clean and smooth as MySQL's Sequel Pro client.
- martinced 14y ago"I'm a Java dev, flipping back and forth between IntelliJ and Eclipse. Using Eclipse since the pre-1.0 alpha, I still find it more comfortable. But IntelliJ's rate of improvement has prompted me to use it more." I think you get it really backwards... Back in the days IntelliJ was just soooo much more better than Eclipse it wasn't even funny to compare the two. It was just plain sad. But... As a lot people predicted, Eclipse being Open Source and IBM having put some of its weight behind it, Eclipse started to get quite good. Nowadays Eclipse as nearly caught up and it's just a matter of time before Open Source, once again, shall win. It hasn't prevented me from buying IntelliJ at 70% during their doomsday sales. Anyway the "rate of improvement" you're talking about is definitely on Eclipse's side (and this come from some using IntelliJ since version 3 or 4, don't remember), not on IntelliJ. IntelliJ is still banking on its slight edge, but as time passes by that edge is eroding more and more...
- pretoriusB 14y ago>I think you get it really backwards... Back in the days IntelliJ was just soooo much more better than Eclipse it wasn't even funny to compare the two. It was just plain sad. I beg to differ. Eclipse always had a better model of the project and workflow for me. Never could tolerate IntelliJ. Now, IntelliJ indeed had _more_features_, at least back in the day, compared to Eclipse. But I always found the implementation cluttered and confusing.
- ylem 14y agoAnything similar for windows?