2015-07-25 13:28:49 -04:00
|
|
|
==============================
|
|
|
|
OpenStack service dependencies
|
|
|
|
==============================
|
|
|
|
|
2015-07-17 14:40:23 -04:00
|
|
|
OpenStack packages
|
2015-09-08 13:38:37 -05:00
|
|
|
~~~~~~~~~~~~~~~~~~
|
2015-07-17 14:40:23 -04:00
|
|
|
|
|
|
|
Distributions release OpenStack packages as part of the distribution or
|
|
|
|
using other methods because of differing release schedules. Perform
|
|
|
|
these procedures on all nodes.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
Disable or remove any automatic update services because they can
|
|
|
|
impact your OpenStack environment.
|
|
|
|
|
|
|
|
.. only:: ubuntu
|
|
|
|
|
2015-09-08 13:38:37 -05:00
|
|
|
Enable the OpenStack repository
|
|
|
|
-------------------------------
|
2015-07-17 14:40:23 -04:00
|
|
|
|
|
|
|
* Install the Ubuntu Cloud archive keyring and repository:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# apt-get install ubuntu-cloud-keyring
|
|
|
|
# echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu" \
|
2015-09-08 13:38:37 -05:00
|
|
|
"trusty-updates/liberty main" > /etc/apt/sources.list.d/ \
|
|
|
|
cloudarchive-liberty.list
|
2015-07-17 14:40:23 -04:00
|
|
|
|
|
|
|
.. only:: rdo
|
|
|
|
|
2015-09-08 13:38:37 -05:00
|
|
|
Prerequisites
|
|
|
|
-------------
|
2015-07-17 14:40:23 -04:00
|
|
|
|
|
|
|
#. On RHEL and CentOS, enable the
|
|
|
|
`EPEL <https://fedoraproject.org/wiki/EPEL>`_ repository:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
Fedora does not require this repository.
|
|
|
|
|
|
|
|
#. On RHEL, enable additional repositories using the subscription
|
|
|
|
manager:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# subscription-manager repos --enable=rhel-7-server-optional-rpms
|
|
|
|
# subscription-manager repos --enable=rhel-7-server-extras-rpms
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
CentOS and Fedora do not require these repositories.
|
|
|
|
|
|
|
|
.. only:: rdo
|
|
|
|
|
2015-09-08 13:38:37 -05:00
|
|
|
Enable the OpenStack repository
|
|
|
|
-------------------------------
|
2015-07-17 14:40:23 -04:00
|
|
|
|
2015-09-08 13:38:37 -05:00
|
|
|
* Install the ``rdo-release-liberty`` package to enable the RDO repository:
|
2015-07-17 14:40:23 -04:00
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2015-09-08 13:38:37 -05:00
|
|
|
# yum install http://rdo.fedorapeople.org/openstack-liberty/rdo-release-liberty.rpm
|
2015-07-17 14:40:23 -04:00
|
|
|
|
|
|
|
.. only:: obs
|
|
|
|
|
2015-09-08 13:38:37 -05:00
|
|
|
Enable the OpenStack repository
|
|
|
|
-------------------------------
|
2015-07-17 14:40:23 -04:00
|
|
|
|
|
|
|
* Enable the Open Build Service repositories based on your openSUSE or
|
|
|
|
SLES version:
|
|
|
|
|
|
|
|
**On openSUSE 13.2:**
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2015-09-08 13:38:37 -05:00
|
|
|
# zypper addrepo -f obs://Cloud:OpenStack:Liberty/openSUSE_13.2 Liberty
|
2015-07-17 14:40:23 -04:00
|
|
|
|
|
|
|
The openSUSE distribution uses the concept of patterns to represent
|
|
|
|
collections of packages. If you selected 'Minimal Server Selection (Text
|
|
|
|
Mode)' during the initial installation, you may be presented with a
|
|
|
|
dependency conflict when you attempt to install the OpenStack packages.
|
|
|
|
To avoid this, remove the minimal\_base-conflicts package:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# zypper rm patterns-openSUSE-minimal_base-conflicts
|
|
|
|
|
|
|
|
**On SLES 12:**
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2015-09-08 13:38:37 -05:00
|
|
|
# zypper addrepo -f obs://Cloud:OpenStack:Liberty/SLE_12 Liberty
|
2015-07-17 14:40:23 -04:00
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
The packages are signed by GPG key 893A90DAD85F9316. You should
|
|
|
|
verify the fingerprint of the imported GPG key before using it.
|
|
|
|
|
2015-10-09 10:35:09 +02:00
|
|
|
.. code-block:: console
|
2015-07-17 14:40:23 -04:00
|
|
|
|
2015-10-09 10:35:09 +02:00
|
|
|
Key ID: 893A90DAD85F9316
|
|
|
|
Key Name: Cloud:OpenStack OBS Project <Cloud:OpenStack@build.opensuse.org>
|
|
|
|
Key Fingerprint: 35B34E18ABC1076D66D5A86B893A90DAD85F9316
|
|
|
|
Key Created: Tue Oct 8 13:34:21 2013
|
|
|
|
Key Expires: Thu Dec 17 13:34:21 2015
|
2015-07-17 14:40:23 -04:00
|
|
|
|
|
|
|
.. only:: debian
|
|
|
|
|
2015-09-08 13:38:37 -05:00
|
|
|
Enable the backports repository
|
|
|
|
-------------------------------
|
2015-07-17 14:40:23 -04:00
|
|
|
|
2015-09-08 13:38:37 -05:00
|
|
|
The Liberty release is available directly through the official
|
2015-08-18 12:29:56 +03:00
|
|
|
Debian backports repository. To use this repository, follow
|
|
|
|
the instruction from the official
|
|
|
|
`Debian website <http://backports.debian.org/Instructions/>`_,
|
|
|
|
which basically suggest doing the following steps:
|
2015-07-17 14:40:23 -04:00
|
|
|
|
|
|
|
|
2015-08-18 12:29:56 +03:00
|
|
|
#. On all nodes, adding the Debian 8 (Jessie) backport repository to
|
|
|
|
the source list:
|
2015-07-17 14:40:23 -04:00
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2015-08-18 12:29:56 +03:00
|
|
|
# echo "deb deb http://http.debian.net/debian jessie-backports main" \
|
2015-07-17 14:40:23 -04:00
|
|
|
>>/etc/apt/sources.list
|
|
|
|
|
2015-08-18 12:29:56 +03:00
|
|
|
.. note::
|
2015-07-17 14:40:23 -04:00
|
|
|
|
2015-08-18 12:29:56 +03:00
|
|
|
Later you can use the following command to install a package:
|
2015-07-17 14:40:23 -04:00
|
|
|
|
2015-08-18 12:29:56 +03:00
|
|
|
.. code-block:: console
|
2015-07-17 14:40:23 -04:00
|
|
|
|
2015-08-18 12:29:56 +03:00
|
|
|
# apt-get -t jessie-backports install ``PACKAGE``
|
2015-07-17 14:40:23 -04:00
|
|
|
|
|
|
|
|
2015-09-08 13:38:37 -05:00
|
|
|
Finalize the installation
|
|
|
|
-------------------------
|
2015-07-17 14:40:23 -04:00
|
|
|
|
|
|
|
.. only:: ubuntu or debian
|
|
|
|
|
|
|
|
* Upgrade the packages on your system:
|
|
|
|
|
2015-08-18 12:29:56 +03:00
|
|
|
.. code-block:: console
|
2015-07-17 14:40:23 -04:00
|
|
|
|
2015-08-18 12:29:56 +03:00
|
|
|
$ apt-get update && apt-get dist-upgrade
|
2015-07-17 14:40:23 -04:00
|
|
|
|
2015-08-18 12:29:56 +03:00
|
|
|
.. note::
|
2015-07-17 14:40:23 -04:00
|
|
|
|
|
|
|
If the upgrade process includes a new kernel, reboot your system
|
|
|
|
to activate it.
|
|
|
|
|
|
|
|
.. only:: rdo
|
|
|
|
|
|
|
|
#. Upgrade the packages on your system:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# yum upgrade
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
If the upgrade process includes a new kernel, reboot your system
|
|
|
|
to activate it.
|
|
|
|
|
|
|
|
.. only:: obs
|
|
|
|
|
|
|
|
* Upgrade the packages on your system:
|
|
|
|
|
2015-10-09 10:35:09 +02:00
|
|
|
.. code-block:: console
|
2015-07-17 14:40:23 -04:00
|
|
|
|
2015-10-09 10:35:09 +02:00
|
|
|
# zypper refresh && zypper dist-upgrade
|
2015-07-17 14:40:23 -04:00
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
If the upgrade process includes a new kernel, reboot your system
|
|
|
|
to activate it.
|
|
|
|
|
|
|
|
.. only:: rdo
|
|
|
|
|
|
|
|
2. RHEL and CentOS enable :term:`SELinux` by default. Install the
|
|
|
|
``openstack-selinux`` package to automatically manage security
|
|
|
|
policies for OpenStack services:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# yum install openstack-selinux
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
Fedora does not require this package.
|
|
|
|
|
2015-09-12 23:52:43 +02:00
|
|
|
3. Because Fedora does not provide the ``openstack-selinux`` package
|
|
|
|
ensure that SELinux is disabled.
|
|
|
|
|
2015-09-22 22:02:31 +02:00
|
|
|
.. code-block:: console
|
2015-09-12 23:52:43 +02:00
|
|
|
|
|
|
|
# sestatus
|
|
|
|
SELinux status: disabled
|
|
|
|
|
|
|
|
If ``SELinux status`` is ``enabled`` disable SELinux by editing the file
|
|
|
|
``/etc/selinux/config`` and restarting the system afterwards:
|
|
|
|
|
2015-09-22 22:02:31 +02:00
|
|
|
.. code-block:: ini
|
2015-09-12 23:52:43 +02:00
|
|
|
|
|
|
|
SELINUX=disabled
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
CentOS and RHEL do not require this step.
|
|
|
|
|
2015-07-25 13:28:49 -04:00
|
|
|
|
|
|
|
|
|
2015-10-04 18:49:18 +02:00
|
|
|
Install the OpenStack client
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Throughout the guide the OpenStack client will be used to perform actions on
|
|
|
|
the installed services.
|
|
|
|
|
|
|
|
* Install the package:
|
|
|
|
|
|
|
|
.. only:: debian or ubuntu
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# apt-get install python-openstackclient
|
|
|
|
|
|
|
|
.. only:: rdo
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# yum install python-openstackclient
|
|
|
|
|
|
|
|
.. only:: obs
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# zypper install python-openstackclient
|
|
|
|
|
2015-07-25 13:28:49 -04:00
|
|
|
SQL database
|
2015-09-08 13:38:37 -05:00
|
|
|
~~~~~~~~~~~~
|
2015-07-25 13:28:49 -04:00
|
|
|
|
|
|
|
Most OpenStack services use an SQL database to store information. The
|
|
|
|
database typically runs on the controller node. The procedures in this
|
|
|
|
guide use MariaDB or MySQL depending on the distribution. OpenStack
|
|
|
|
services also support other SQL databases including
|
|
|
|
`PostgreSQL <http://www.postgresql.org/>`__.
|
|
|
|
|
|
|
|
|
2015-09-08 13:38:37 -05:00
|
|
|
Install and configure the database server
|
|
|
|
-----------------------------------------
|
2015-07-25 13:28:49 -04:00
|
|
|
|
2015-10-08 12:24:39 +02:00
|
|
|
#. Install the packages:
|
2015-07-25 13:28:49 -04:00
|
|
|
|
|
|
|
.. only:: rdo or ubuntu or obs
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
The Python MySQL library is compatible with MariaDB.
|
|
|
|
|
|
|
|
.. only:: ubuntu
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2015-05-20 01:04:00 +00:00
|
|
|
# apt-get install mariadb-server python-pymysql
|
2015-07-25 13:28:49 -04:00
|
|
|
|
|
|
|
.. only:: debian
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2015-05-20 01:04:00 +00:00
|
|
|
# apt-get install mysql-server python-pymysql
|
2015-07-25 13:28:49 -04:00
|
|
|
|
|
|
|
.. only:: rdo
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2015-09-22 22:04:23 +02:00
|
|
|
# yum install mariadb mariadb-server python2-PyMySQL
|
2015-07-25 13:28:49 -04:00
|
|
|
|
|
|
|
.. only:: obs
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# zypper install mariadb-client mariadb python-mysql
|
|
|
|
|
|
|
|
.. only:: ubuntu or debian
|
|
|
|
|
|
|
|
2. Choose a suitable password for the database root account.
|
|
|
|
|
2015-10-08 09:45:16 +02:00
|
|
|
3. Create and edit the ``/etc/mysql/conf.d/mysqld_openstack.cnf`` file
|
2015-07-25 13:28:49 -04:00
|
|
|
and complete the following actions:
|
|
|
|
|
|
|
|
- In the ``[mysqld]`` section, set the
|
|
|
|
``bind-address`` key to the management IP
|
|
|
|
address of the controller node to enable access by other
|
|
|
|
nodes via the management network:
|
|
|
|
|
2015-10-08 10:12:30 +02:00
|
|
|
.. code-block:: ini
|
2015-07-25 13:28:49 -04:00
|
|
|
|
|
|
|
[mysqld]
|
|
|
|
...
|
|
|
|
bind-address = 10.0.0.11
|
|
|
|
|
|
|
|
- In the ``[mysqld]`` section, set the following keys to enable
|
|
|
|
useful options and the UTF-8 character set:
|
|
|
|
|
2015-10-08 10:12:30 +02:00
|
|
|
.. code-block:: ini
|
2015-07-25 13:28:49 -04:00
|
|
|
|
|
|
|
[mysqld]
|
|
|
|
...
|
|
|
|
default-storage-engine = innodb
|
|
|
|
innodb_file_per_table
|
|
|
|
collation-server = utf8_general_ci
|
|
|
|
init-connect = 'SET NAMES utf8'
|
|
|
|
character-set-server = utf8
|
|
|
|
|
|
|
|
|
|
|
|
.. only:: obs or rdo
|
|
|
|
|
2015-10-08 09:45:16 +02:00
|
|
|
2. Create and edit the ``/etc/my.cnf.d/mariadb_openstack.cnf`` file
|
2015-07-25 13:28:49 -04:00
|
|
|
and complete the following actions:
|
|
|
|
|
|
|
|
- In the ``[mysqld]`` section, set the
|
|
|
|
``bind-address`` key to the management IP
|
|
|
|
address of the controller node to enable access by other
|
|
|
|
nodes via the management network:
|
|
|
|
|
2015-10-08 10:12:30 +02:00
|
|
|
.. code-block:: ini
|
2015-07-25 13:28:49 -04:00
|
|
|
|
|
|
|
[mysqld]
|
|
|
|
...
|
|
|
|
bind-address = 10.0.0.11
|
|
|
|
|
|
|
|
- In the ``[mysqld]`` section, set the following keys to enable
|
|
|
|
useful options and the UTF-8 character set:
|
|
|
|
|
2015-10-08 10:12:30 +02:00
|
|
|
.. code-block:: ini
|
2015-07-25 13:28:49 -04:00
|
|
|
|
|
|
|
[mysqld]
|
|
|
|
...
|
|
|
|
default-storage-engine = innodb
|
|
|
|
innodb_file_per_table
|
|
|
|
collation-server = utf8_general_ci
|
|
|
|
init-connect = 'SET NAMES utf8'
|
|
|
|
character-set-server = utf8
|
|
|
|
|
2015-09-08 13:38:37 -05:00
|
|
|
To finalize installation
|
|
|
|
------------------------
|
2015-07-25 13:28:49 -04:00
|
|
|
|
|
|
|
.. only:: ubuntu or debian
|
|
|
|
|
2015-10-08 12:24:39 +02:00
|
|
|
#. Restart the database service:
|
2015-07-25 13:28:49 -04:00
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# service mysql restart
|
|
|
|
|
|
|
|
.. only:: rdo or obs
|
|
|
|
|
2015-10-08 12:24:39 +02:00
|
|
|
#. Start the database service and configure it to start when the system
|
2015-07-25 13:28:49 -04:00
|
|
|
boots:
|
|
|
|
|
|
|
|
.. only:: rdo
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# systemctl enable mariadb.service
|
|
|
|
# systemctl start mariadb.service
|
|
|
|
|
|
|
|
.. only:: obs
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# systemctl enable mysql.service
|
|
|
|
# systemctl start mysql.service
|
|
|
|
|
2015-10-04 19:18:06 +02:00
|
|
|
.. only:: ubuntu or rdo or obs
|
2015-07-25 13:28:49 -04:00
|
|
|
|
2015-10-04 19:18:06 +02:00
|
|
|
2. Secure the database service by running the
|
|
|
|
``mysql_secure_installation`` script.
|
2015-07-25 13:28:49 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Message queue
|
2015-09-08 13:38:37 -05:00
|
|
|
~~~~~~~~~~~~~
|
2015-07-25 13:28:49 -04:00
|
|
|
|
|
|
|
OpenStack uses a :term:`message queue` to coordinate operations and
|
|
|
|
status information among services. The message queue service typically
|
|
|
|
runs on the controller node. OpenStack supports several message queue
|
|
|
|
services including `RabbitMQ <http://www.rabbitmq.com>`__,
|
|
|
|
`Qpid <http://qpid.apache.org>`__, and `ZeroMQ <http://zeromq.org>`__.
|
|
|
|
However, most distributions that package OpenStack support a particular
|
|
|
|
message queue service. This guide implements the RabbitMQ message queue
|
|
|
|
service because most distributions support it. If you prefer to
|
|
|
|
implement a different message queue service, consult the documentation
|
|
|
|
associated with it.
|
|
|
|
|
2015-09-08 13:38:37 -05:00
|
|
|
Install the message queue service
|
|
|
|
---------------------------------
|
2015-07-25 13:28:49 -04:00
|
|
|
|
|
|
|
* Install the package:
|
|
|
|
|
|
|
|
.. only:: ubuntu or debian
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# apt-get install rabbitmq-server
|
|
|
|
|
|
|
|
.. only:: rdo
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# yum install rabbitmq-server
|
|
|
|
|
|
|
|
.. only:: obs
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# zypper install rabbitmq-server
|
|
|
|
|
|
|
|
|
2015-09-08 13:38:37 -05:00
|
|
|
Configure the message queue service
|
|
|
|
-----------------------------------
|
2015-07-25 13:28:49 -04:00
|
|
|
|
|
|
|
#. Start the message queue service and configure it to start when the
|
|
|
|
system boots:
|
|
|
|
|
|
|
|
.. only:: rdo or obs
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# systemctl enable rabbitmq-server.service
|
|
|
|
# systemctl start rabbitmq-server.service
|
|
|
|
|
|
|
|
#. Add the ``openstack`` user:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2015-09-12 23:03:08 +02:00
|
|
|
# rabbitmqctl add_user openstack RABBIT_PASS
|
2015-07-25 13:28:49 -04:00
|
|
|
Creating user "openstack" ...
|
|
|
|
|
2015-09-12 23:03:08 +02:00
|
|
|
Replace ``RABBIT_PASS`` with a suitable password.
|
2015-07-25 13:28:49 -04:00
|
|
|
|
|
|
|
#. Permit configuration, write, and read access for the
|
|
|
|
``openstack`` user:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# rabbitmqctl set_permissions openstack ".*" ".*" ".*"
|
|
|
|
Setting permissions for user "openstack" in vhost "/" ...
|