Update "Install via devstack" document

This patch updates the contents of "Install via devstack" by checking
if the contents is working well with the 2024.02 release of Tacker.

Change-Id: I50840b3a11824c6f21d5d00a64e80c0b29155b60
This commit is contained in:
Kyaw Myo Thant 2024-11-22 14:35:21 +09:00 committed by Ai Hamano
parent c5094e7e13
commit 6c95fb0a9b

View File

@ -19,6 +19,12 @@
Install via Devstack
====================
.. note::
The content of this document has been confirmed to work
using Tacker 2024.2 Dalmatian.
Overview
--------
@ -36,12 +42,12 @@ specifying branch name in your ``local.conf``.
* For latest version installation, use ``master`` branch.
* For specific release based installation, use corresponding branch name.
For ex, to install ``wallaby`` release, use ``stable/wallaby``.
For ex, to install ``2024.2 Dalmatian`` release, use ``stable/2024.2``.
For installation, ``stack.sh`` script in Devstack should be run as a
non-root user with sudo enabled.
Add a separate user ``stack`` and granting relevant privileges is a
good way to install via Devstack [#f0]_.
good way to install via `Devstack`_.
Hardware Requirements
~~~~~~~~~~~~~~~~~~~~~
@ -54,24 +60,36 @@ We recommend that your system meets the following hardware requirements:
which generally requires the most resources. In reality, more parameters
affect required resources.
.. list-table::
:widths: 20 80
:header-rows: 1
* - Criteria
- Recommended
* - CPU
- 4 cores or more
* - RAM
- 16 GB or more
* - Storage
- 80 GB or more
.. list-table::
:widths: 20 80
:header-rows: 1
* - Criteria
- Recommended
* - CPU
- 4 cores or more
* - RAM
- 16 GB or more
* - Storage
- 80 GB or more
.. note::
We recommend that you run DevStack in a VM, rather than on your bare-metal
server. If you have to run devstack on a bare-metal server, It is recommended
to use a server that has at least two network interfaces [#f1]_.
to use a server that has `at least two network interfaces`_.
Operation System
~~~~~~~~~~~~~~~~
If you do not have a preference, we recommend to
use a clean and minimal install of latest LTS version of ``Ubuntu``.
DevStack attempts to support the two latest LTS releases of Ubuntu.
For details, please refer to `Devstack`_.
Install
-------
@ -88,20 +106,28 @@ So the first step of installing tacker is to clone Devstack and prepare your
.. code-block:: console
$ git clone https://opendev.org/openstack/devstack -b <branch-name>
$ cd devstack
$ git clone https://opendev.org/openstack/devstack -b <branch-name>
$ cd devstack
#. Enable tacker related Devstack plugins in ``local.conf`` file
The ``local.conf`` can be created manually, or copied from Tacker
repo [#f2]_. If copied, rename it as ``local.conf``.
The ``local.conf`` can be created manually, or copied from `Tacker
repo`_. If you copied from repo, rename it as ``local.conf``.
We have two choices for configuration basically:
#. All-in-one mode
All-in-one mode installs full Devstack environment including
Tacker in one PC or Laptop.
Tacker in one machine.
.. note::
``TACKER_MODE="all"`` is set in local.conf for all-in-one mode.
If TACKER_MODE is omitted in local.conf, ``TACKER_MODE="all"``
is set by default.
There are two examples for ``all-in-one`` mode:
@ -113,7 +139,7 @@ So the first step of installing tacker is to clone Devstack and prepare your
Refer below the contents of ``local.conf.example``:
.. literalinclude:: ../../../devstack/local.conf.example
:language: ini
:language: ini
#. Openstack and Kubernetes as VIM.
@ -130,16 +156,23 @@ So the first step of installing tacker is to clone Devstack and prepare your
:language: ini
:emphasize-lines: 54-64
.. note::
The above local.conf.kubernetes only works on Ubuntu.
Because Devstack-plugin-container only supports building Kubernetes clusters on Ubuntu.
Because Devstack-plugin-container only supports building
Kubernetes clusters on Ubuntu.
#. Standalone mode
Standalone mode installs only Tacker environment with some
mandatory OpenStack services. Nova, Neutron or other essential
components are not included in this mode.
Standalone mode installs only Tacker environment with some mandatory
OpenStack services.
.. note::
``TACKER_MODE="standalone"`` is set in local.conf for
standalone mode.
The example ``local.conf`` for standalone mode is available at
@ -148,22 +181,8 @@ So the first step of installing tacker is to clone Devstack and prepare your
Refer below the contents of ``local.conf.standalone``
.. literalinclude:: ../../../devstack/local.conf.standalone
:language: ini
:language: ini
#. In CentOS environment install and start ovn services before executing
stack.sh.
.. code-block:: console
$ sudo yum install -y centos-release-openstack-victoria
$ sudo yum install -y openvswitch
$ sudo yum install -y openvswitch-ovn-common
$ sudo yum install -y openvswitch-ovn-central
$ sudo yum install -y openvswitch-ovn-host
$ sudo systemctl start ovn-northd.service
$ sudo systemctl start ovn-controller.service
$ sudo systemctl start ovs-vswitchd.service
$ sudo systemctl start ovsdb-server.service
#. Execute installation script
@ -172,7 +191,8 @@ So the first step of installing tacker is to clone Devstack and prepare your
.. code-block:: console
$ ./stack.sh
$ ./stack.sh
Use PostgreSQL as Tacker database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -186,38 +206,42 @@ To use PostgreSQL as Tacker database backend, execute the following command.
.. code-block:: console
$ sudo apt install postgresql postgresql-contrib
$ sudo -i -u postgres
$ psql
$ sudo apt install postgresql postgresql-contrib
$ sudo -i -u postgres
$ psql
#. Create PostgreSQL database and user.
.. code-block::
CREATE DATABASE tacker;
CREATE ROLE tacker WITH CREATEDB LOGIN PASSWORD '<TACKERDB_PASSWORD>';
exit;
CREATE DATABASE tacker;
CREATE ROLE tacker WITH CREATEDB LOGIN PASSWORD '<TACKERDB_PASSWORD>';
exit;
#. Modify ``postgresql.conf`` and restart PostgreSQL server.
.. note::
The location of ``postgresql.conf`` is different for each distribution.
For Ubuntu distribution, modify
``/etc/postgresql/{POSTGRESQL_VERSION}/main/postgresql.conf``.
The location of ``postgresql.conf`` is different for each distribution.
For Ubuntu distribution, modify
``/etc/postgresql/{POSTGRESQL_VERSION}/main/postgresql.conf``.
Insert ``escape`` as the value of ``bytea_output`` in ``postgresql.conf``.
.. code-block:: ini
bytea_output = 'escape'
bytea_output = 'escape'
Restart PostgreSQL server.
.. code-block:: console
$ sudo service postgresql restart
$ sudo systemctl restart postgresql.service
#. Modify ``tacker.conf`` for PostgreSQL and restart Tacker server.
@ -226,26 +250,35 @@ To use PostgreSQL as Tacker database backend, execute the following command.
.. code-block:: ini
[database]
connection = postgresql://tacker:<POSTGRES_PASSWORD>@<POSTGRES_IP>/tacker?client_encoding=utf8
[database]
connection = postgresql://tacker:<POSTGRES_PASSWORD>@<POSTGRES_IP>/tacker?client_encoding=utf8
Restart Tacker server.
.. code-block:: console
$ sudo systemctl restart devstack@tacker.service
$ sudo systemctl restart devstack@tacker-conductor.service
$ sudo systemctl restart devstack@tacker.service
$ sudo systemctl restart devstack@tacker-conductor.service
#. Activate the python virtual environment for Openstack and populate Tacker
database.
.. note::
The ``psycopg2`` python library may need to be installed based on your
environment after activating the virtual environment. You can find the
version of the library in `Requirements of OpenStack`_.
#. Populate Tacker database.
.. code-block:: console
$ /usr/local/bin/tacker-db-manage \
--config-file /etc/tacker/tacker.conf \
upgrade head
$ source /opt/stack/data/venv/bin/activate
(venv) $ tacker-db-manage --config-file /etc/tacker/tacker.conf upgrade head
.. rubric:: Footnotes
.. [#f0] https://docs.openstack.org/devstack/latest/
.. [#f1] https://docs.openstack.org/devstack/latest/networking.html
.. [#f2] https://opendev.org/openstack/tacker/src/branch/master/devstack
.. _Devstack: https://docs.openstack.org/devstack/latest/
.. _at least two network interfaces: https://docs.openstack.org/devstack/latest/networking.html
.. _Tacker repo: https://opendev.org/openstack/tacker/src/branch/master/devstack
.. _Requirements of OpenStack: https://opendev.org/openstack/requirements/src/branch/master/upper-constraints.txt