Revise the code-block format of documentation
Change-Id: If28db07bdd1bab3dc856a4a7675461a319618f32
This commit is contained in:
parent
1ebd6d12ef
commit
cb8f9b1807
@ -1,11 +1,9 @@
|
|||||||
2. Copy the configuration files to ``/etc/freezer/``:
|
2. Copy the configuration files to ``/etc/freezer/``:
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
.. code-block:: bash
|
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
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
3. Edit the ``/etc/freezer/freezer-api.conf`` file and complete the following
|
3. Edit the ``/etc/freezer/freezer-api.conf`` file and complete the following
|
||||||
actions:
|
actions:
|
||||||
@ -35,25 +33,22 @@
|
|||||||
retries=20
|
retries=20
|
||||||
number_of_replicas = 1
|
number_of_replicas = 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Start elasticsearch
|
Start elasticsearch
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
The currently supported db is Elasticsearch. In case you are using a dedicated
|
The currently supported db is Elasticsearch. In case you are using a dedicated
|
||||||
instance of the server, you'll need to start it. Depending on the OS flavor
|
instance of the server, you'll need to start it. Depending on the OS flavor
|
||||||
it might be a:
|
it might be:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: console
|
||||||
|
|
||||||
service elasticsearch start
|
# service elasticsearch start
|
||||||
|
|
||||||
or, on systemd
|
or, on systemd
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: console
|
||||||
|
|
||||||
systemctl start elasticsearch
|
|
||||||
|
|
||||||
|
# systemctl start elasticsearch
|
||||||
|
|
||||||
Using freezer-manage
|
Using freezer-manage
|
||||||
--------------------
|
--------------------
|
||||||
@ -63,45 +58,46 @@ This information is contained in the `mapping`, or schema definition.
|
|||||||
Elasticsearch will use dynamic mapping to try to guess the field type from
|
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
|
the basic datatypes available in JSON, but some field's properties have to be
|
||||||
explicitly declared to tune the indexing engine.
|
explicitly declared to tune the indexing engine.
|
||||||
To do that, use the freezer-manage command:
|
To do that, use the :command:`freezer-manage` command:
|
||||||
::
|
|
||||||
|
|
||||||
freezer-manage db sync
|
.. code-block:: console
|
||||||
|
|
||||||
|
# freezer-manage db sync
|
||||||
|
|
||||||
You should have updated your configuration files before doing this step.
|
You should have updated your configuration files before doing this step.
|
||||||
freezer-manage has the following options:
|
freezer-manage has the following options:
|
||||||
|
|
||||||
* To create the db mappings use the following command
|
* To create the db mappings use the following command
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: console
|
||||||
|
|
||||||
freezer-manage db sync
|
# freezer-manage db sync
|
||||||
|
|
||||||
* To update the db mappings using the following command. Update means that you
|
* 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
|
might have some mappings and you want to update it with a more recent ones
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: console
|
||||||
|
|
||||||
freezer-manage db update
|
# freezer-manage db update
|
||||||
|
|
||||||
* To remove the db mappings using the following command
|
* To remove the db mappings using the following command
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: console
|
||||||
|
|
||||||
freezer-manage db remove
|
# freezer-manage db remove
|
||||||
|
|
||||||
* To print the db mappings using the following command
|
* To print the db mappings using the following command
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: console
|
||||||
|
|
||||||
freezer-manage db show
|
# freezer-manage db show
|
||||||
|
|
||||||
* To update your settings (number of replicas) all what you need to do is to
|
* To update your settings (number of replicas) all what you need to do is to
|
||||||
change its value in the configuration file and then run the following command
|
change its value in the configuration file and then run the following command
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: console
|
||||||
|
|
||||||
freezer-manage db update-settings
|
# freezer-manage db update-settings
|
||||||
|
|
||||||
If you provided an invalid number of replicas that will cause problems later on,
|
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
|
so it's highly recommended to make sure that you are using the correct number
|
||||||
@ -109,78 +105,76 @@ of replicas. For more info click here `Elasticsearch_Replicas_instructions <http
|
|||||||
|
|
||||||
* To get information about optional additional parameters
|
* To get information about optional additional parameters
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: console
|
||||||
|
|
||||||
freezer-manage -h
|
# freezer-manage -h
|
||||||
|
|
||||||
* If you want to add any additional parameter like --yes or --erase, they should
|
* If you want to add any additional parameter like --yes or --erase, they should
|
||||||
be before the db option. Check the following examples
|
be before the db option. Check the following examples
|
||||||
Wrong Example
|
Wrong Example
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: console
|
||||||
|
|
||||||
freezer-manage db sync -y -e
|
# freezer-manage db sync -y -e
|
||||||
|
|
||||||
Correct Example
|
Correct Example:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: console
|
||||||
|
|
||||||
freezer-manage -y -e db sync
|
|
||||||
|
|
||||||
|
# freezer-manage -y -e db sync
|
||||||
|
|
||||||
create the mappings
|
create the mappings
|
||||||
-------------------
|
-------------------
|
||||||
.. code-block:: bash
|
.. code-block:: console
|
||||||
|
|
||||||
freezer-manage -y -e db sync
|
|
||||||
|
|
||||||
|
# freezer-manage -y -e db sync
|
||||||
|
|
||||||
run simple instance
|
run simple instance
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ freezer-api --config-file /etc/freezer/freezer-api.conf
|
$ freezer-api --config-file /etc/freezer/freezer-api.conf
|
||||||
|
|
||||||
examples running using uwsgi
|
examples running using uwsgi
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ uwsgi --http :9090 --need-app --master --module freezer_api.cmd.wsgi:application
|
$ 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
|
$ uwsgi --https :9090,foobar.crt,foobar.key --need-app --master --module freezer_api.cmd.wsgi:application
|
||||||
|
|
||||||
|
|
||||||
example running freezer-api with apache2
|
example running freezer-api with apache2
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: console
|
||||||
|
|
||||||
sudo vi /etc/apache2/sites-enabled/freezer-api.conf
|
sudo vi /etc/apache2/sites-enabled/freezer-api.conf
|
||||||
|
|
||||||
<VirtualHost ...>
|
<VirtualHost ...>
|
||||||
WSGIDaemonProcess freezer-api processes=2 threads=2 user=freezer display-name=%{GROUP}
|
WSGIDaemonProcess freezer-api processes=2 threads=2 user=freezer display-name=%{GROUP}
|
||||||
WSGIProcessGroup freezer-api
|
WSGIProcessGroup freezer-api
|
||||||
WSGIApplicationGroup freezer-api
|
WSGIApplicationGroup freezer-api
|
||||||
WSGIScriptAlias / /opt/stack/freezer_api/cmd/wsgi.py
|
WSGIScriptAlias / /opt/stack/freezer_api/cmd/wsgi.py
|
||||||
|
|
||||||
<IfVersion >= 2.4>
|
<IfVersion >= 2.4>
|
||||||
ErrorLogFormat "%M"
|
ErrorLogFormat "%M"
|
||||||
</IfVersion>
|
</IfVersion>
|
||||||
ErrorLog /var/log/%APACHE_NAME%/freezer-api.log
|
ErrorLog /var/log/%APACHE_NAME%/freezer-api.log
|
||||||
LogLevel warn
|
LogLevel warn
|
||||||
CustomLog /var/log/freezer-api/freezer-api_access.log combined
|
CustomLog /var/log/freezer-api/freezer-api_access.log combined
|
||||||
|
|
||||||
<Directory /opt/stack/freezer_api>
|
<Directory /opt/stack/freezer_api>
|
||||||
Options Indexes FollowSymLinks MultiViews
|
Options Indexes FollowSymLinks MultiViews
|
||||||
Require all granted
|
Require all granted
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
allow from all
|
allow from all
|
||||||
LimitRequestBody 102400
|
LimitRequestBody 102400
|
||||||
</Directory>
|
</Directory>
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
|
|
||||||
Install and configure freezer-scheduler/agent
|
Install and configure freezer-scheduler/agent
|
||||||
|
@ -3,14 +3,14 @@ freezer-agent, on any node in the cloud or any vm inside the cloud.
|
|||||||
|
|
||||||
This section assumes that you already have a working OpenStack
|
This section assumes that you already have a working OpenStack
|
||||||
environment with at least the following components installed:
|
environment with at least the following components installed:
|
||||||
.. Keystone
|
- Keystone
|
||||||
.. Swift
|
- Swift
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
git clone https://git.openstack.org/openstack/freezer.git
|
git clone https://git.openstack.org/openstack/freezer.git
|
||||||
cd freezer
|
cd freezer
|
||||||
pip install ./
|
pip install ./
|
||||||
|
|
||||||
|
|
||||||
Configure the scheduler
|
Configure the scheduler
|
||||||
@ -29,8 +29,8 @@ Configure the scheduler
|
|||||||
|
|
||||||
* In the ``[DEFAULT]`` section, configure database access:
|
* In the ``[DEFAULT]`` section, configure database access:
|
||||||
|
|
||||||
The ``client_id`` has to be set to the hostname of the machine. It will be
|
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
|
used as an identifier for this node to fetch its scheduled backups
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
@ -39,10 +39,8 @@ Configure the scheduler
|
|||||||
client_id = hostname_of_machine
|
client_id = hostname_of_machine
|
||||||
jobs_dir = /etc/freezer/scheduler/conf.d
|
jobs_dir = /etc/freezer/scheduler/conf.d
|
||||||
|
|
||||||
|
|
||||||
3. Start ``freezer-scheduler``
|
3. Start ``freezer-scheduler``
|
||||||
|
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ . admin-openrc
|
$ . admin-openrc
|
||||||
|
Loading…
Reference in New Issue
Block a user