RambleOn

Like a jazz riff, but with words.

Notes on Development Installs

Most of my colleagues and I on our engineering team for our initiative at work (a designer, software developer, sysadmin, and me – the wildcard draw four) just received new laptops last week, and Daniel (the sysadmin) and I have been putting together some instructions on setting up the development environment and software. We get to finally get them off Snow Leopard and onto Lion. Just in time for Mountain Lion.

I’ve been using my personal laptop for work ever since I started back, and that one had been done via a migration, so there’s years of built up tools and apps, so starting new gave me a chance to document all the apps I use for work (either free apps or ones I’ve bought)

A note about our development

We are a primarily a Ruby on Rails shop for all our development – though we have a few Wordpress/WordpresMU installs, and a Drupal install that is used as a content creation system for published content to www.extension.org (a Ruby on Rails app) and a content management system for administrative documents. You can see all our projects in GitHub.

We follow a “develop local” model, all our apps have to work locally (this seems old hat now, but we were doing it before it was fashionable, and you’d be surprised/saddened at how many higher education shops develop “on the server”). We use Pow for serving the rails apps, and with one exception (me), most use MAMP for serving PHP and using MySQL. We are considering using vagrant and setting up an Ubuntu VM to match our server configuration, but aren’t there yet.

We deploy to either a demo or development server, and depending on the app, we may have a staging server as well. We use capistrano for deployment, even for our Drupal and Wordpress deploys. We log deploys and announce them in our campfire chat room using an add-on to capistrano we wrote.

We use RVM to manage rubies and gemsets. I tried rbenv, and maybe it’s the sysadmin in me, but I didn’t like it as much – while I know there’s an add-on that does “gemsets” for rbenv, I like the native gemset support. I still think RVM is easier to get setup and going in a team, and Jewelry Box can make it even easier. Still, I’m definitely looking forward to Tokaido.

That’s us in a snapshot, here’s our checklist for the system installs:

Lion Notes

  • FileVault (full disk encryption) should be enabled, totally the right thing to do.
  • Natural scrolling is the default: you probably want to change this.
  • Apple doesn’t include Flash, which is a good thing for the most part, but you’ll probably need to install it for some things, like auto-tuned Dale Jr. videos

SSH Notes

Make sure to get your ssh keys (~/.ssh/id_rsa and ~/.ssh/id_rsa.pub) off your old macintosh (and copy the ssh key password from the keychain on your old Macintosh)

Add the following to your ~/.ssh/config file – this will help keep ssh connections open on remote networks, particularly wireless networks:

Host *
   ServerAliveInterval 120
   ServerAliveCountMax 3  

Getting your compile on

(steps numbered because order matters)

  1. Download the OSX GCC Installer (Prebuilt, 10.7 Lion)
  2. Install Xcode tools (version 4.3 from the Macintosh App Store)
    • Install command line tools inside of Xcode

Homebrew

Installation information

Install the following (brew install blah)

  • wget
  • libxml2
  • libxslt
  • imagemagick
  • mysql

other optional installs

  • git
  • pv (useful for database refresh scripts)
  • r (will need gfortran)

Getting your git on

RVM

Installation information

  • Need to have 1.9.3 and REE
  • per-app gemsets (rvm use rubyversion@appname --create)
  • create .rvmrc file in app directory (rvm use rubyversion@appname --create)
  • install bundler (unless you add it to the global gem set)
  • install powder (if not in the development block of the Gemfile already, which it should be)
  • Setup a proper build for nokogiri: bundle config build.nokogiri --with-xml2-include=/usr/local/Cellar/libxml2/2.8.0/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.8.0/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26
  • bundle install
  • Jewelry Box (gui for RVM)

MAMP

Download

if using MAMP, use custom my.cnf (Applications/MAMP/conf/) to allow importing large db’s (darmok, create). Note: you will have to create this file, it does not already exist. Sample my.cnf and instructions on how to modify apache config to only listen on localhost – Daniel’s gist

Install the timezone tables:

/Applications/MAMP/Library/bin/mysql_tzinfo_to_sql /usr/share/zoneinfo/ | /Applications/MAMP/Library/bin/mysql -uroot -p mysql

Optional/Advanced: Brew MySQL Install

Please note: means you have to do your own PHP environment somehow, also doesn’t include a database management tool – you’ll want something like Querious or MySQL workbench

POW

Installation information

  • use powder gem to link the app (see RVM above)
  • powder open will open the default browser with “http://appname.dev
  • Pow 0.4 now includes an option for accessing the app from other systems. (not yet explored by Jason and Daniel)

Applications

Jason’s List of other Useful Applications

Macintosh App Store (MAS)

  • Evernote: (free – yearly service subscription available)
  • Skitch: (free)
  • Patterns: regex tool ($2.99)
  • Growl: ($1.99)
  • HTTPClient: debug HTTP requests in a GUI ($1.99)
  • Reeder: GREAT google reader “client” – also available for iOS ($4.99)
  • Meme Generator: (free)
  • Pixelmator: nice alternative to Photoshop ($$$) for simple things ($14.99)

