Installation dependencies

First of all, you have to install several dependecies. The Deltacloud server relies on a number of external rubygems and other libraries. The following packages are neccessary for running the Deltacloud server. The installation of dependencies slightly differs from distribution to distribution. You will need:


Fedora and Red Hat Enterprise Linux

Ruby and Ruby-devel

Check if you already have a Ruby installation by typing the following command. You should see something that looks like:

$ ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]

Deltacloud requires at least Ruby 1.8.7. You need to install also the development headers (ruby-devel) because Deltacloud relies on some rubygems with C extensions. According to your package manager use commands:

$ sudo yum install ruby
$ sudo yum install ruby-devel

RubyGems

Deltacloud relies on a number of RubyGems. You can check if you already have gem executable (similarly to ruby) by typing $ gem -v. Otherwise use your package manager for the installation:

$ sudo yum install rubygems

GCC-C++, Libxml2, Libxml2-devel, Libxslt, Libxslt-devel, sqlite, sqlite-devel

These libraries are required to build RubyGems that have C extensions (the last two are for the CIMI persistence layer). Use commands:

$ sudo yum install gcc-c++
$ sudo yum install libxml libxml2-devel
$ sudo yum install libxslt libxslt-devel
$ sudo yum install sqlite sqlite-devel

Rake

Rake is Ruby's Make and is itself a ruby gem. Once you have RubyGems installed you can get rake with:

$ sudo gem install rake


Debian and Ubuntu

Ruby and RubyGems

The following instructions focus on installing Ruby 1.9 (Deltacloud requires at least ruby 1.8.7.). Install ruby and rubygem by typing:

$ sudo apt-get install ruby1.9.1-full

Use the following command to check, whether the installation was successful. You should see a similar response:

Create symlinks:

$ ln -s /usr/bin/ruby1.9.1 /usr/bin/ruby
$ ln -s /usr/bin/gem1.9.1 /usr/bin/ge
$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]

You can check the installation of Rubygems the same way:

$ gem -v
1.3.7

g++, libxml2, libxml2-dev, libxslt, libxslt-dev, sqlite, sqlite-devel

These libraries are required to build RubyGems that have C extensions (last two are for CIMI persistence layer). Use commands:

$ sudo apt-get install g++
$ sudo apt-get install libxml++2.6-dev libxml2-dev
$ sudo apt-get install libxslt1.1 libxslt-dev
$ sudo apt-get install sqlite libsqlite3-dev

Gem dependecies

Debian and Ubuntu distributions also require to install following gem dependencies:

$ gem install thin sinatra rack-accept rest-client sinatra-content-for nokogiri
Once these gems are installed, go to the directory (normally /var/lib/gems/1.9.1/gems), where gems are located and check that you have following gems listed. You may see more gems than you directly installed, because RubyGems install gem dependecies automaticly.

Create symlink for the launcher:

$ ln -s /var/lib/gems/1.9.1/gems/deltacloud-core-1.1.3/bin/deltacloudd /usr/bin/deltacloudd

Special thanks to Andreas Schraitle for updating these instructions.


Aws-2.5.6, builder-3.0.0, bundler-1.1.3, daemons-1.1.8, eventmachine-0.12.10, haml-3.1.4, http_connection-1.4.1, json-1.6.6, mime-types-1.18, net-ssh-2.3.0, nokogiri-1.5.2, rack-1.4.1, rake-0.9.2.2, rack-accept-0.4.4, rack-protection-1.2.0, rest-client-1.6.7, sinatra-1.3.2, sinatra-content-for-0.1, thin-1.3.1, tilt-1.3.3, uuidtools-2.1.2, xml-simple-1.1.1

You may have trouble with the installation, if the Makefile is missing. Then, you need to install make:

$ sudo apt-get install make


OS X

Instructions on setting up Deltacloud on Appleā€™s OS X can be found on the Wiki. Note that they require using homebrew.

Installation of Deltacloud itself

Once you've setup all the dependencies listed above, installing Deltacloud is as easy. Type:

$ sudo gem install deltacloud-core

And thats it! The gem install command will automatically fetch and install all other gems that the Deltacloud server needs. As an alternative you can get the latest releases of Deltacloud from the Apache website.

Note: When installing and running Deltacloud on platforms with Ruby versions 1.8.x, the 'require_relative' gem needs to be installed. This gem should be automatically installed with the deltacloud-core gem however, if this does not occur, the follow error will be thrown when starting Deltacloud:

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- require_relative (LoadError)

The fix is to explicitly install the 'require_relative' gem:

$ sudo gem install require_relative

Run Deltacloud