From bf98002fd2c0cace2c07e4020e7aea1c3d87961d Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Wed, 21 Oct 2015 09:02:36 +0200 Subject: [PATCH] [install] move MongoDB installation into environment chapter Change-Id: Icb3263b4f55e316f37634020730399a4b0b670bb --- .../source/ceilometer-controller-install.rst | 171 +----------------- doc/install-guide/source/ceilometer.rst | 2 + .../source/environment-nosql-database.rst | 169 +++++++++++++++++ doc/install-guide/source/environment.rst | 1 + 4 files changed, 181 insertions(+), 162 deletions(-) create mode 100644 doc/install-guide/source/environment-nosql-database.rst diff --git a/doc/install-guide/source/ceilometer-controller-install.rst b/doc/install-guide/source/ceilometer-controller-install.rst index 266f055caa..c5190b5916 100644 --- a/doc/install-guide/source/ceilometer-controller-install.rst +++ b/doc/install-guide/source/ceilometer-controller-install.rst @@ -10,166 +10,15 @@ service in your environment. To configure prerequisites ~~~~~~~~~~~~~~~~~~~~~~~~~~ -Before you install and configure Telemetry, you must install ``MongoDB``, -create a MongoDB database, service credentials, and API endpoint. - -.. only:: obs - - #. Enable the Open Build Service repositories for MongoDB based on - your openSUSE or SLES version: - - On openSUSE: - - .. code-block:: console - - # zypper addrepo -f obs://server:database/openSUSE_13.2 Database - - On SLES: - - .. code-block:: console - - # zypper addrepo -f obs://server:database/SLE_12 Database - - .. note:: - - The packages are signed by GPG key ``05905EA8``. You should - verify the fingerprint of the imported GPG key before using it. - - .. code-block:: console - - Key Name: server:database OBS Project - Key Fingerprint: 116EB863 31583E47 E63CDF4D 562111AC 05905EA8 - Key Created: Mon 08 Dec 2014 09:54:12 AM UTC - Key Expires: Wed 15 Feb 2017 09:54:12 AM UTC - - - Install the MongoDB package: - - .. code-block:: console - - # zypper install mongodb - -.. only:: rdo - - #. Install the MongoDB package: - - .. code-block:: console - - # yum install mongodb-server mongodb - -.. only:: ubuntu - - #. Install the MongoDB package: - - .. code-block:: console - - # apt-get install mongodb-server mongodb-clients python-pymongo - -.. only:: obs - - 2. Edit the ``/etc/mongodb.conf`` file and complete the following - actions: - - * Configure the ``bind_ip`` key to use the management interface - IP address of the controller node. - - .. code-block:: ini - - bind_ip = 10.0.0.11 - - * By default, MongoDB creates several 1 GB journal files - in the ``/var/lib/mongodb/journal`` directory. - If you want to reduce the size of each journal file to - 128 MB and limit total journal space consumption to 512 MB, - assert the ``smallfiles`` key: - - .. code-block:: ini - - smallfiles = true - - You can also disable journaling. For more information, see the - `MongoDB manual `__. - - * Start the MongoDB services and configure them to start when - the system boots: - - .. code-block:: console - - # systemctl enable mongodb.service - # systemctl start mongodb.service - -.. only:: rdo - - .. The use of mongod, and not mongodb, in the below screen is intentional. - - 2. Edit the ``/etc/mongod.conf`` file and complete the following - actions: - - * Configure the ``bind_ip`` key to use the management interface - IP address of the controller node. - - .. code-block:: ini - - bind_ip = 10.0.0.11 - - * By default, MongoDB creates several 1 GB journal files - in the ``/var/lib/mongodb/journal`` directory. - If you want to reduce the size of each journal file to - 128 MB and limit total journal space consumption to 512 MB, - assert the ``smallfiles`` key: - - .. code-block:: ini - - smallfiles = true - - You can also disable journaling. For more information, see the - `MongoDB manual `__. - - * Start the MongoDB services and configure them to start when - the system boots: - - .. code-block:: console - - # systemctl enable mongod.service - # systemctl start mongod.service - -.. only:: ubuntu - - 2. Edit the ``/etc/mongodb.conf`` file and complete the following - actions: - - * Configure the ``bind_ip`` key to use the management interface - IP address of the controller node. - - .. code-block:: ini - - bind_ip = 10.0.0.11 - - * By default, MongoDB creates several 1 GB journal files - in the ``/var/lib/mongodb/journal`` directory. - If you want to reduce the size of each journal file to - 128 MB and limit total journal space consumption to 512 MB, - assert the ``smallfiles`` key: - - .. code-block:: ini - - smallfiles = true - - If you change the journaling configuration, stop the MongoDB - service, remove the initial journal files, and start the service: - - .. code-block:: console - - # service mongodb stop - # rm /var/lib/mongodb/journal/prealloc.* - # service mongodb start - - You can also disable journaling. For more information, see the - `MongoDB manual `__. +Before you install and configure the Telemetry service, you must +create a database, service credentials, and API endpoints. However, +unlike other services, the Telemetry service uses a NoSQL database. +See :ref:`environment-nosql-database` to install and configure +MongoDB before proceeding further. .. only:: obs or ubuntu - 3. Create the ``ceilometer`` database: + 1. Create the ``ceilometer`` database: .. code-block:: console @@ -191,12 +40,11 @@ create a MongoDB database, service credentials, and API endpoint. "_id" : ObjectId("5489c22270d7fad1ba631dc3") } - Replace ``CEILOMETER_DBPASS`` with a suitable password. .. only:: rdo - 3. Create the ``ceilometer`` database: + 1. Create the ``ceilometer`` database: .. code-block:: console @@ -212,15 +60,14 @@ create a MongoDB database, service credentials, and API endpoint. Replace ``CEILOMETER_DBPASS`` with a suitable password. - -4. Source the ``admin`` credentials to gain access to admin-only +2. Source the ``admin`` credentials to gain access to admin-only CLI commands: .. code-block:: console $ source admin-openrc.sh -5. To create the service credentials, complete these steps: +3. To create the service credentials, complete these steps: * Create the ``ceilometer`` user: diff --git a/doc/install-guide/source/ceilometer.rst b/doc/install-guide/source/ceilometer.rst index f9c0254ce9..80ce96151b 100644 --- a/doc/install-guide/source/ceilometer.rst +++ b/doc/install-guide/source/ceilometer.rst @@ -1,3 +1,5 @@ +.. _install_ceilometer: + ======================== Add the Telemetry module ======================== diff --git a/doc/install-guide/source/environment-nosql-database.rst b/doc/install-guide/source/environment-nosql-database.rst new file mode 100644 index 0000000000..944722affd --- /dev/null +++ b/doc/install-guide/source/environment-nosql-database.rst @@ -0,0 +1,169 @@ +.. _environment-nosql-database: + +NoSQL database +~~~~~~~~~~~~~~ + +The Telemetry service uses a NoSQL database to store information. The database +typically runs on the controller node. The procedures in this guide use +MongoDB. + +.. note:: + + The installation of the NoSQL database server is only necessary when + installing the Telemetry service as documented in :ref:`install_ceilometer`. + +Install and configure the database server +----------------------------------------- + +.. only:: obs + + #. Enable the Open Build Service repositories for MongoDB based on + your openSUSE or SLES version: + + On openSUSE: + + .. code-block:: console + + # zypper addrepo -f obs://server:database/openSUSE_13.2 Database + + On SLES: + + .. code-block:: console + + # zypper addrepo -f obs://server:database/SLE_12 Database + + .. note:: + + The packages are signed by GPG key ``05905EA8``. You should + verify the fingerprint of the imported GPG key before using it. + + .. code-block:: console + + Key Name: server:database OBS Project + Key Fingerprint: 116EB863 31583E47 E63CDF4D 562111AC 05905EA8 + Key Created: Mon 08 Dec 2014 09:54:12 AM UTC + Key Expires: Wed 15 Feb 2017 09:54:12 AM UTC + + Install the MongoDB package: + + .. code-block:: console + + # zypper install mongodb + +.. only:: rdo + + #. Install the MongoDB package: + + .. code-block:: console + + # yum install mongodb-server mongodb + +.. only:: ubuntu + + #. Install the MongoDB package: + + .. code-block:: console + + # apt-get install mongodb-server mongodb-clients python-pymongo + +.. only:: obs + + 2. Edit the ``/etc/mongodb.conf`` file and complete the following + actions: + + * Configure the ``bind_ip`` key to use the management interface + IP address of the controller node. + + .. code-block:: ini + + bind_ip = 10.0.0.11 + + * By default, MongoDB creates several 1 GB journal files + in the ``/var/lib/mongodb/journal`` directory. + If you want to reduce the size of each journal file to + 128 MB and limit total journal space consumption to 512 MB, + assert the ``smallfiles`` key: + + .. code-block:: ini + + smallfiles = true + + You can also disable journaling. For more information, see the + `MongoDB manual `__. + + * Start the MongoDB service and configure it to start when + the system boots: + + .. code-block:: console + + # systemctl enable mongodb.service + # systemctl start mongodb.service + +.. only:: rdo + + .. The use of mongod, and not mongodb, in the below screen is intentional. + + 2. Edit the ``/etc/mongod.conf`` file and complete the following + actions: + + * Configure the ``bind_ip`` key to use the management interface + IP address of the controller node. + + .. code-block:: ini + + bind_ip = 10.0.0.11 + + * By default, MongoDB creates several 1 GB journal files + in the ``/var/lib/mongodb/journal`` directory. + If you want to reduce the size of each journal file to + 128 MB and limit total journal space consumption to 512 MB, + assert the ``smallfiles`` key: + + .. code-block:: ini + + smallfiles = true + + You can also disable journaling. For more information, see the + `MongoDB manual `__. + + * Start the MongoDB service and configure it to start when + the system boots: + + .. code-block:: console + + # systemctl enable mongod.service + # systemctl start mongod.service + +.. only:: ubuntu + + 2. Edit the ``/etc/mongodb.conf`` file and complete the following + actions: + + * Configure the ``bind_ip`` key to use the management interface + IP address of the controller node. + + .. code-block:: ini + + bind_ip = 10.0.0.11 + + * By default, MongoDB creates several 1 GB journal files + in the ``/var/lib/mongodb/journal`` directory. + If you want to reduce the size of each journal file to + 128 MB and limit total journal space consumption to 512 MB, + assert the ``smallfiles`` key: + + .. code-block:: ini + + smallfiles = true + + If you change the journaling configuration, stop the MongoDB + service, remove the initial journal files, and start the service: + + .. code-block:: console + + # service mongodb stop + # rm /var/lib/mongodb/journal/prealloc.* + # service mongodb start + + You can also disable journaling. For more information, see the + `MongoDB manual `__. diff --git a/doc/install-guide/source/environment.rst b/doc/install-guide/source/environment.rst index 665ccac9eb..d083b07caa 100644 --- a/doc/install-guide/source/environment.rst +++ b/doc/install-guide/source/environment.rst @@ -73,4 +73,5 @@ Operations Guide `_. environment-ntp.rst environment-packages.rst environment-sql-database.rst + environment-nosql-database.rst environment-messaging.rst