Thursday, August 8, 2013

Tear down and Rebuilding Mac OS X

I recently decided that I needed to reinstall OS X on my iMac. I have been upgrading for years, and I just wanted to have a clean slate. This didn't mean that I wanted to have to a new home directory or anything. I just wanted to clean up after using ports, homebrew, manual installs, etc...

So, to start this project, I decided I would restore my home directory from a time machine back up. That was the easy part. The second part, how will I get Python, Ruby, Git, Vagrant, etc installed and configured quickly... and most importantly if I wanted to do this again how would I go about automating. Enter Boxen. I had read about this and used Puppet to manage farms of Linux servers so it felt like a good fit. After reading the docs... looking at the code... I decided to trust it to rebuild my iMac.

The results? AWESOME! 

I now store my configuration on GitHub... 
My home directory is safe through time machine...

I can rebuild my entire system without worrying about the final state. The coolest thing, is that I can manage pretty much everything I want through Boxen. 

I highly recommend taking a look.

Monday, May 13, 2013

Installing RVM on OS X

I have been dabbling in Ruby development recently and found that it would be handy to use a tool similar to Python Virtualenv. I feel that this makes for a cleaner development environment. After years of tutorials and miscellaneous O'Reilly book examples my Site and Gems are a bit of a mess. So after looking around on Google rvm seemed like a great choice.

Install(From RVM homepage):

 curl -L https://get.rvm.io | bash -s stable --autolibs=3  

Source RVM

 . ~/.rvm/profile or ~/.rvm/bash_profile

Depending on where the installation process put the RVM path.

 NOTE - I had run the command with brew in /usr/local/bin and it kept complaining that it couldn't do the symlink.
Next run:

 rvm requirements  

Then install a version of Ruby. I used 1.9.3 and to do that, I entered the following command:

 rvm install 1.9.3  

Once that was completed, start using your new version by issuing this command:

 rvm use 1.9.3  
Then create a gemset that can be used for a specific project or type of project by typing:
 
 rvm gemset create demonstration  
 rvm gemset use demonstration  

Hopefully you find this useful. I have done the installation twice... and ended up with different install paths. I also found this blog post by Stewgleadlow to be helpful.

Saturday, February 23, 2013

App Engine Puppet Module

I took the Udacity Web Development course over the last couple months. I have been a big fan of Udacity since I read about it last Spring. The course uses Google App Engine to demonstrate building and hosting a web application. The platform is really simple to use and the SDK provides a very easy way to get up and running. I did most of my development on Mac OS X during the course, but since I started using Ubuntu and LXC I wanted a way to quickly build App Engine containers. So I built a Puppet module to do so.

The module can be found at:

http://github.com/cloudnautique/puppet-appengine-python

Hopefully others will find it useful.

Saturday, January 5, 2013

Bootable USB Stick from OS X

Today I got an awesome new toy, a shiny Samsung 840 Pro SSD drive for my super cheap laptop. I decided to do a fresh install of Ubuntu since that is what I had been running. I essentially use my laptop as a stateless device so there was no data to backup. My thinking was that I would shutdown laptop and swap the drive while I created a new bootable USB drive on my Mac desktop.

 Canonical has a nice set of instructions linked off the download page that tell you how to create said USB boot stick from the image. These can be found:

 http://www.ubuntu.com/download/help/create-a-usb-stick-on-mac-osx

These instructions are absolutely 100% correct, but there is a subtlety that caused me to waste an hour. I  kept using the partition and not the disk:

 /dev/disk4s1 instead of /dev/disk4

I had looked at: df /Volumes/<Mounted partition>

and of course that showed the slice. So I write this:

1. So I won't forget =D
2. Someone else might stumble upon it and find it helpful.

Also, the instructions say "using rdisk might be faster" I have found it to be significantly faster.

Monday, December 3, 2012

To the Cloud!

People are Missing the Point of Dell's Project Sputnik

As I read through the Dell Sputnik launch articles on Engadget and Arstechnica, I was surprised to see everyone focused on the price and screen resolution of the hardware in the comments. This really leads me to believe that the messaging around the launch isn't quite right and people are missing the point of the project. Ars at least mentions that the release of two open source tools, the profile and cloud launcher, as 'the fun part'. However, that is pretty much ignored by people commenting to the post. Unfortunately, Engadget treated the launch as just another laptop to review.

 The point of the project, according to Dell, is to deliver four things. The first two focus on delivering a great OS/HW experience with Ubuntu on an XPS 13. The remaining and more important goals are the cloud launcher and profiling tool. The project delivered beta versions of the tools on GitHub around the same time as the hardware.

 The tools enable what Dell is calling the 'client-to-cloud' path and is a logical step for the company. Dell is a Gold level supporter of the OpenStack project. The company can sell networking, storage and server gear to customers looking to build an OpenStack cloud and even provide deployment tools to make that easier. With these new tools customers can now quickly embrace the new operating model the cloud provides.

 I really would like to see more discussion around cloud enablement rather then hardware specs of the project.

I do not work for Dell or have any vested interest in seeing this product succeed.

Wednesday, November 28, 2012

Ubuntu One to store configuration[Updated]

I have been intrigued about the Dell Sputnik project and the idea of developer profiles. While the project promises a Dell laptop running Ubuntu it is still not available for the average consumer. The great thing is they appear to be open sourcing the profile and cloud launching tools.

Since neither the tools nor laptop were available, I recently purchased a Lenovo IdeaPad with Windows 8. The first thing I did was to download and install Ubuntu 12.04 wiping out the Windows partition. I was able to get it up and running fairly quickly, but I didn't like that I was running the BIOS in legacy mode. I felt I needed to get it to work in EFI. So, after the second install... I was tired of configuring the settings and installing software manually.

 I roughly followed https://help.ubuntu.com/community/UEFI.

I had seen a post on Techcrunch recently that Ubuntu had launched a beta version of a Mac Ubuntu One client. (I use Macs at home and work as my primary PCs) So I thought it would be cool to setup and create a Bash - Puppet repo script to rebuild my Ubuntu box and be able to access it from anywhere.  So now to rebuild the laptop to my liking after the install, I just load up Ubuntu One and run the bash script.

I suppose I could have used GitHub to store the script and then manually installed Git to get the script... but I wanted to play with Ubuntu One a bit.

I am new to Ubuntu and haven't moved over to using it for anything to useful yet. My next steps are to get LXC containers going and play with provisioning dev environments.

Update: I have noticed odd syncing issues where files are on some devices but not others. Not sure I'll stick with this solution.