Other applications (may be available in MAS as well)

  • Mailplane: GREAT front-end for gmail ($24.99) (also in MAS)
  • Alfred: App Launcher (free, has $ addon) (also in MAS)
  • Adium: IM client (free) – see also Xtras
  • Propane: nice campfire client ($20)
  • 1Password: GREAT password manager ($49.99) (also in MAS) particularly useful when combined with Dropbox
  • Querious: nice mysql management tool ($29)
  • Tower: nice git gui ($59 – I got it on sale, not sure I’d have leaped in at $59)
  • Fluid: create site-specific browsers (free/$4.99 gets extra features)
  • RStudio: GREAT front-end to R (makes using R approachable) (free)
    • Note: if using brew version of r: ln -s "/usr/local/Cellar/r/2.15.1/R.framework" /Library/Frameworks

Other tools

  • Zsh (using “Oh My Zsh”)
  • Pry
  • Linking to dotfiles in dropbox

Keynotes That Matter

I absolutely love the O’Reilly OSCON conference. It is one of the few conferences that align technology and passion in a direction that lends itself to meaningful change – both in the technologies themselves, but in how those technologies are applied. Very rarely at a conference are you going to hear about the technical issues parsing local government data sources in one session and the guts of Node.js in the next.

Last year, I came away completely inspired by the voices in the keynotes – particularly Eri Gentry and Ariel Waldman in the regular OSCON keynotes and Steve Yegge in the OSCON Data keynotes. Each focused on real problems, real open source and things that were “stuff that matters” as Tim O’Reilly himself exhorted of the community just a few years ago.

Maybe their keynotes were an ideal alignment for me, the intersection of science, and health, and software, and data. Maybe I’m just a year older and more jaded.

But this year the keynotes are so far nothing like last year. While the keynote that Dave Eaves presented resonated with me, as well as most of Tim O’Reilly’s message – the rest of the keynotes seem like empty sales pitches for the sponsor organization at best.

In summary – “We are [HP|Microsoft|Bluehost] and we love open source, and we love you, and most of all we love ourselves”.

While Mark Shuttleworth at least presented tools and real things that Canonical was actually doing – even that doesn’t seem like it belonged at the level of a keynote.

And that’s at best. At worst, it’s a mirror of the problems endemic to our industry, a celebration of rock-star engineers job-hopping every few years or less to yet another valley company to figure out how to “monetize” data, software, and people, and the companies that embrace it.

Dear keynoters: you are talented speakers and brilliant minds in leadership roles in technology. You are speaking to people who can, have, and will change the world. You have a chance to make a difference on that stage. Use it.

Pollination Station

Our mint plants are flowering and bringing in quite the variety of pollinators:

I even managed to capture a hug:

Only Illusions

Rainbow over Raleigh, N.C. on June 1, 2012

Shadowed

The view from my window while in a holding pattern waiting for weather to clear over Raleigh, N.C. on June 1, 2012

It’s even more interesting on video:

In Defense of Marriage

In North Carolina today, gay marriage is illegal. And now and through next Tuesday, the issue of whether to amend the state constitution, taking the already existing law a step further to constitutionally outlaw same-sex marriage (along with any legal recognition of civil unions and domestic partnerships) has been placed before the voters in the North Carolina primary.

If you’d rather just read my posts about jobs and programming and ruby and systems administration – you may want to click on. I’d say this post is political. But it’s not. It is about defending marriage. It is about values and morals.

For portions of my life since college I was very involved in protestant evangelical christian churches, I have spent years studying the christian bible and having conversations with christians, and those values and traditions shaped my views on marriage. I was 33 when I married, and I’ve been married for 5 and half years now.

At 33 and unmarried, I went–at least in that aspect of my life–from being what society generally considers a little “weird” to “normal”. And since I’ve been married, I’ve realized even more the rights and the recognition and the benefits that society conveys on those that are married.

When my wife and I married, my wife chose to keep her maiden name. We certainly had a few conversations about that. My family expressed a fair amount of reservation, I think my wife’s family was little perplexed. And even though we are not the first to do so, even if it feels totally normal to us now, and largely accepted by our families, it’s still a little “different” The auto dealership still can’t quite get it right. The vet has called me by wife’s last name more than once. She’s been called by my last name more times than we can count. It’s all benign these days though. We get a little wink, and you can tell that most people are thinking “well that’s not what I would do” – but I’m not sure that we’ve ever gotten any negative comments from strangers about it.

It’s a very small glimpse for me into what it means to have a “different” view from what is considered “normal” in marriage. But I don’t know anyone that wouldn’t consider it incredibly insane to deny my wife and I the rights and benefits that come with marriage because we have different last names.

So I can imagine, but I can’t fully know and appreciate what it is like for same-sex couples. We had a choice about names. Sexual identity is not a choice.

