Jump to: navigation, search

Freezer-installation

Revision as of 13:28, 25 May 2016 by Memo Garcia (talk | contribs)

Note If you want to install an specific branch, make sure to do the following steps for each repo:

 git clone -b stable/mitaka https://github.com/openstack/freezer


API

Elasticsearch

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

and the install elasticsearch

 sudo dpkg -i elasticsearch.deb

start elasticsearch

 sudo service elasticsearch start

Install freezer api

It is recommended to install the api in a virtual environment

 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 vi /etc/freezer-api.conf

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 \
    backup

Run the API

in kilo

 freezer-api  <ip_host>

liberty onwards

 freezer-api --bind-host <ip_host>

Agent & Scheduler

from source

 git clone http://github.com/openstack/freezer

if you want to install a stable branch it is recommended to clone the branch directly

 git clone -b stable/kilo http://github.com/openstack/freezer
 cd freezer
 virtualenv .venv
 source .venv/bin/activate
 pip install -e .

from pip

 pip install freezer

Requirements

  • python
  • OpenSSL
  • Sync
  • GNU Tar >= 1.26

Linux Requirements

  • libffi-dev
  • libssl-dev
  • python-dev

Windows Requirements

Only python 2.7 is supported at this time

Add binaries to Windows path

Go to Control Panel System and Security System and then Advanced System Settings, and click Environment Variables under System Variables edit Path and append in the end.

 ;C:\\Sync;C:\\OpenSSL-Win64\\bin;C:\\Python27;C:\\Python27\\Lib\\site-packages\\;C:\\Python27\\Scripts\\

Install Windows Scheduler

Freezer scheduler on windows run as a windows service and it needs to be installed as a user service.

open cmd.exe as Administrator

 whoami
 cd C:\\Python27\\Lib\\site-packages\\freezer\\scheduler
 python win_service.py --username {whoami} --password {pc-password} install

Unofficial Installer for Windows

Freezer offers a windows installer supported by the community.

Python Freezer Client

from source

 git clone http://github.com/openstack/python-freezerclient
 cd python-freezerclient
 virtualenv .venv
 source .venv/bin/activate
 pip install -e .

from pip

 pip install python-freezerclient