Centralize and clarify pip in the docs

Add a clarifying note about running pip (e.g. you might have to spell it
pip3) in a centralized place and link it from elsewhere. We should link
to this whenever we mention pip so we don't duplicate information.

Change-Id: Ie94ab144005a5846fc951f4f387703bd241181c8
Story: #2005950
Task: #34315
This commit is contained in:
Eric Fried 2019-06-25 10:06:49 -05:00
parent 93a7470d86
commit 180c83b52b
2 changed files with 20 additions and 10 deletions

View File

@ -6,8 +6,8 @@ packages from PyPI_. Placement works with Python version 2.7, but version 3.6
or higher is recommended.
This document assumes you have a working MySQL server and a working Python
environment, including the pip_ package installer. Depending on your
environment, you may wish to install placement in a virtualenv_.
environment, including the :ref:`about-pip` package installer. Depending on
your environment, you may wish to install placement in a virtualenv_.
This document describes how to run placement with uwsgi_ as its web server.
This is but one of many different ways to host the service. Placement is a
@ -21,15 +21,27 @@ That means after Keystone_, but before anything else.
Prerequisites
-------------
Before installing the service, you will need to create the database, service
credentials, and API endpoints, as described in the following sections.
.. _about-pip:
pip
^^^
Install `pip <https://pypi.org/project/pip/>`_ from PyPI_.
.. note:: Examples throughout this reference material use the ``pip`` command.
This may need to be pathed or spelled differently (e.g. ``pip3``)
depending on your installation and Python version.
python-openstackclient
^^^^^^^^^^^^^^^^^^^^^^
If not already installed, install the ``openstack`` command line tool:
.. code-block:: console
# pip install python-openstackclient
Before installing the service, you will need to create the database, service
credentials, and API endpoints, as described in the following sections.
.. _create-database-pypi:
Create Database
@ -230,7 +242,6 @@ Install and run the web server:
Further interactions with the system can be made with osc-placement_.
.. _PyPI: https://pypi.org
.. _pip: https://pypi.org/project/pip/
.. _virtualenv: https://pypi.org/project/virtualenv/
.. _uwsgi: https://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html
.. _WSGI: https://www.python.org/dev/peps/pep-3333/

View File

@ -40,9 +40,9 @@ Verify operation of the placement service.
* Install the `osc-placement`_ plugin:
.. note:: This example uses `PyPI`_ and `pip`_ but if you are using
distribution packages you can install the package from their
repository.
.. note:: This example uses `PyPI`_ and :ref:`about-pip` but if you are
using distribution packages you can install the package from
their repository.
.. code-block:: console
@ -70,4 +70,3 @@ Verify operation of the placement service.
.. _osc-placement: https://docs.openstack.org/osc-placement/latest/
.. _PyPI: https://pypi.org
.. _pip: https://pypi.org/project/pip/