Great video on RESTful services and json from stormpath

Posted on Thursday, January 30, 2014



I just had to share this video I watched from the good people at Stormpath.

It really helped me think about how to use POST and PUT properly @17:30 minutes into the video he starts going over REST and CRUD (Create, Read, Update, Delete).







Jenkins and sbt

Posted on Wednesday, January 29, 2014


This guide will go over installing the sbt plugin for Jenkins.  This guide assumes you Jenkins already installed and running and has the git plugin. 

If you do not have Jenkins installed I wrote up a guide to show you how at http://www.whiteboardcoder.com/2014/01/install-jenkins-ubuntu.html

If you do not have the git plugin for Jenkins installed I wrote up a guide on that too at http://www.whiteboardcoder.com/2014/01/git-with-jenkins.html


git with jenkins

Posted on Monday, January 27, 2014


This guide will go over installing the git plugin for Jenkins.  Jenkins already installed and running (Very basic setup).

Install git via apt-git


First git needs to be installed on the Ubuntu machine


> sudo apt-get install git


github with jenkins



This guide will go over installing the git plugin for Jenkins. It assumes you have Jenkins already installed and running (Very basic setup).  If you have not done that yet I wrote a how to guide at http://www.whiteboardcoder.com/2014/01/install-jenkins-ubuntu.html


As a side note there is a github plugin to Jenkins https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin [1]  But I will not be going over that, rather I will just use the basic git plug-in to talk to github


Install Jenkins Ubuntu

Posted on Sunday, January 26, 2014


This guide will go over installing and setting up Jenkins on a fresh Ubuntu 12.04 server.


In this installation I am going to follow the guide given at https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu [1]

Installing Jenkins on tomcat 8

Posted on Saturday, January 25, 2014


This guide will go over installing and setting up Jenkins on an fresh Ubuntu 12.04 server.

Installing Java 7


Install the latest java 7 files


>  sudo apt-get purge openjdk*
>  sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
>  sudo apt-get update
>  sudo apt-get install oracle-java7-installer
>  java -version


Xcode 5 using a git username email

Posted on Thursday, January 9, 2014


Xcode 5 by default uses the username from OS X when committing in git.   I am not sure what the default is used for the email but it's not correct.  If you run a command to look at the recent logs like.

Xcode 5 using a git remote repository

Posted on Wednesday, January 8, 2014


I recently had a friend who is using Xcode and needed to set up a remote git repository for it.   I am not an Xcode user so bear with me if I miss some of the proper set up of Xcode. 

Here is the set up and instruction I used for him.


iostat and IOPS

Posted on Monday, January 6, 2014


iostat is command for monitoring devices (Hard Drives) attached to the system.  This is another tool I feel a little foolish for just discovering.

iostat is a good tool to discover actual IOPS (Operations per second) http://en.wikipedia.org/wiki/IOPS [1]
I recently was tasked with making an RDS amazon server with a set IOPS on its hard drive.  AWS offers guaranteed IOPS speed for a higher price.  It’s a very useful feature to guarantee speed on your Database.

I wanted to test our current "Live" database to see what IOPS it is currently using.  I found a few calculator sites out there to figure out our theoretical IOPS on the database server such as http://wintelguy.com/raidperf.pl [2].  We got an estimate of ~400 IOPS.  This number made me feel good, since the smallest IOPS you can buy on AWS is 1,000 and increment by 1,000.

This estimated rate is not the actual live rate, just an estimate of capacity.  I wanted to see what the actual rate we were using is.

iostat command

The iostat command is no longer installed by default on Ubuntu (my linux flavor of choice).

To install it run

> sudo apt-get install sysstat



Run the iostat command and read it


> iostat






These stats show the statistics since start up.   


The tps = IOPS.    Since this machine was rebooted (many many months ago it has averaged 247 IOPS real usage)


What if I want to see more recent statistics?

Here is a command I ran


> iostat -dm 10 3


What this says is "-d" only display utilization report
"-m" says convert read/write to MiB

The next number, in this case 10, is the interval to look at.   10 is 10 seconds.

The final number, in this case 3, is the count number.   Check 3 times.

So If I run this command I will see something like this



The first number displayed is the average since the server was last started.   The following number is the average over 10 seconds.

If I leave off the last number and run


> iostat -dm 10


iostat will just continue to get the results every 10 seconds.


This is exactly what I was looking for and I am not going to go into any more detail on iostat.  If you need more detail I would suggest first reading all of http://www.percona.com/live/mysql-conference-2013/sites/default/files/slides/Monitoring-Linux-IO.pdf [3]





References
[1]        Wikipedia IOPS page
                Accessed 01/2014
[2]        Raid Performance Calculator
                Accessed 01/2014
[3]        Monitoring IO Performance using iostat & pt-diskstats
Accessed 01/2014