分享

OpenStack command-line clients---Install the clients(安装命令行客户端)

 java_laq小馆 2013-08-22

 Install the Openstack command-line clients

安装OpenStack命令行客户端

To install the clients, install the prerequisite software and the Python package for each OpenStack client.

在安装客户端之前,先必须安装必要的软件和Python软件包。

[Note]Note

If you already installed the OpenStack client packages by using the package management tools provided by your distribution, proceed to the section called “OpenStack RC file”.

注:如果你已从发行的包管理工具中安装了OpenStack客户端软件包,则可以直接跳到“OpenStack RC 文件”章节。

 Install the prerequisite software

 安装依赖的软件

To install prerequisite software

  • The following table describes the prerequisite software to install:

    下面的表格描述了OpenStack依赖的软件:

    Table 1. Prerequisite software
    PrerequisiteDescription

    Python 2.6 or later

    Currently, the clients do not support Python 3.(OpenStack客户端不支持Python3)

    setuptools package

    Installed by default on Mac OS X.

    Many Linux distributions provide packages to make setuptools easy to install.

    Search your package manager for setuptools to find an installation package. If you cannot find one, download the setuptools package directly from http://pypi./pypi/setuptools.

    许多Linux发行版中提供了安装工具包,很容易安装。在你的包管理器中搜索“安装工具”。如果软件工具包中的某一个无法找到,请直接从http://pypi./pypi/setuptools下载安装工具包。

    pip package

    To install the clients on a Mac OS X or Linux system, use pip. It is easy to use and ensures that you get the latest version of the clients from the Python Package Index. Also, it lets you update or remove the packages later on.

    为了在Mac OS X或者Linux平台上安装这些客户端工具,请使用pip。从Python Package Index站点可以很容易找到最新的这些客户端版本。pip也可以用于更新或删除这些软件包。

    Install pip through the package manager for your system:

    下面是在不同OS平台,通过软件包安装pip的方法:

    • Mac OS X

      $ sudo easy_install pip
    • Ubuntu 12.04

      A packaged version enables you to use dpkg or aptitude to install the python-novaclient.

      允许您使用dpkg安装一个打包的版本来安装python-novaclient。

      # aptitude install python-novaclient
    • Ubuntu

      # aptitude install python-pip
    • RHEL, CentOS, or Fedora

      A packaged version available in RDO enables you to use yum to install the clients:

      你可以使用yum命令在RDO平台上安装一个打包的客户端版本:

      # yum install python-PROJECTclient

      Replace PROJECT with the lower case name of the client to install, such as nova. Repeat this step for each desired client.

      Alternatively install pip and use it to manage client installation:

      另外,安装pip,让它可以用来管理客户端的安装。

      # yum install python-pip
    • openSUSE 12.2 and earlier

      A packaged version available in the Open Build Service enables you to use rpm or zypper to install the the python-novaclient.

      # zypper install python-PROJECT

      Replace PROJECT with the lower case name of the client to install, such as nova. Repeat this step for each desired client.

      Alternatively install pip and use it to manage client installation:

      另外,安装pip,让它可以用来管理客户端的安装。

      # zypper install python-pip 
    • openSUSE 12.3

      A packaged version enables you to use rpm or zypper to install the clients:

      这个版本可以让你使用rpm或者zypper来安装客户端。

      # zypper install python-PROJECTclient

      Replace PROJECT with the lower case name of the client to install, such as nova. Repeat this step for each desired client.

 Install the clients

安装客户端

Use pip to install the OpenStack clients on a Mac OS X or Linux system. It is easy and ensures that you get the latest version of the client from the Python Package Index. Also, pip lets you update or remove a package. After you install the clients, you must source an openrc file to set required environment variables before you can request OpenStack services through the clients or the APIs.

 我们使用pip在Mac OS X或者Linux平台上安装OpenStack客户端 Python Package Index站点可以很容易找到最新的这些客户端版本。pip也可以用于更新或删除这些软件包。 当安装完这些客户端后,需要执行 source openrc file使环境变量生效,以便于通过这些客户端访问OpenStack服务的API。

To install the clients

安装这些客户端的步骤如下:

  1. You must install each client separately.

    Run the following command to install or update a client package:

    首先,你必须分开安装每个客户端。运行下面的指令来安装或更新客户端软件包:

    $ sudo pip install [--update] python-<project>client

    Where <project> is the project name and has one of the following values:

    上述命令中,<project>处填写的项目名称是下面列表中的任一个:

    • nova. Compute API and extensions. (计算服务和扩展)

    • neutron. Networking API. (网络API)

    • keystone. Identity Service API. (身份识别API)

    • glance. Image Service API. (镜像服务API)

    • swift. Object Storage API. (对像存储API)

    • cinder. Block Storage Service API. (块存储服务API)

    • heat. Orchestration API. (这个东东,如何翻译???)

    For example, to install the nova client, run the following command:

    比如,要安装nova客户端,则运行下面的命令:

    $ sudo pip install python-novaclient

    To update the nova client, run the following command:

    要更新nova客户端,则运行下面的命令:

    $ sudo pip install --upgrade python-novaclient

    To remove the nova client, run the following command:

    要删除nova客户端,则运行下面的命令:

    $ sudo pip uninstall python-novaclient
  2. Before you can issue client commands, you must download and source the openrc file to set environment variables. Proceed to the section called “OpenStack RC file”.

    在你使用这些客户端指令前,必须先下载并执行source the openrc 文件,使环境变量生效。

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多