Improve Undercloud documentation

* Introduce .. code-block:: bash for better color formatting
* Improving formatting in accordance to rst standart
* Adding sudo rm -rf /var/cache/yum after yum clean all

Change-Id: Ia08f205ec880ebe0a972c99d730345d9140dbf46
This commit is contained in:
Sergii Golovatiuk 2018-04-13 12:53:04 +02:00
parent 7d376e6b09
commit c19410a838
2 changed files with 75 additions and 39 deletions

View File

@ -7,12 +7,14 @@ You can upgrade any packages that are installed on the undercloud machine.
.. note:: .. note::
You may wish to backup your current repos before disabling them:: You may wish to backup your current repos before disabling them
mkdir /home/stack/REPOBACKUP .. code-block:: bash
mkdir -p /home/stack/REPOBACKUP
sudo mv /etc/yum.repos.d/delorean* /home/stack/REPOBACKUP sudo mv /etc/yum.repos.d/delorean* /home/stack/REPOBACKUP
:: .. code-block:: bash
sudo rm /etc/yum.repos.d/delorean* sudo rm /etc/yum.repos.d/delorean*
@ -24,9 +26,12 @@ You can upgrade any packages that are installed on the undercloud machine.
.. We need to manually continue our list numbering here since the above .. We need to manually continue our list numbering here since the above
"include" directive breaks the numbering. "include" directive breaks the numbering.
3. Clean the yum cache to ensure only the new repos are used:: 3. Clean the yum cache to ensure only the new repos are used
.. code-block:: bash
sudo yum clean all sudo yum clean all
sudo rm -rf /var/cache/yum
#. Update required package: #. Update required package:
@ -36,7 +41,9 @@ You can upgrade any packages that are installed on the undercloud machine.
It is strongly recommended that you validate the state of your undercloud It is strongly recommended that you validate the state of your undercloud
before starting any upgrade operations. The tripleo-validations_ repo has before starting any upgrade operations. The tripleo-validations_ repo has
some 'pre-upgrade' validations that you can execute by following the some 'pre-upgrade' validations that you can execute by following the
instructions at validations_ to execute the "pre-upgrade" group:: instructions at validations_ to execute the "pre-upgrade" group
.. code-block:: bash
mistral execution-get-output $(openstack workflow execution create -f value -c ID tripleo.validations.v1.run_groups '{"group_names": ["pre-upgrade"]}') mistral execution-get-output $(openstack workflow execution create -f value -c ID tripleo.validations.v1.run_groups '{"group_names": ["pre-upgrade"]}')
@ -74,20 +81,26 @@ You can upgrade any packages that are installed on the undercloud machine.
the Ocata to Pike upgrade. the Ocata to Pike upgrade.
Update TripleO CLI package:: Update TripleO CLI package
.. code-block:: bash
sudo yum update python-tripleoclient sudo yum update python-tripleoclient
#. Run the undercloud upgrade command. This command will upgrade all packages #. Run the undercloud upgrade command. This command will upgrade all packages
and use puppet to apply new configuration and restart all OpenStack and use puppet to apply new configuration and restart all OpenStack
services:: services
.. code-block:: bash
openstack undercloud upgrade openstack undercloud upgrade
.. note:: .. note::
You may wish to use time and capture the output to a file for any debug:: You may wish to use time and capture the output to a file for any debug
.. code-block:: bash
time openstack undercloud upgrade 2>&1 | tee undercloud_upgrade.log time openstack undercloud upgrade 2>&1 | tee undercloud_upgrade.log

View File

