Jump to: navigation, search


Freezer API


Elasticsearch installation

on ubuntu/debian, install openjdk

   sudo apt-get install openjdk-7-jre

download elasticsearch from **https://www.elastic.co/downloads/elasticsearch** and make sure the version is <2.0

install elasticsearch

   sudo dpkg -i elasticsearch.deb

start elasticsearch

   sudo service elasticsearch start

Install freezer-api in a virtualenv (recommended)

  • Note* If you want to install an specific branch, make sure to do the follwing steps for each repo:
   git clone -b stable/mitaka https://github.com/openstack/freezer-api
   git clone https://github.com/openstack/freezer-api.git
   cd freezer-api
   virtualenv .venv
   source .venv/bin/activate
   pip install -e .

Edit configuration file

   sudo cp etc/freezer-api.conf /etc/freezer-api.conf

edit parameters to your environment

   sudo vim /etc/freezer-api.conf

Create mappings for elasticsearch

Elasticsearch needs to know what type of data each document's field contains. This information is contained in the "mapping", or schema definition. Elasticsearch will use dynamic mapping to try to guess the field type from the basic datatypes available in JSON, but some field's properties have to be explicitly declared to tune the indexing engine. To do that, use the freezer-db-init command:

   freezer-db-init [db-host]

The url of the db-host is optional and can be automatically guessed from /etc/freezer-api.conf

API registration

   openstack user create --password-prompt freezer
   openstack role add --project <tenant> --user freezer admin
   openstack service create --name freezer --description "Freezer Backup Service" backup
   openstack endpoint create \
     --publicurl http://freezer_api_publicurl:port \
     --internalurl http://freezer_api_internalurl:port \
     --adminurl http://freezer_api_adminurl:port \
     --region regionOne \


   freezer-api --bind-host <ip_host>