Anatomy of a Cluster Manager

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

Anatomy of a Cluster Manager

An overview of the fundamental components or building blocks of a general purpose cluster manager, the future of cloud computing, and a brief rant on the state of the industry.

Jeff Lindsay

October 15, 2016

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

86 slides
  1. "We’re big believers in the value of disaggregation – of

    breaking down traditional data center technologies into their core components so we can build new systems that are more flexible, more scalable, and more efficient.”
 —Somebody at Facebook
  2. Dokku • Docker powered mini-Heroku • First Docker “killer app”

    • Single host only • Originally 65 lines of Bash • Simple and extensible #!/bin/bash set -e export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"} case "$1" in receive) APP="$2"; IMAGE="app/$APP" echo "-----> Building $APP ..." cat | dokku build $IMAGE echo "-----> Build complete!" echo "-----> Deploying $APP ..." dokku deploy $APP $IMAGE echo "=====> Application deployed:" echo " $(dokku url $APP)" echo ;; build) IMAGE="$2" id=$(cat | docker run -i -a stdin progrium/buildstep /bin/bash -c "mkdir -p /app && tar -xC /app") test $(docker wait $id) -eq 0 docker commit $id $IMAGE > /dev/null id=$(docker run -d $IMAGE /build/builder) docker attach $id test $(docker wait $id) -eq 0 docker commit $id $IMAGE > /dev/null ;; deploy) APP="$2"; IMAGE="$3" pluginhook pre-deploy $APP $IMAGE if [[ ! -f "$HOME/$APP/PORT" ]]; then # First deploy id=$(docker run -d -p 5000 -e PORT=5000 $IMAGE /bin/bash -c "/start web") echo $id > "$HOME/$APP/CONTAINER" port=$(docker port $id 5000) echo $port > "$HOME/$APP/PORT" echo "$(< "$HOME/HOSTNAME"):$port" > "$HOME/$APP/ADDRESS" else # Regular deploy oldid=$(< "$HOME/$APP/CONTAINER") docker kill $oldid > /dev/null port=$(< "$HOME/$APP/PORT") id=$(docker run -d -p ":$port" -e "PORT=$port" $IMAGE /bin/bash -c "/start web") echo $id > "$HOME/$APP/CONTAINER" fi pluginhook post-deploy $APP $port ;; plugins) ls -1 -d $PLUGIN_PATH/*/ pluginhook install ;; help) cat<<EOF | pluginhook commands help | sort help Print the list of commands plugins Print active plugins EOF ;; *) pluginhook commands "$@" ;; esac
  3. You should be able to throw together a cluster manager

    But I also believe you should be able to Throw Together Anything (tm)

Other Decks in Programming