@ -2,15 +2,18 @@
Download and install the python2-tripleo-repos RPM from Download and install the python2-tripleo-repos RPM from
`the current RDO repository <https://trunk.rdoproject.org/centos7/current/>`_. `the current RDO repository <https://trunk.rdoproject.org/centos7/current/>`_.
For example:: For example
.. code-block:: bash
sudo yum install -y https://trunk.rdoproject.org/centos7/current/python2-tripleo-repos-<version>.el7.centos.noarch.rpm sudo yum install -y https://trunk.rdoproject.org/centos7/current/python2-tripleo-repos-<version>.el7.centos.noarch.rpm
.. note:: tripleo-repos removes any repositories that it manages before each .. note::
run. This means all repositories must be specified in a single
tripleo-repos call. As an example, the correct way to install the tripleo-repos removes any repositories that it manages before each run.
current and ceph repos is to run ``tripleo-repos current ceph``, This means all repositories must be specified in a single tripleo-repos
not two separate calls. call. As an example, the correct way to install the current and ceph repos
is to run ``tripleo-repos current ceph``, not two separate calls.
.. admonition:: Stable Branch .. admonition:: Stable Branch
:class: stable :class: stable
@ -21,76 +24,96 @@ For example::
.. admonition:: Newton .. admonition:: Newton
:class: newton mton :class: newton mton
Enable the current Newton repositories:: Enable the current Newton repositories
.. code-block:: bash
sudo -E tripleo-repos -b newton current sudo -E tripleo-repos -b newton current
.. admonition:: Ceph .. admonition:: Ceph
:class: ceph :class: ceph
Include the Ceph repo in the tripleo-repos call:: Include the Ceph repo in the tripleo-repos call
.. code-block:: bash
sudo -E tripleo-repos -b newton current ceph sudo -E tripleo-repos -b newton current ceph
.. admonition:: Ocata .. admonition:: Ocata
:class: ocata ntoo :class: ocata ntoo
Enable the current Ocata repositories:: Enable the current Ocata repositories
.. code-block:: bash
sudo -E tripleo-repos -b ocata current sudo -E tripleo-repos -b ocata current
.. admonition:: Ceph .. admonition:: Ceph
:class: ceph :class: ceph
Include the Ceph repo in the tripleo-repos call:: Include the Ceph repo in the tripleo-repos call
.. code-block:: bash
sudo -E tripleo-repos -b ocata current ceph sudo -E tripleo-repos -b ocata current ceph
.. admonition:: Pike .. admonition:: Pike
:class: pike otop :class: pike otop
Enable the current Pike repositories:: Enable the current Pike repositories
.. code-block:: bash
sudo -E tripleo-repos -b pike current sudo -E tripleo-repos -b pike current
.. admonition:: Ceph .. admonition:: Ceph
:class: ceph :class: ceph
Include the Ceph repo in the tripleo-repos call:: Include the Ceph repo in the tripleo-repos call
.. code-block:: bash
sudo -E tripleo-repos -b pike current ceph sudo -E tripleo-repos -b pike current ceph
.. admonition:: Queens .. admonition:: Queens
:class: queens ptoq :class: queens ptoq
Enable the current Queens repositories:: Enable the current Queens repositories
.. code-block:: bash
sudo -E tripleo-repos -b queens current sudo -E tripleo-repos -b queens current
.. admonition:: Ceph .. admonition:: Ceph
:class: ceph :class: ceph
Include the Ceph repo in the tripleo-repos call:: Include the Ceph repo in the tripleo-repos call
.. code-block:: bash
sudo -E tripleo-repos -b queens current ceph sudo -E tripleo-repos -b queens current ceph
.. warning:: .. warning::
The remaining repositories configuration steps below should not be done for stable
releases! The remaining repositories configuration steps below should not be done for
stable releases!
Run tripleo-repos to install the appropriate repositories. The option below Run tripleo-repos to install the appropriate repositories. The option below
will enable the latest master TripleO packages and the latest promoted will enable the latest master TripleO packages and the latest promoted
packages for all other OpenStack services and dependencies. There are other packages for all other OpenStack services and dependencies. There are other
repository configurations available in tripleo-repos, see its --help output repository configurations available in tripleo-repos, see its --help output
for details. for details.
::
.. code-block:: bash
sudo -E tripleo-repos current-tripleo-dev sudo -E tripleo-repos current-tripleo-dev
.. admonition:: Ceph .. admonition:: Ceph
:class: ceph :class: ceph
Include the Ceph repository in the tripleo-repos command:: Include the Ceph repository in the tripleo-repos command
.. code-block:: bash
sudo -E tripleo-repos current-tripleo-dev ceph sudo -E tripleo-repos current-tripleo-dev ceph