From 77483bcf9ee6cb09b71c5c1f9fa38df748da49a9 Mon Sep 17 00:00:00 2001 From: Spyros Trigazis Date: Thu, 15 Sep 2016 15:01:45 +0200 Subject: [PATCH] [install] Fix the cli install instructions Previously, the client was installed in a virtualenv only accessible by the magnum service user. Add instructions to install the client as a non-root user. Change-Id: I865292e69d4a8683aa94440de88e357835feab78 Partially-Implements: blueprint magnum-installation-guide --- doc/source/install-guide-from-source.rst | 59 +++++++++++++++++++++--- 1 file changed, 53 insertions(+), 6 deletions(-) diff --git a/doc/source/install-guide-from-source.rst b/doc/source/install-guide-from-source.rst index 1fdec61d5e..8c08fce679 100644 --- a/doc/source/install-guide-from-source.rst +++ b/doc/source/install-guide-from-source.rst @@ -543,15 +543,62 @@ Finalize installation # systemctl status magnum-api # systemctl status magnum-conductor -#. Install the command-line client: +Install the command-line client +------------------------------- + +#. Install OS-specific prerequisites: + + * Fedora 21/RHEL 7/CentOS 7 + + .. code-block:: console + + # yum install python-devel openssl-devel python-virtualenv \ + libffi-devel git gcc + + * Fedora 22 or higher + + .. code-block:: console + + # dnf install python-devel openssl-devel python-virtualenv \ + libffi-devel git gcc + + * Ubuntu/Debian + + .. code-block:: console + + # apt-get update + # apt-get install python-dev libssl-dev python-virtualenv \ + libffi-dev git gcc + + * openSUSE Leap 42.1 + + .. code-block:: console + + # zypper install python-devel libopenssl-devel python-virtualenv \ + libffi-devel git gcc + +#. Install the client in a virtual environment: .. code-block:: console - # cd /var/lib/magnum - # git clone https://git.openstack.org/openstack/python-magnumclient.git - # cd python-magnumclient - # su -s /bin/sh -c "/var/lib/magnum/env/bin/pip install -r requirements.txt" magnum - # su -s /bin/sh -c "/var/lib/magnum/env/bin/python setup.py install" magnum + $ cd ~ + $ git clone https://git.openstack.org/openstack/python-magnumclient.git + $ cd python-magnumclient + $ virtualenv .magnumclient-env + $ .magnumclient-env/bin/pip install -r requirements.txt + $ .magnumclient-env/bin/python setup.py install + +#. Now, you can export the client in your PATH: + + .. code-block:: console + + $ export PATH=$PATH:${PWD}/.magnumclient-env/bin/magnum + + .. note:: + + The command-line client can be installed on the controller node or + on a different host than the service. It is good practice to install it + as a non-root user. Next Steps ----------