This section describes how to install and configure the Backup service for Red Hat Enterprise Linux 7 and CentOS 7.
Source the admin
credentials to gain access to
admin-only CLI commands:
$ . admin-openrc
To create the service credentials, complete these steps:
Create the freezer
user:
$ openstack user create --domain default --password-prompt freezer
Add the admin
role to the freezer
user:
$ openstack role add --project service --user freezer admin
Create the freezer service entities:
$ openstack service create --name freezer --description "Backup" backup
Create the Backup service API endpoints:
$ openstack endpoint create --region RegionOne \
backup public http://controller:9090/
$ openstack endpoint create --region RegionOne \
backup internal http://controller:9090/
$ openstack endpoint create --region RegionOne \
backup admin http://controller:9090/
Install the packages:
$ sudo yum install python-dev python-pip
/etc/freezer/
:sudo cp etc/freezer/freezer-api.conf.sample /etc/freezer/freezer-api.conf
sudo cp etc/freezer/freezer-paste.ini /etc/freezer/freezer-paste.ini
Edit the /etc/freezer/freezer-api.conf
file and complete the following
actions:
In the [storage]
section, configure database access:
[storage]
...
backend = elasticv2
driver = freezer_api.storage.elasticv2.ElasticSearchEngineV2
In the [elasticv2]
section, configure elasticsearch access:
You might need to create the elasticv2 section first.
[elasticv2]
...
hosts=http://localhost:9200
index=freezer
use_ssl=False
ca_certs=''
use_ssl=False
timeout=60
retries=20
number_of_replicas = 1
service elasticsearch start
or, on systemd
systemctl start 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-manage command:
freezer-manage db sync
You should have updated your configuration files before doing this step. freezer-manage has the following options:
freezer-manage db sync
To update the db mappings using the following command. Update means that you might have some mappings and you want to update it with a more recent ones .. code-block:: bash
freezer-manage db update
To remove the db mappings using the following command
freezer-manage db remove
freezer-manage db show
freezer-manage db update-settings
If you provided an invalid number of replicas that will cause problems later on, so it’s highly recommended to make sure that you are using the correct number of replicas. For more info click here Elasticsearch_Replicas_instructions
To get information about optional additional parameters
freezer-manage -h
If you want to add any additional parameter like –yes or –erase, they should be before the db option. Check the following examples Wrong Example .. code-block:: bash
freezer-manage db sync -y -e
Correct Example .. code-block:: bash
freezer-manage -y -e db sync
freezer-manage -y -e db sync
$ freezer-api --config-file /etc/freezer/freezer-api.conf
$ uwsgi --http :9090 --need-app --master --module freezer_api.cmd.wsgi:application
$ uwsgi --https :9090,foobar.crt,foobar.key --need-app --master --module freezer_api.cmd.wsgi:application
sudo vi /etc/apache2/sites-enabled/freezer-api.conf
<VirtualHost ...>
WSGIDaemonProcess freezer-api processes=2 threads=2 user=freezer display-name=%{GROUP}
WSGIProcessGroup freezer-api
WSGIApplicationGroup freezer-api
WSGIScriptAlias / /opt/stack/freezer_api/cmd/wsgi.py
<IfVersion >= 2.4>
ErrorLogFormat "%M"
</IfVersion>
ErrorLog /var/log/%APACHE_NAME%/freezer-api.log
LogLevel warn
CustomLog /var/log/freezer-api/freezer-api_access.log combined
<Directory /opt/stack/freezer_api>
Options Indexes FollowSymLinks MultiViews
Require all granted
AllowOverride None
Order allow,deny
allow from all
LimitRequestBody 102400
</Directory>
</VirtualHost>
This section describes how to install and configure freezer-scheduler and freezer-agent, on any node in the cloud or any vm inside the cloud.
This section assumes that you already have a working OpenStack environment with at least the following components installed: .. Keystone .. Swift
git clone https://git.openstack.org/openstack/freezer.git
cd freezer
pip install ./
/etc/freezer/
:$ sudo cp etc/scheduler.conf.sample /etc/freezer/scheduler.conf
Edit the /etc/freezer/scheduler.conf
file and complete the following
actions:
[DEFAULT]
section, configure database access:The client_id
has to be set to the hostname of the machine. It will be
used as an identifier for this node to fetch its scheduled backups
[DEFAULT] ... client_id = hostname_of_machine jobs_dir = /etc/freezer/scheduler/conf.d
Start freezer-scheduler
$ sudo freezer-scheduler --config-file /etc/freezer/scheduler.conf start
Start the Backup services and configure them to start when the system boots:
$ sudo systemctl enable openstack-freezer-api.service
$ sudo systemctl start openstack-freezer-api.service
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.