Skip to content

Latest commit

 

History

History
107 lines (83 loc) · 2.99 KB

os_configuring.md

File metadata and controls

107 lines (83 loc) · 2.99 KB
copyright lastupdated
years
2014, 2017
2017-02-23

{:new_window: target="_blank"} {:shortdesc: .shortdesc} {:codeblock: .codeblock} {:screen: .screen} {:pre: .pre}

Configuring the CLI to use Swift and Cloud Foundry commands

To interact with the {{site.data.keyword.objectstorageshort}} service by using Swift or Cloud Foundry commands, you must install the prerequisite software. {: shortdesc}

Installing the Swift client {: #install-swift-client}

If you haven't already, install the following prerequisite software.

  • Python 2.7 or later
  • setuptools package
  • pip package
  • Cloud Foundry CLI

To install the Python Swift client, run the following command:

pip install python-swiftclient

{: pre}

To install the Python Keystone client, run the following command:

pip install python-keystoneclient

{: pre}

For more information about the prerequisites, see the OpenStack documentation. External link icon

Setting up the client {: #setup-swift-client}

To configure the Swift client, you must export your authentication information. You can generate credentials through the CLI by using Cloud Foundry or cURL commands or through the {{site.data.keyword.Bluemix_notm}} UI. The client takes the information from the environment variables in the following table.

Table 1. Environment variables and descriptions
Environment variable Description
OS_USER_ID Your {{site.data.keyword.objectstorageshort}} user ID.
OS_PASSWORD The password for your {{site.data.keyword.objectstorageshort}} instance.
OS_PROJECT_ID Your project ID.
OS_REGION_NAME The region in which your objects are stored. {{site.data.keyword.objectstorageshort}} is available in the Dallas and London regions.
OS_AUTH_URL The endpoint URL. Be sure that /v3 is added to the end of the URL.

To export your authentication information, input your credentials and run the following command:

export OS_USER_ID=
export OS_PASSWORD=
export OS_PROJECT_ID=
export OS_AUTH_URL=
export OS_REGION_NAME=
export OS_IDENTITY_API_VERSION=
export OS_AUTH_VERSION=

swift auth

{: codeblock}

Example:

export OS_USER_ID=24a20b8e4e724f5fa9e7bfdc79ca7e85
export OS_PASSWORD=*******
export OS_PROJECT_ID=383ec90b22ff4ba4a78636f4e989d5b1
export OS_AUTH_URL=https://identity.open.softlayer.com/v3
export OS_REGION_NAME=dallas
export OS_IDENTITY_API_VERSION=3
export OS_AUTH_VERSION=3

swift auth

{: screen}