What I do know is that the existing law is wrong. And this proposed admendment is wrong.

I hope at my core I always felt this, but I know I’ve had expressions in my past that I wish now I could take back – especially now that I’ve come to know and respect and value those colleagues and friends that are affected by this deeply unjust law and will be affected by the deeply unjust constitutional admendment.

I will not look my friends, my colleagues, my fellow human beings in the eye and say that they can not enjoy the rights that I enjoy because of who they are.

There is nothing right about denying two consenting adults the chance to be together in marriage. Nothing right about denying others the right to take responsibility, financially and emotionally for the other. Nothing right about denying others the right to be in the hospital room when the other is sick. Nothing about denying two people that have spent or want to spend a lifetime together the benefits and rights that marriage confers.

While this issue and others have contributed to change how I view christianity, I can say with certainty there is nothing at the core of christianity and the values that christians profess to hold that provides any justification for this law and this admendment. There is absolutely, positively nothing moral, nothing values-based about treating someone else as less than a person for who they are.

My straight marriage doesn’t need defending, but the institution should be as strong as it can be, and as long as two consenting adults in our society are denied the right to marry if they so choose, it can not be.

My vote is against this admendment. If you are a North Carolina citizen, I hope yours is too.

Reboot

The "Servers" circa 2006The “Servers” circa 2006

Eight weeks ago, I resigned from the only non-University job I have had in 15 years.

Last week, I returned to the University, and the job I held for the 6 and a half years prior.

I’m not really sure I have a cogent set of thoughts and feelings about it. On one hand, I’m worried. The things about the culture and the environment that frustrated me before have not gone away. There’s nothing I can do to change them, and for a variety of reasons, outside of my director and maybe one or two others, there’s nothing I can do to even broach conversations about changing them – at any level. The same worry I had before that these things about the culture and the environment will threaten the future of the initiative as a whole (and in turn, my future) has not changed. In some ways, it might be worse – the nagging thoughts and feelings that I might have failed this time make me worry whether I’ll make it next time.

There’s a quote that the internet attributes in one form to Maya Angelou and another to Mary Engelbreit. “If you don’t like something, change it, if you can’t change it, change the way you think about it.”

So I will focus on the other hand. And on the other hand I’m thankful. Thankful to my director and the initiative’s director for the opportunity. Thankful to be in a place where I know I can contribute. Thankful for an environment that allows for research and contemplation, and (usually) the time to fail and succeed. Thankful for all the same flexibility and security and interesting work that made it a great job then, and a great job now. Thankful for an overall culture that at its core has a mission that I believe matters and can make a difference.

I’m thankful that the job has a new role, and to spend a portion of my time exploring the work we’ve done over the last six and half years to find things we didn’t know that were there.

I personally bought some books last week:

I don’t know yet where it’s headed, but I will looking at the data we’re generating, and building more skills in analysis, visualization, and the communication of that data, and while learning, teach what I’m learning along the way. It’s a little vague, and that’s because the problems are vague – it’s more about trying and doing and seeing what works and what doesn’t and building on that step by step.

So I’m looking forward to seeing where the next year takes me, looking forward to help with existing efforts wherever I can, to interacting and learning more with my colleagues around the country, to working to “commit code everyday”, to watching something really interesting emerge out of the data we have, while working with and learning MongoDB, Riak, R, SciRuby, Graphite, Statsd, D3, gnuplot, rubyvis/protovis and whatever else that I don’t yet know I need to know.

Capistrano Campout

I’ve become a huge fan of Campfire as a group communication tool over the last six months, in both teams that I was part of during that time, and I’ve seen how incredibly useful it can be as a hub to track automated pieces of information as well, like GitHub’s commit integration with campfire.

So if I have GitHub commits – what about capistrano deployments? I’ve had capistrano integrated with email in my own coding projects, but email is a bit limited – having a real-time posting to capistrano would be even better.

So, inspired by the already existing and excellent projects: capistrano-mountaintop and capfire. I’ve married and extended the ideas in both with capistrano-campout.

Campout will post/speak a configurable message to a campfire room as the capistrano deploy task starts – and utilizing the EngineYard eycap logger routine, will capture the capistrano logger output to a file, and parse it for success/failure – and will post a configurable message on post-deployment success or a different message on post-deployment failure, as well as following the capistrano-mountaintop model of pasting the log to the room as well.

You can also specify sounds to amaze annoy your co-workers.

Campout includes a generator to generate the configuration files for your project as well, and includes support for loading from a campout.yml and/or a campout.local.yml ( ala rails_config ) – so that you can have shared and/or personal settings, as well as a built-in mechanism for keeping the campfire token out of open repositories.

I’m not sure that campout fits anyone’s needs other than my own, but if you use capistrano and campfire – you may want to give it, or one of the other projects a try – having deployment notifications in campfire can be incredibly useful, especially paired with other events.