Automating the setup of my perfect developer environment on OSX 10.8
vanderveer.be
vanderveer.be
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.
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.
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.
But still - this gets you a big head start.
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.
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.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!
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.
https://github.com/roderik/pivotal_workstation/blob/master/t...
As for the prompt, also included in the bash-it theme
https://github.com/roderik/bash-it/blob/master/themes/roderi... screenshot: https://f.cloud.github.com/assets/16780/35890/82d9d2fa-5290-...
I also use TotalFinder, but it seems this is one where my discipline didn't hold up, i installed it by hand :)
Eclipse should be easy, and IntelliJ is almost the same as phpstorm, the recipe for that is in the repo.
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...
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.
Still, Vagrant makes this all pretty easy.
We compensated this by using a few staging servers and using Vagrant if there are issues at this level (almost never btw)
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.
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.
The other side of solving this is writing tests to check that, for instance, a particular language extension is loaded. The application should be throwing a fit if something is missing in the environment.
This blog post is a good start but if you have an osx environment you can setup netboot and have a truly automatic install+setup with chef.
I'm a bigger fan of using chef/puppet/whatever over personal shell scripts as then you can test your automation out in a vm. I just build osx vm's and validate my osx automation with that.
Also, Instruments.app (dtrace frontend) is awesome.
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.
It's worth noting that most of these recipes can be easily modified for use on Ubuntu.
Even if you use Linux you are better of doing all your work in a VM. Reproducibility, sharing, snapshots, isolation, multiple VM for different target environments, etc.
>OSX is terrible for anything serious
Citation needed. What exactly does "serious" mean to you? Several multi-billion companies have their developers working on OS X machines.
And If I want to do something with something like Premiere, Photoshop et co (it is 2012 after all, multimedia is not an afterthought), I'm dead in the water in Linux. Not at all good for serious work.
>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?*
If your needs are simple enough that you are OK with running a single web server with a single set of libs and frameworks, by all means use Linux. It's not like todays "development machines" just need a single Apache and MySQL.
For anything more serious, use a VM, either in Linux or OSX or whatever.
I might need to run 5-6 different DBs, or versions of a DB/Server/Caching/Proxies/etc depending on the project I'm working on.