分享

openstack【Kilo】入门 【keystone篇】六:创建服务实例和 API endpoint

pig2 发表于 2015-5-13 10:10:51 [显示全部楼层] 只看大图 回帖奖励 阅读模式 关闭右栏 47 135469

问题导读

1.这里配置的OS_TOKEN的作用是什么?
2.如何创建服务实例和API endpoint?




1.准备

1.配置token
[mw_shl_code=bash,true] export OS_TOKEN=ADMIN_TOKEN[/mw_shl_code]

给ADMIN_TOKEN赋值,这个指是上篇生成的,比如是294a4c8a8a475f9b9836
[mw_shl_code=bash,true]export OS_TOKEN=294a4c8a8a475f9b9836[/mw_shl_code]

2.配置 endpoint URL:
[mw_shl_code=bash,true]export OS_URL=http://controller:35357/v2.0[/mw_shl_code]

2.创建服务实例和API endpoint

1.创建Identity 实例服务:

[mw_shl_code=bash,true]openstack service create \
  --name keystone --description "OpenStack Identity" identity[/mw_shl_code]

1.png

2.创建实例服务
[mw_shl_code=bash,true]openstack endpoint create \
  --publicurl http://controller:5000/v2.0 \
  --internalurl http://controller:5000/v2.0 \
  --adminurl http://controller:35357/v2.0 \
  --region RegionOne \
  identity

[/mw_shl_code]

2.png

相关内容

openstack【Kilo】入门 【准备篇】零:整体介绍

openstack【Kilo】入门 【准备篇】一: Ubuntu14.04远程连接(ssh安装)

openstack【Kilo】入门 【准备篇】二:NTP安装

openstack【Kilo】入门 【准备篇】三:mysql(MariaDB)安装【控制节点】

openstack【Kilo】入门 【准备篇】四:RabbitMQ 安装

openstack【Kilo】入门 【keystone篇】五:keystone安装与配置

openstack【Kilo】入门 【keystone篇】六:创建服务实例和 API endpoint

openstack【Kilo】入门 【keystone篇】七:创建租户、用户、角色

openstack【Kilo】入门 【keystone篇】八:验证keystone安装部署

openstack【Kilo】入门 【keystone篇】九: 创建openstack客户端环境变量脚本

openstack【Kilo】入门 【glance篇】十:glance安装配置【控制节点】

openstack【Kilo】入门 【glance篇】十一:glance安装验证

openstack【Kilo】入门 【nova篇】十二:安装配置nova

openstack【Kilo】入门 【网络篇】十三:安装配置【控制节点】

openstack【Kilo】入门 【网络篇】十四:安装配置【网络节点】

openstack【Kilo】入门 【网络篇】十五:安装配置【计算节点】

openstack【Kilo】入门 【网络篇】十六:实例化网络

openstack【Kilo】入门 【网络篇】十七:创建实例


已有(49)人评论

跳转到指定楼层
tjx19940224 发表于 2016-8-22 13:12:33
为你抒写 发表于 2016-7-28 22:00
root@controller:/var/www/cgi-bin/keystone# openstack --debug  service create   --name keystone --des ...

openstack service create   --name keystone --description "OpenStack Identity" identity
出现InternalServerError: Internal Server Error (HTTP 500)
应该是/var/www/cgi-bin/keystone/admin 以及main有问题
官网下载的不行,
在/usr/share/keystone/下有文件wsgi.py 把其中内容cp到admin 和 main中,解决
你可以试试
回复

使用道具 举报

pig2 发表于 2015-8-24 18:08:06
本帖最后由 pig2 于 2015-8-25 13:34 编辑



[mw_shl_code=bash,true] openstack --debug  service create   --name keystone --description "OpenStack Identity" identity[/mw_shl_code]

[mw_shl_code=bash,true]DEBUG: openstackclient.api.auth Auth plugin osc_password selected
DEBUG: openstackclient.identity.v2_0.service.CreateService take_action(Namespace(columns=[], description='OpenStack Identity', formatter='table', max_width=0, name='keystone', prefix='', type=None, type_or_name='identity', variables=[]))
DEBUG: openstackclient.identity.client Instantiating identity client: <class 'openstackclient.identity.client.IdentityClientv2'>
ERROR: openstack Authorization Failed: Cannot authenticate without an auth_url
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 303, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 91, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/dist-packages/openstackclient/identity/v2_0/service.py", line 64, in take_action
    identity_client = self.app.client_manager.identity
  File "/usr/lib/python2.7/dist-packages/openstackclient/common/clientmanager.py", line 43, in __get__
    self._handle = self.factory(instance)
  File "/usr/lib/python2.7/dist-packages/openstackclient/identity/client.py", line 51, in make_client
    region_name=instance._region_name,
  File "/usr/lib/python2.7/dist-packages/keystoneclient/v2_0/client.py", line 152, in __init__
    self.authenticate()
  File "/usr/lib/python2.7/dist-packages/keystoneclient/utils.py", line 318, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/httpclient.py", line 503, in authenticate
    resp = self.get_raw_token_from_identity_service(**kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/v2_0/client.py", line 196, in get_raw_token_from_identity_service
    _("Authorization Failed: %s") % e)
