openstack【Kilo】入门 【keystone篇】六:创建服务实例和 API endpoint
问题导读
1.这里配置的OS_TOKEN的作用是什么?
2.如何创建服务实例和API endpoint?
static/image/hrline/4.gif
1.准备
1.配置token
export OS_TOKEN=ADMIN_TOKEN
给ADMIN_TOKEN赋值,这个指是上篇生成的,比如是294a4c8a8a475f9b9836
export OS_TOKEN=294a4c8a8a475f9b9836
2.配置 endpoint URL:
export OS_URL=http://controller:35357/v2.0
2.创建服务实例和API endpoint
1.创建Identity 实例服务:
openstack service create \
--name keystone --description "OpenStack Identity" identity
2.创建实例服务
openstack endpoint create \
--publicurl http://controller:5000/v2.0 \
--internalurl http://controller:5000/v2.0 \
--adminurl http://controller:35357/v2.0 \
--region RegionOne \
identity
相关内容
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】入门 【网络篇】十七:创建实例
为你抒写 发表于 2016-7-28 22:00
root@controller:/var/www/cgi-bin/keystone# openstack --debugservice 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-25 13:34 编辑
openstack --debugservice create --name keystone --description "OpenStack Identity" identity
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
错误原因:
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:32 编辑
楼主大大~~我在这一步总是会报错,是不是也是因为下载失败??前面都是一步一步按照步骤来做的~~{:soso_e105:}
能帮我看看是什么问题不?
root@controller:~# openstack --debugservice create --name keystone --description "OpenStack Identity" identity
DEBUG: cliff.commandmanager found command 'hypervisor_stats_show'
DEBUG: cliff.commandmanager found command 'security_group_create'
DEBUG: cliff.commandmanager found command 'security_group_rule_list'
DEBUG: cliff.commandmanager found command 'keypair_list'
DEBUG: cliff.commandmanager found command 'security_group_rule_delete'
DEBUG: cliff.commandmanager found command 'host_show'
DEBUG: cliff.commandmanager found command 'host_list'
DEBUG: cliff.commandmanager found command 'hypervisor_show'
DEBUG: cliff.commandmanager found command 'server_pause'
DEBUG: cliff.commandmanager found command 'server_reboot'
DEBUG: cliff.commandmanager found command 'server_migrate'
DEBUG: cliff.commandmanager found command 'server_set'
DEBUG: cliff.commandmanager found command 'server_add_security_group'
DEBUG: cliff.commandmanager found command 'server_unrescue'
DEBUG: cliff.commandmanager found command 'usage_list'
DEBUG: cliff.commandmanager found command 'keypair_show'
DEBUG: cliff.commandmanager found command 'security_group_set'
DEBUG: cliff.commandmanager found command 'compute_agent_create'
DEBUG: cliff.commandmanager found command 'server_rescue'
DEBUG: cliff.commandmanager found command 'console_log_show'
DEBUG: cliff.commandmanager found command 'compute_agent_delete'
DEBUG: cliff.commandmanager found command 'server_ssh'
DEBUG: cliff.commandmanager found command 'server_lock'
DEBUG: cliff.commandmanager found command 'server_unset'
DEBUG: cliff.commandmanager found command 'server_show'
DEBUG: cliff.commandmanager found command 'server_suspend'
DEBUG: cliff.commandmanager found command 'server_add_volume'
DEBUG: cliff.commandmanager found command 'server_image_create'
DEBUG: cliff.commandmanager found command 'flavor_list'
DEBUG: cliff.commandmanager found command 'server_remove_volume'
DEBUG: cliff.commandmanager found command 'compute_agent_set'
DEBUG: cliff.commandmanager found command 'aggregate_add_host'
DEBUG: cliff.commandmanager found command 'aggregate_remove_host'
DEBUG: cliff.commandmanager found command 'compute_service_set'
DEBUG: cliff.commandmanager found command 'aggregate_create'
DEBUG: cliff.commandmanager found command 'keypair_create'
DEBUG: cliff.commandmanager found command 'ip_floating_list'
DEBUG: cliff.commandmanager found command 'aggregate_delete'
DEBUG: cliff.commandmanager found command 'aggregate_show'
DEBUG: cliff.commandmanager found command 'security_group_rule_create'
DEBUG: cliff.commandmanager found command 'security_group_delete'
DEBUG: cliff.commandmanager found command 'server_rebuild'
DEBUG: cliff.commandmanager found command 'flavor_delete'
DEBUG: cliff.commandmanager found command 'server_delete'
DEBUG: cliff.commandmanager found command 'project_usage_list'
DEBUG: cliff.commandmanager found command 'availability_zone_list'
DEBUG: cliff.commandmanager found command 'hypervisor_list'
DEBUG: cliff.commandmanager found command 'flavor_create'
DEBUG: cliff.commandmanager found command 'console_url_show'
DEBUG: cliff.commandmanager found command 'ip_fixed_add'
DEBUG: cliff.commandmanager found command 'server_remove_security_group'
DEBUG: cliff.commandmanager found command 'usage_show'
DEBUG: cliff.commandmanager found command 'compute_agent_list'
DEBUG: cliff.commandmanager found command 'flavor_show'
DEBUG: cliff.commandmanager found command 'ip_fixed_remove'
DEBUG: cliff.commandmanager found command 'ip_floating_create'
DEBUG: cliff.commandmanager found command 'server_list'
DEBUG: cliff.commandmanager found command 'server_create'
DEBUG: cliff.commandmanager found command 'ip_floating_pool_list'
DEBUG: cliff.commandmanager found command 'ip_floating_add'
DEBUG: cliff.commandmanager found command 'security_group_show'
DEBUG: cliff.commandmanager found command 'keypair_delete'
DEBUG: cliff.commandmanager found command 'server_resize'
DEBUG: cliff.commandmanager found command 'ip_floating_delete'
DEBUG: cliff.commandmanager found command 'ip_floating_remove'
DEBUG: cliff.commandmanager found command 'security_group_list'
DEBUG: cliff.commandmanager found command 'server_resume'
DEBUG: cliff.commandmanager found command 'aggregate_set'
DEBUG: cliff.commandmanager found command 'aggregate_list'
DEBUG: cliff.commandmanager found command 'server_unpause'
DEBUG: cliff.commandmanager found command 'compute_service_list'
DEBUG: cliff.commandmanager found command 'server_unlock'
DEBUG: openstackclient.shell compute API version 2, cmd group openstack.compute.v2
DEBUG: cliff.commandmanager found command 'network_set'
DEBUG: cliff.commandmanager found command 'network_delete'
DEBUG: cliff.commandmanager found command 'network_list'
DEBUG: cliff.commandmanager found command 'network_show'
DEBUG: cliff.commandmanager found command 'network_create'
DEBUG: openstackclient.shell network API version 2, cmd group openstack.network.v2
DEBUG: cliff.commandmanager found command 'image_set'
DEBUG: cliff.commandmanager found command 'image_delete'
DEBUG: cliff.commandmanager found command 'image_create'
DEBUG: cliff.commandmanager found command 'image_list'
DEBUG: cliff.commandmanager found command 'image_show'
DEBUG: cliff.commandmanager found command 'image_save'
DEBUG: openstackclient.shell image API version 1, cmd group openstack.image.v1
DEBUG: cliff.commandmanager found command 'snapshot_show'
DEBUG: cliff.commandmanager found command 'backup_create'
DEBUG: cliff.commandmanager found command 'volume_list'
DEBUG: cliff.commandmanager found command 'volume_show'
DEBUG: cliff.commandmanager found command 'snapshot_unset'
DEBUG: cliff.commandmanager found command 'volume_set'
DEBUG: cliff.commandmanager found command 'backup_delete'
DEBUG: cliff.commandmanager found command 'volume_create'
DEBUG: cliff.commandmanager found command 'volume_type_list'
DEBUG: cliff.commandmanager found command 'volume_type_create'
DEBUG: cliff.commandmanager found command 'backup_restore'
DEBUG: cliff.commandmanager found command 'backup_list'
DEBUG: cliff.commandmanager found command 'volume_unset'
DEBUG: cliff.commandmanager found command 'backup_show'
DEBUG: cliff.commandmanager found command 'volume_type_delete'
DEBUG: cliff.commandmanager found command 'volume_type_set'
DEBUG: cliff.commandmanager found command 'snapshot_set'
DEBUG: cliff.commandmanager found command 'snapshot_list'
DEBUG: cliff.commandmanager found command 'snapshot_delete'
DEBUG: cliff.commandmanager found command 'volume_delete'
DEBUG: cliff.commandmanager found command 'snapshot_create'
DEBUG: cliff.commandmanager found command 'volume_type_unset'
DEBUG: openstackclient.shell volume API version 1, cmd group openstack.volume.v1
DEBUG: cliff.commandmanager found command 'project_create'
DEBUG: cliff.commandmanager found command 'project_list'
DEBUG: cliff.commandmanager found command 'ec2_credentials_list'
DEBUG: cliff.commandmanager found command 'service_list'
DEBUG: cliff.commandmanager found command 'role_add'
DEBUG: cliff.commandmanager found command 'project_show'
DEBUG: cliff.commandmanager found command 'role_show'
DEBUG: cliff.commandmanager found command 'endpoint_delete'
DEBUG: cliff.commandmanager found command 'project_set'
DEBUG: cliff.commandmanager found command 'service_create'
DEBUG: cliff.commandmanager found command 'service_show'
DEBUG: cliff.commandmanager found command 'endpoint_show'
DEBUG: cliff.commandmanager found command 'ec2_credentials_create'
DEBUG: cliff.commandmanager found command 'catalog_list'
DEBUG: cliff.commandmanager found command 'ec2_credentials_delete'
DEBUG: cliff.commandmanager found command 'service_delete'
DEBUG: cliff.commandmanager found command 'token_issue'
DEBUG: cliff.commandmanager found command 'project_delete'
DEBUG: cliff.commandmanager found command 'endpoint_list'
DEBUG: cliff.commandmanager found command 'role_list'
DEBUG: cliff.commandmanager found command 'user_create'
DEBUG: cliff.commandmanager found command 'user_delete'
DEBUG: cliff.commandmanager found command 'user_show'
DEBUG: cliff.commandmanager found command 'role_create'
DEBUG: cliff.commandmanager found command 'role_remove'
DEBUG: cliff.commandmanager found command 'role_delete'
DEBUG: cliff.commandmanager found command 'catalog_show'
DEBUG: cliff.commandmanager found command 'token_revoke'
DEBUG: cliff.commandmanager found command 'endpoint_create'
DEBUG: cliff.commandmanager found command 'user_role_list'
DEBUG: cliff.commandmanager found command 'user_set'
DEBUG: cliff.commandmanager found command 'user_list'
DEBUG: cliff.commandmanager found command 'ec2_credentials_show'
DEBUG: openstackclient.shell identity API version 2, cmd group openstack.identity.v2
DEBUG: cliff.commandmanager found command 'object_create'
DEBUG: cliff.commandmanager found command 'object_list'
DEBUG: cliff.commandmanager found command 'object_delete'
DEBUG: cliff.commandmanager found command 'container_list'
DEBUG: cliff.commandmanager found command 'object_show'
DEBUG: cliff.commandmanager found command 'container_delete'
DEBUG: cliff.commandmanager found command 'container_create'
DEBUG: cliff.commandmanager found command 'container_show'
DEBUG: cliff.commandmanager found command 'container_save'
DEBUG: cliff.commandmanager found command 'object_save'
DEBUG: openstackclient.shell object_store API version 1, cmd group openstack.object_store.v1
DEBUG: cliff.commandmanager found command 'extension_list'
DEBUG: cliff.commandmanager found command 'quota_set'
DEBUG: cliff.commandmanager found command 'quota_show'
DEBUG: cliff.commandmanager found command 'limits_show'
INFO: openstackclient.shell command: <none> -> openstackclient.identity.v2_0.service.CreateService
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
jiligulu2222 发表于 2015-8-25 10:21
楼主大大~~我在这一步总是会报错,是不是也是因为下载失败??前面都是一步一步按照步骤来做的~~{:soso_e10 ...
问题解决了~~~{:soso_e113:}
楼主~我按照文档一步一步,出现这个问题
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)
akqzx 发表于 2015-9-15 20:41
楼主~我按照文档一步一步,出现这个问题
root@controller:~# openstack service create --name keystone - ...
前面安装步骤有问题。
pig2 发表于 2015-9-15 20:42
前面安装步骤有问题。
大神,可以告诉我哪里有问题吗?因为我是按照文档一步一步操作的
akqzx 发表于 2015-9-15 20:47
大神,可以告诉我哪里有问题吗?因为我是按照文档一步一步操作的
openstack An unexpected error prevented
上面错误只能定位到keystone是有问题的,详细看看日志,能否定位到。不行就多装几次,不过下次可能遇到其它问题。
总之安装过程中细心,应该不会出现问题
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
出现以下错误,请指点下:
root@controller:~# openstack service create --name keystone --description "OpenStack Identity" identity
openstack:未找到命令