Instantly share code, notes, and snippets.

View gist:57573fa2bb8febbe1280
......... ..........
....... ........
..... ......
.... .....
... ....... ....
.. ....... .. ...
. .......... .. ..
. ....... .... .. .
. ..... ..... .

Keybase proof

I hereby claim:

  • I am jaredmorrow on github.
  • I am jaredmorrow ( on keybase.
  • I have a public key whose fingerprint is 5C6F 020C B423 A155 AAC9 4EF9 B9EE 6014 3C09 DDA1

To claim this, I am signing this object:

View ssh pub key
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtcK9RaMacrCGw33ALoPDXm85VsmSFe33qg4yjg+/2QWs1ti7HYgS1uCnfuP9/kuYaNK1MbGfk2l1rScSwKv3GP+uyDttKTRQPkLJEmcqaoSv3tjfl1rG44IuKGIGNrcVWGF2/5qGp4r64BRMPzsJi8LSeEAPMulM7KcZLEdXIf1vsBPa8HMFbUUrYIIfI6xzKgOFA2fBedsrVKd+dn+sYb7lRkDWCVmabqHz/Q8nV\
View gist:2023352
==> cluster_info (compile)
==> lager (compile)
CONFTEST: using inherited require_otp_vsn (default: ".*"):
==> poolboy (compile)
CONFTEST: using inherited require_otp_vsn (default: ".*"):
CONFTEST: using inherited erl_first_files (default: []):
==> protobuffs (compile)

Building Riak on SmartOS, the hard way

Build Machine

Here is some information on the build machine I'm using for reference:

  1. Dataset

    $ dsadm list
    UUID                                 OS      PUBLISHED  URN
View pubkey
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtcK9RaMacrCGw33ALoPDXm85VsmSFe33qg4yjg+/2QWs1ti7HYgS1uCnfuP9/kuYaNK1MbGfk2l1rScSwKv3GP+uyDttKTRQPkLJEmcqaoSv3tjfl1rG44IuKGIGNrcVWGF2/5qGp4r64BRMPzsJi8LSeEAPMulM7KcZLEdXIf1vsBPa8HMFbUUrYIIfI6xzKgOFA2fBedsrVKd+dn+sYb7lRkDWCVmabqHz/Q8nVkm9tZ/4EHrbHllDicBhCc+wOP+Z7vIk0r2o1Cc4l2ArElVi0F7z8ipAU9jsl3yjfyzhtNdBgiiosgLAwIpHwbsiqVaFqHadqSrcuvDM2PrhVw==
View gist:3867631
lg80 = "!git log --graph --color=always --abbrev-commit --date=relative --pretty=format:'%x00%h%x00%s%x00%cd%x00%an%x00%d' | gawk -F '\\0' '{ printf \"%s\\033[31m%s\\033[0m %-50s \\033[32m%14s\\033[0m \\033[30;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, gensub(/(.{49}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5, $6 }' | less -R"

SmartOS albeit powerful, makes some easy things like figuring out a "version" of SmartOS very difficult and confusing. To someone like Basho who makes packages for SmartOS, it is enough to drive us (me) insane trying to figure out how to label the packages.

The problem lies in trying to define the version at all. Is the version you care about listed in uname -a? How about a file in /etc/ that tells you? The answer to bolth of those questions is "no". uname -v gives you a string like joyent_20130125T031721Z The only file in /etc/ that comes close is pkgsrc_version, but that is only sometimes available on the system. The real answer is a combination of the Global Zone snapshot version and the pkgsrc version in the guest zones.

So how do I label my packages for SmartOS?

With the uname -v example above, joyent_20130125T031721Z describes the global zone, and has some influence on how apps run, but not enough to determine which package will work on which system. Plus I d

View gist:76c61937a7cce0e10affbd0f25e66bed
### Keybase proof
I hereby claim:
* I am jaredmorrow on github.
* I am jaredmorrow ( on keybase.
* I have a public key whose fingerprint is D823 E406 6DF8 C3C3 EFE2 8E80 C471 251D A5C2 621C
To claim this, I am signing this object:
View gist:3053951

If you prefer VirtualBox or aren't running OS X, here are some instructions and a script to help you get started with SmartOS under VirtualBox. If you use VirtualBox, skip the first section and read the section on how to get the Node.js SmartMachine up and running.

Running SmartOS under vmware Fusion

  1. Start by downloading the latest live image
  2. When you run the new VM wizard, select "Continue without disk" on the first screen of the wizard.
  3. Select Sun Solaris / Solaris 10 64-bit on the next screen.
  4. You're going to get dumped to a config screen when the live image starts up, choose DHCP for the networking and defaults for everything else.
  5. Pretty much the first thing you're going to want to do is figure out how to SSH into the box once it boots and creates its storage pools, because trying to do stuff in the virtual console is miserable. There's no cut and paste