OpenStack中SWIFT对接测试
来源:互联网 发布:手机端域名注册 编辑:程序博客网 时间:2024/05/16 02:03
我们部署好OPenStack以及Swift后,想使用开放接口对Swift进行对接,但是却找不到入口,下面就一步一步介绍一下如何使用租户,用户名和密码对接Swift。
首先,我们安装好SWIFT后,在命令行执行
nova list和keystone tenant-list都会显示错误,如下图:
是因为,我们还没有导出。
进入OPenStack主页,点Access&Security,右上角有个Download Openstack RC File,点击下载。
下载到部署Openstack的主机上,点击打开。
里面有租户,用户名和密码的内容。修改之。改成以下:
#!/bin/bash# To use an OpenStack cloud you need to authenticate against the Identity# service named keystone, which returns a **Token** and **Service Catalog**.# The catalog contains the endpoints for all services the user/tenant has# access to - such as Compute, Image Service, Identity, Object Storage, Block# Storage, and Networking (code-named nova, glance, keystone, swift,# cinder, and neutron).## *NOTE*: Using the 2.0 *Identity API* does not necessarily mean any other# OpenStack API is version 2.0. For example, your cloud provider may implement# Image API v1.1, Block Storage API v2, and Compute API v2.0. OS_AUTH_URL is# only for the Identity API served through keystone.export OS_AUTH_URL=http://192.168.111.161:5000/v2.0# With the addition of Keystone we have standardized on the term **tenant**# as the entity that owns the resources.export OS_TENANT_ID=b69864c4cb0a44cfb98d4281c9739081export OS_TENANT_NAME="admin"# In addition to the owning entity (tenant), openstack stores the entity# performing the action as the **user**.export OS_USERNAME="admin"export OS_PASSWORD="swift"好了,现在你可以登录后台,新建一个文件,然后把上面的内容复制进去,执行久违的source,然后再次运行命令:
[root@node-2 ~]# vi ~/openrc[root@node-2 ~]# source ~/openrc [root@node-2 ~]# nova list[root@node-2 ~]# keystone tenant-list+----------------------------------+----------+---------+| id | name | enabled |+----------------------------------+----------+---------+| 6d0dff68ecd24215bd971a8d1935ba03 | admin | True || d1f2d43d358743eda4e37bfd489c1163 | services | True |+----------------------------------+----------+---------+[root@node-2 ~]#
ok,搞定,接下来就用curl测试一下吧
成功返回token和URL
成功。
阅读全文
0 0
- OpenStack中SWIFT对接测试
- Docker Registry对接Openstack Swift存储后端
- httpclient for java 测试 openstack swift
- httpclient for java 测试openstack swift
- httpclient for java 测试openstack swift
- openstack swift 测试脚本 上传文件api
- httpclient for java 测试 openstack swift
- openstack 对接vmware
- openstack 对接 NFS 存储
- openstack中swift和cinder中的区别
- OpenStack中Swift和cinder区别
- openstack swift
- 安装Ceph并对接OpenStack
- 如何安装Ceph并对接OpenStack
- [openstack swift] Swift Architectural Overview
- [openstack swift]0 swift介绍
- [openstack swift]0 swift介绍
- [openstack swift]SAIO
- 破译邮件
- Linux 服务器配置与部署操作笔记
- Oracle用户权限表的管理方法
- C# struct and Unity3d Vector3
- 侧滑菜单
- OpenStack中SWIFT对接测试
- 实战项目中的正则表达式运用
- win7系统的电脑右下角三角形不见了该怎么?
- UIlabel自适应高度 + 调整行间距
- 请求被中止: 未能创建 SSL/TLS 安全通道,以及解决方法。
- Android下 一个自定义VIEW实现简单的弹幕效果
- jQuery Mobile使用a标签跳转问题
- 从别人的脚本学shell(2)
- 设计模式---模板方法模式