Set environment variables using the OpenStack RC file

翻译 2015年11月18日 09:27:44

Download and source the OpenStack RC file

Log in to the OpenStack dashboard, choose the project for which you want to download the OpenStack RC file, on theProject tab, open theCompute tab and clickAccess & Security.

登录Openstack dashboard,选择希望下载的Openstack RC文件,在Project标签下,点击Compute标签下的Access & Security

On the API Access tab, clickDownload OpenStack RC File and save the file. The filename will be of the formPROJECT-openrc.sh wherePROJECT is the name of the project for which you downloaded the file.

在访问API标签下,点击下载 OpenStack RC 文件。文件名会以 PROJECT-openrc.sh的形式保存,文件中的PROJECT是工程名。

Copy the PROJECT-openrc.sh file to the computer from which you want to run OpenStack commands.

For example, copy the file to the computer from which you want to upload an image with aglance client command.

On any shell from which you want to run OpenStack commands, source the PROJECT-openrc.sh file for the respective project.

In the following example, the demo-openrc.sh file is sourced forthe demo project:

$ source demo-openrc.sh

When you are prompted for an OpenStack password, enter the password for the user who downloaded thePROJECT-openrc.sh file.

运行命令后,会被提示输入密码,输入下载工程名的用户的密码即可。


Create and source the OpenStack RC file

Alternatively, you can create the PROJECT-openrc.sh file from scratch, if you cannot download the file from the dashboard.

除了下载RC文件外,还可以从零开始创建 PROJECT-openrc.sh 文件,如果不能从dashboaed中下载的话。

In a text editor, create a file named PROJECT-openrc.sh and add the following authentication information:

PROJECT-openrc.sh为名,创建一个文件,添加以下验证信息。

export OS_USERNAME=username
export OS_PASSWORD=password
export OS_TENANT_NAME=projectName
export OS_AUTH_URL=https://identityHost:portNumber/v2.0
# The following lines can be omitted
export OS_TENANT_ID=tenantIDString
export OS_REGION_NAME=regionName
export OS_CACERT=/path/to/cacertFile
On any shell from which you want to run OpenStack commands, source the PROJECT-openrc.sh file for the respective project. In this example, you source theadmin-openrc.sh file for the admin project:

例如:读取 admin-openrc.sh 文件为admin工程,添加环境变量。

详细见:

http://docs.openstack.org/user-guide/common/cli_set_environment_variables_using_openstack_rc.html

How to set up live-migration environment for Openstack with devstack

1) Install OS    1.1) Install Ubuntu 12.04          root@nova:~# cat /etc/*release DISTRIB_ID=Ubu...

QTP Environment Variables

Chapter 6 QTP Environment Variables QTP中的环境变量作为一种特殊变量贯穿整个测试集。环境变量的生命周期与整个测试集的执行周期一致。环境变量的主要作用于Actio...
  • imcora
  • imcora
  • 2012年07月30日 13:25
  • 1739

C获取linux系统环境变量方法(Environment Variables)

主要有三种方法,都很简单。 1 一个单纯c语言获取的方式 #include #include int main(){ char *pathvar = getenv("PATH");...
  • sole_cc
  • sole_cc
  • 2014年12月28日 14:55
  • 1375

QTP 6-9 QTP基础2 Environment Variables &Utility Objects & Checkpoints& Library Files

6. (QTP Environment Variables) 环境变量 项目经验:把常用的全局变量保存为单独文件,再引入为环境变量。通常是随便加个环境变量,export出来成为XML文件,再编辑XM...

【Xcode使用技巧】Xcode环境变量(environment variables)

Apple Build Setting Reference在苹果的 Build Setting Reference 文档1中可以找到所有可用的变量。工程中存在的所有环境变量在build 过程中,要想观...

Implementing a Thread-Safe Queue using Condition Variables

From: http://www.justsoftwaresolutions.co.uk/threading/implementing-a-thread-safe-queue-using-condit...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Set environment variables using the OpenStack RC file
举报原因:
原因补充:

(最多只允许输入30个字)