AuthorizationFailure: Authorization Failed: Cannot authenticate without an auth_url
DEBUG: openstackclient.shell clean_up CreateService
DEBUG: openstackclient.shell got an error: Authorization Failed: Cannot authenticate without an auth_url
ERROR: openstackclient.shell Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line 176, in run
    return super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 238, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 303, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 91, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/dist-packages/openstackclient/identity/v2_0/service.py", line 64, in take_action
    identity_client = self.app.client_manager.identity
  File "/usr/lib/python2.7/dist-packages/openstackclient/common/clientmanager.py", line 43, in __get__
    self._handle = self.factory(instance)
  File "/usr/lib/python2.7/dist-packages/openstackclient/identity/client.py", line 51, in make_client
    region_name=instance._region_name,
  File "/usr/lib/python2.7/dist-packages/keystoneclient/v2_0/client.py", line 152, in __init__
    self.authenticate()
  File "/usr/lib/python2.7/dist-packages/keystoneclient/utils.py", line 318, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/httpclient.py", line 503, in authenticate
    resp = self.get_raw_token_from_identity_service(**kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/v2_0/client.py", line 196, in get_raw_token_from_identity_service
    _("Authorization Failed: %s") % e)
AuthorizationFailure: Authorization Failed: Cannot authenticate without an auth_url[/mw_shl_code]

错误原因:

curl http://git.openstack.org/cgit/openstack/keystone/plain/httpd/keystone.py?h=stable/kilo \  | tee /var/www/cgi-bin/keystone/main /var/www/cgi-bin/keystone/admin

下载失败
解决办法:
重新下载,成功即解决







回复

使用道具 举报

jiligulu2222 发表于 2015-8-25 10:21:25
回复

使用道具 举报

jiligulu2222 发表于 2015-8-25 10:36:45

点评

牛叉啊  发表于 2015-9-21 14:54
回复

使用道具 举报

akqzx 发表于 2015-9-15 20:41:06
楼主~我按照文档一步一步,出现这个问题
root@controller:~# openstack service create --name keystone --description "OpenStack Identity" identity
ERROR: openstack An unexpected error prevented the server from fulfilling your request. (HTTP 500) (Request-ID: req-243b80d8-afc2-4645-907d-fab27860e19f)
回复

使用道具 举报

pig2 发表于 2015-9-15 20:42:45
akqzx 发表于 2015-9-15 20:41
楼主~我按照文档一步一步,出现这个问题
root@controller:~# openstack service create --name keystone - ...

前面安装步骤有问题。



回复

使用道具 举报

akqzx 发表于 2015-9-15 20:47:56
pig2 发表于 2015-9-15 20:42
前面安装步骤有问题。

大神,可以告诉我哪里有问题吗?因为我是按照文档一步一步操作的
回复

使用道具 举报

pig2 发表于 2015-9-15 20:50:37
akqzx 发表于 2015-9-15 20:47
大神,可以告诉我哪里有问题吗?因为我是按照文档一步一步操作的

openstack An unexpected error prevented

上面错误只能定位到keystone是有问题的,详细看看日志,能否定位到。不行就多装几次,不过下次可能遇到其它问题。
总之安装过程中细心,应该不会出现问题
回复

使用道具 举报

pig2 发表于 2015-9-15 20:57:43
akqzx 发表于 2015-9-15 20:47
大神,可以告诉我哪里有问题吗?因为我是按照文档一步一步操作的

自己摸索的话,可能时间比较长一些,推荐下面视频,都是跟这些文档配套的

about云零基础开发、部署+理论openstack入门视频【J版及 K版】
https://item.taobao.com/item.htm?spm=a1z10.1-c.w4004-4627152322.7.kTfRwF&id=43850311592
回复

使用道具 举报

liuwanbing1985 发表于 2015-9-21 14:36:22
出现以下错误,请指点下:
root@controller:~# openstack service create --name keystone --description "OpenStack Identity" identity
openstack:未找到命令
回复

使用道具 举报

12345下一页
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条