Set environment variables using the OpenStack RC file
2015-11-18 09:27
330 查看
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 taband 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/cacertFileOn 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
相关文章推荐
- 边做边学Rust之用户自定义类型
- Centos永久路由添加教程
- 使用myeclipse+tomcat 在部署项目的时候发现不能点击finish
- tomcat 多实例部署脚本
- Linux expect与Shell交互
- shell脚本
- 第一次在linux的环境下写第一次在真机上安装linux的感受
- 关于linux系统下的cache Memory
- hadoop使用场景
- Hadoop新手学习指导
- Photoshop辅助园林制图流程(二维的、三维的效果图)
- Hadoop到底能做什么?怎么用hadoop?
- Hadoop简介(1):什么是Map/Reduce
- hadoop HDFS文件系统的特征
- Linux优化
- suse linux 安装无线网卡驱动
- openwrt中使用dd备份
- opencv 矩阵操作大全
- linux启动过程
- CentOS 7 / RHEL 7 systemd 指令