openstack-manuals/doc/common/section_cli_install.xml
Steven Deaton d38b28e1f2 Add explanation for installing Python development packages.
Installing software via pip requires the development files
as well. This update simply notes the package names per type
of package being used. Also added a note about extra packages
being possibly needed for building, such as with Tempest.

Partial-Bug: 1367526
Change-Id: I0430c08686012b31073ed98040b5e261a9205ca6
2014-09-17 09:31:38 -05:00

283 lines
15 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0"
xml:id="install_clients">
<?dbhtml stop-chunking?>
<title>Install the OpenStack command-line clients</title>
<para>Install the prerequisite software and the Python package for
each OpenStack client.</para>
<section xml:id="install_prereq_software">
<title>Install the prerequisite software</title>
<para>Most Linux distributions include packaged versions of the
command-line clients that you can install directly, see <xref
linkend="cli_clients_install_packages"/>.
</para>
<para>
If you need to install the command-line packages source
packages, the following table lists the software that you
need to have to run the command-line clients, and provides
installation instructions as needed.
</para>
<table rules="all" width="75%">
<caption>Prerequisite software</caption>
<col width="15%"/>
<col width="85%"/>
<thead>
<tr>
<th>Prerequisite</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
<para>Python 2.6 or later</para>
</td>
<td>
<para>Currently, the clients do not support Python
3.</para>
</td>
</tr>
<tr>
<td valign="top">
<para><package>setuptools</package> package</para>
</td>
<td>
<para>Installed by default on Mac OS X.</para>
<para>Many Linux distributions provide packages to make
<package>setuptools</package> easy to install. Search
your package manager for <package>setuptools</package>
to find an installation package. If you cannot find
one, download the <package>setuptools</package> package
directly from <link
xlink:href="http://pypi.python.org/pypi/setuptools"
>http://pypi.python.org/pypi/setuptools</link>.</para>
<para>The recommended way to install
<package>setuptools</package> on Microsoft Windows is
to follow the documentation provided <link
xlink:href="https://pypi.python.org/pypi/setuptools#windows"
>on the setuptools website</link>. Another option is
to use the unofficial binary installer maintained by
Christoph Gohlke (<link
xlink:href="http://www.lfd.uci.edu/~gohlke/pythonlibs/#setuptools"
>http://www.lfd.uci.edu/~gohlke/pythonlibs/#setuptools</link>).
</para>
</td>
</tr>
<tr>
<td valign="top"><package>pip</package> package</td>
<td>
<para>To install the clients on a Linux, Mac OS X,
or Microsoft Windows system, use
<package>pip</package>. It is easy to
use, ensures that you get the latest
version of the clients from the <link
xlink:href="http://pypi.python.org/"
>Python Package Index</link>, and lets
you update or remove the packages later
on.</para>
<para>Since the installation process compiles source
files, this requires the related Python development
package for your operating system and distribution.</para>
<para>Install <package>pip</package> through the
package manager for your system:</para>
<formalpara>
<title>MacOS</title>
<para><screen><prompt>#</prompt> <userinput>easy_install pip</userinput></screen></para>
</formalpara>
<formalpara>
<title>Microsoft Windows</title>
<para>Ensure that the
<filename>C:\Python27\Scripts</filename>
directory is defined in the
<literal>PATH</literal> environment
variable, and use the
<command>easy_install</command>
command from the
<package>setuptools</package>
package:
<screen><prompt>C:\></prompt><userinput>easy_install pip</userinput></screen>Another
option is to use the unofficial binary
installer provided by Christoph Gohlke
(<link
xlink:href="http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip"
>http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip</link>).</para>
</formalpara>
<formalpara>
<title>Ubuntu and Debian</title>
<para>
<screen><prompt>#</prompt> <userinput>apt-get install python-devel python-pip</userinput></screen>
</para>
</formalpara>
<para>
Note that extra dependencies may be required, per
operating system, depending on the package being
installed, such as is the case with Tempest.
</para>
<formalpara>
<title>Red Hat Enterprise Linux, CentOS, or Fedora</title>
<para>A packaged version enables you to use <package>yum</package>
to install the package:
<screen><prompt>#</prompt> <userinput>yum install python-dev python-pip</userinput></screen>
There are also packaged versions of the
clients available in <link
xlink:href="http://openstack.redhat.com/">RDO</link>
that enable <package>yum</package> to
install the clients as described in <xref
linkend="cli_clients_install_packages"/>.
</para>
</formalpara>
<formalpara>
<title>SUSE Linux Enterprise Linux 11</title>
<para>A <link
xlink:href="https://build.opensuse.org/package/show?package=python-pip&amp;project=Cloud:OpenStack:Master">packaged
version available in the Open Build
Service</link> enables you to use
or <package>zypper</package> to install the package.
First, add the Open Build Service repository:
<screen><prompt>#</prompt> <userinput>zypper addrepo -f obs://Cloud:OpenStack:Icehouse/SLE_11_SP3 Icehouse</userinput></screen>
Then install <package>pip</package> and use it to manage client installation:
<screen><prompt>#</prompt> <userinput>zypper install python-devel python-pip</userinput></screen>
There are also packaged versions of the clients available
that enable <package>zypper</package> to install the
clients as described in <xref linkend="cli_clients_install_packages"/>.
</para>
</formalpara>
<formalpara>
<title>openSUSE</title>
<para>You can install
<package>pip</package> and use it to
manage client installation:
<screen><prompt>#</prompt> <userinput>zypper install python-devel python-pip</userinput></screen>
There are also packaged versions of the clients available
that enable <package>zypper</package> to install the
clients as described in <xref linkend="cli_clients_install_packages"/>
</para>
</formalpara>
</td>
</tr>
</tbody>
</table>
</section>
<section xml:id="cli_clients_install">
<title>Install the clients</title>
<para>When following the instructions in this section, replace
<replaceable>PROJECT</replaceable> with the lowercase
name of the client to install, such as
<command>nova</command>. Repeat for each client. The
following values are valid:</para>
<itemizedlist>
<listitem>
<para><literal>ceilometer</literal> - Telemetry
API</para>
</listitem>
<listitem>
<para><literal>cinder</literal> - Block Storage API
and extensions</para>
</listitem>
<listitem>
<para><literal>glance</literal> - Image Service
API</para>
</listitem>
<listitem>
<para><literal>heat</literal> - Orchestration
API</para>
</listitem>
<listitem>
<para><literal>keystone</literal> - Identity service
API and extensions</para>
</listitem>
<listitem>
<para><literal>neutron</literal> - Networking
API</para>
</listitem>
<listitem>
<para><literal>nova</literal> - Compute API and
extensions</para>
</listitem>
<listitem>
<para><literal>sahara</literal> - Database Processing
API</para>
</listitem>
<listitem>
<para><literal>swift</literal> - Object Storage
API</para>
</listitem>
<listitem>
<para><literal>trove</literal> - Database Service
API</para>
</listitem>
<listitem>
<para><literal>common</literal> - Common OpenStack client
</para>
</listitem>
</itemizedlist>
<para>The following example shows the command for installing
the nova client with
<replaceable>pip</replaceable>.</para>
<screen><prompt>#</prompt> <userinput>pip install python-novaclient</userinput></screen>
<section xml:id="cli_clients_install_pip">
<title>Installing with pip</title>
<para>Use <package>pip</package> to install the OpenStack
clients on a Linux, Mac OS X, or Microsoft Windows
system. It is easy to use and ensures that you get the
latest version of the client from the <link
xlink:href="http://pypi.python.org/pypi">Python
Package Index</link>. Also, <package>pip</package>
enables you to update or remove a package.</para>
<para>Install each client separately by using the
following command:</para>
<itemizedlist>
<listitem><para>For Mac OS X or Linux:</para>
<screen><prompt>#</prompt> <userinput>pip install python-<replaceable>PROJECT</replaceable>client</userinput></screen></listitem>
<listitem><para>For Microsoft Windows:</para>
<screen><prompt>C:\></prompt><userinput>pip install python-<replaceable>PROJECT</replaceable>client</userinput></screen></listitem>
</itemizedlist>
</section>
<section xml:id="cli_clients_install_packages">
<title>Installing from packages</title>
<para>RDO, openSUSE and SUSE Linux Enterprise have client packages that can be
installed without <filename>pip</filename>.</para>
<para>On Red Hat Enterprise Linux, CentOS, or Fedora, use
<command>yum</command> to install the clients from
the packaged versions available in <link
xlink:href="http://openstack.redhat.com/"
>RDO</link>:
<screen><prompt>#</prompt> <userinput>yum install python-<replaceable>PROJECT</replaceable>client</userinput></screen></para>
<para>For openSUSE, use <package>zypper</package> to install the clients
from the distribution packages
Service:
<screen><prompt>#</prompt> <userinput>zypper install python-<replaceable>PROJECT</replaceable></userinput></screen></para>
<para>For SUSE Linux Enterprise Server, use
<package>zypper</package> to install the clients from
the distribution packages in the Open Build Service. First,
add the Open Build Service repository:
<screen><prompt>#</prompt> <userinput>zypper addrepo -f obs://Cloud:OpenStack:Icehouse/SLE_11_SP3 Icehouse</userinput></screen>
Then you can install the packages:
<screen><prompt>#</prompt> <userinput>zypper install python-<replaceable>PROJECT</replaceable></userinput></screen>
</para>
</section>
</section>
<section xml:id="cli_clients_remove_upgrade">
<title>Upgrade or remove clients</title>
<para>To upgrade a client, add the
<literal>--upgrade</literal> option to the
<command>pip install</command> command:</para>
<screen><prompt>#</prompt> <userinput>pip install --upgrade python-<replaceable>PROJECT</replaceable>client</userinput></screen>
<para>To remove the a client, run the <command>pip
uninstall</command> command:</para>
<screen><prompt>#</prompt> <userinput>pip uninstall python-<replaceable>PROJECT</replaceable>client</userinput></screen>
</section>
<section xml:id="cli_clients_install_nextsteps" audience="enduser">
<title>What's next</title>
<para>Before you can run client commands, you must create
and source the
<filename><replaceable>PROJECT</replaceable>-openrc.sh</filename>
file to set environment variables. See <xref
linkend="cli_openrc"/>.</para>
</section>
</section>