Deltacloud API development setup on OSX
Skip to end of metadata
Go to start of metadata

Pre-requires

Setting up Homebrew

Homebrew is OSX package manager. It uses GIT and it is very similar to Gentoo emerge system, except it is more user-friendly (wink)

  • Run this command in Terminal:

$ ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"

  • Follow the instructions in Terminal
  • At the end, run:

$ brew doctor

This command will make sure your system is ready for compiling software from homebrew repositories.

Installing dependencies (for nokogiri, etc...)

  • $ brew install libxml2 libxslt readline autoconf automake gettext git graphviz libffi pcre pkg-config

Installing rbenv

Rbenv will allow you to use multiple Ruby versions isolated from the system Ruby. In other words, you can use them without messing your OS too much.

  • $ cd $HOME
  • $ git clone git://github.com/sstephenson/rbenv.git .rbenv
  • $ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
  • $ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
  • $ mkdir $HOME/.rbenv/plugins
  • $ cd $HOME/.rbenv/plugins && git clone git://github.com/sstephenson/ruby-build.git
  • Restart your Terminal (or do $ exec $SHELL)

Now you can install latest Ruby:

  • $ rbenv install 1.9.3-p194
  • $ rbenv global 1.9.3-p194
  • $ gem install bundler

NOTE: To get list of possible ruby versions that could be installed run $ rbenv install without any parameter.

Installing Deltacloud

Bundler now install all dependencies required for development. Once bundler is done installing dependencies, you can run Deltacloud API:

  • $ ./bin/deltacloudd -i mock

NOTE: If bundler fail with installing some dependencies, you most probably lack some C library. Inspect the configure logs and then use 'brew install' to install required deps.

Labels
  • No labels