Hurtle Cloud Controller API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Installation Instructions

The following installation instructions have been tested and verified with the centos:7 docker image. Other OS should work just fine, as long as they provide you with a way of installing python.

# install the epel repo, it contains python-pip
yum install epel-release

# get git and pip
yum install git python-pip

# clone this repo
git clone

# install the dependencies
cd hurtle_cc_api ; python install

You might have to allow the Nothbound API of the CC through your filewall. Here is an example for iptables:

iptables -I INPUT -p tcp --dport 8888 -j ACCEPT

The Northbound API is now exposed on http://localhost:8888. Make sure the port is accessible through the firewall:


# Use either "OpenShift3" or "OpenShift2" here


# The URI for your OpenShift 2 installation


# The URI for your OpenShift 3 installation

# The domain for your apps 

# The namespace to use

# Enable/Disable verification of SSL certificates

The Northbound API is now up and running. If you run it locally, you will reach it here: http://localhost:8888.

Creating an Application / SO instance

The creation of an application or SO instance changes slightly if you use OpenShift 2 or OpenShift 3.

OpenShift 2

SM should trigger the creation of a new app/SO names 'test' - here demonstrated using curl:

$ curl -X POST http://localhost:8888/app/ \
  -H 'Category: app; scheme=""' \
  -H 'Category: python-2.7; scheme=""' \
  -H 'Category: medium; scheme=""' \
  -H 'X-OCCI-Attribute:' \
  -H 'Content-Type: text/occi'

This will return a 201 HTTP code and the location for the new SO app. Now you can retrieve the newly generated app:

$ curl -X GET http://localhost:8888/app/<location from last call> \
  -H 'Accept: text/occi'

Finally prep the SO bundle - note the git URI (Given with the attribute provided in the last call:

$ git clone <URI from above>
$ cd test

This will create a folder with the skeleton of your service orchestrator. Change it so it'll have the SO interface you would like it to have, add the templates and orchestrating code. After making a change, add, commit, and push your changes.

$ git add .
$ git commit -m 'My changes'
$ git push

Your SO should now be up and running and reachable under the DNS entry returned by the OCCI interface. Now deployment, provisioning, etc can be triggered from the SM towards the SO instance.

When you want to restart the application do a stop and start:

$ curl - X POST http://localhost:8888/app/<location from last call>?action=stop
-H 'Category: stop; scheme=""' \
-H 'Content-Type: text/occi'

For updating your SO bundle simple do:

$ git push

OpenShift 3

For OpenShift 3, a SM can request the instanciation of a docker image available on docker hub, here demonstrated via python

import requests
auth = ('demo', 'demopassword')
heads = {'Category': 'app; scheme=""', 
		 'Content-Type': 'text/occi', 'Accept': 'text/occi', 
		 'X-OCCI-Attribute': '"sample-so","dizz/hurtle-sample-so","DESIGN_URI="'}

host = ''

To see what this CC offers:

r = requests.get(host+'/-/', headers=heads, auth=auth)

To request the instanciation of an SO/Docker Image:

r ='/app/', headers=heads, auth=auth)

Note that the image that should be instanciated is supplied via the headers. The new location will be returned also via the headers.

To get the details of your instance:

r2 = requests.get(r.headers['location'], auth=auth, headers=heads)

To request its deletion:

r = requests.delete(r.headers['location'], auth=auth, headers=heads)


To run the tests, make sure you got the required dev dependencies installed:

pip install -r test_requirements.txt

Then you can run the tests:


Supported by