分享

错误:Invalid service catalog service: compute

分生i 发表于 2017-3-28 17:36:32 [显示全部楼层] 只看大图 回帖奖励 阅读模式 关闭右栏 12 30853
分生i 发表于 2017-3-29 10:20:23
langke93 发表于 2017-3-28 19:55
楼主参考的文档最好贴出来。
首先确保keystone安装是成功的。如果成功了,在验证endpoint。而endpoint需 ...

贴网址的在审核 我直接复制出来好了
  • 为keystone 建一个数据库

    $ mysql -u root -pCREATE DATABASE keystone;GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' \  IDENTIFIED BY 'KEYSTONE_DBPASS';GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' \  IDENTIFIED BY 'KEYSTONE_DBPASS';
  • 安装软件包

    # yum install openstack-keystone httpd mod_wsgi \  memcached python-memcached# systemctl enable memcached.service# systemctl start memcached.service
  • 配置 keystone

    注意:不同版本号的keystone,其默认配置可能会有所不同

    [DEFAULT]admin_token = ADMIN_TOKENverbose = True[database]connection = mysql://keystone:KEYSTONE_DBPASS@controller/keystone[memcache]servers = localhost:11211[token]provider = uuiddriver = memcache[revoke]driver = sql
  • 初始化数据库

    # su -s /bin/sh -c "keystone-manage db_sync" keystone
  • 配置HTTP服务器

    修改服务器名

    # vim /etc/httpd/conf/httpd.confServerName controller

    添加 keystone 的服务

    # vim /etc/httpd/conf.d/wsgi-keystone.confListen 5000Listen 35357<VirtualHost *:5000>    WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}    WSGIProcessGroup keystone-public    WSGIScriptAlias / /usr/bin/keystone-wsgi-public    WSGIApplicationGroup %{GLOBAL}    WSGIPassAuthorization On    <IfVersion >= 2.4>      ErrorLogFormat "%{cu}t %M"    </IfVersion>    ErrorLog /var/log/httpd/keystone-error.log    CustomLog /var/log/httpd/keystone-access.log combined    <Directory /usr/bin>        <IfVersion >= 2.4>            Require all granted        </IfVersion>        <IfVersion < 2.4>            Order allow,deny            Allow from all        </IfVersion>    </Directory></VirtualHost><VirtualHost *:35357>    WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}    WSGIProcessGroup keystone-admin    WSGIScriptAlias / /usr/bin/keystone-wsgi-admin    WSGIApplicationGroup %{GLOBAL}    WSGIPassAuthorization On    <IfVersion >= 2.4>      ErrorLogFormat "%{cu}t %M"    </IfVersion>    ErrorLog /var/log/httpd/keystone-error.log    CustomLog /var/log/httpd/keystone-access.log combined    <Directory /usr/bin>        <IfVersion >= 2.4>            Require all granted        </IfVersion>        <IfVersion < 2.4>            Order allow,deny            Allow from all        </IfVersion>    </Directory></VirtualHost>
  • 启动HTTP服务器

    # systemctl enable httpd.service# systemctl start httpd.service
  • 验证

    [root@controller ~]# ss -ntl | grep -E "5000|35357"LISTEN     0      128         :::35357                   :::*                  LISTEN     0      128         :::5000                    :::*
4.3 注册服务实体及API
  • 配置环境变量

    [root@controller ~]# vim admin.rcexport OS_TOKEN=ADMIN_TOKENexport OS_URL=http://controller:35357/v3export OS_IDENTITY_API_VERSION=3[root@controller ~]# source admin.rc
  • 服务注册

    [root@controller ~]# openstack service create \   --name keystone --description "OpenStack Identity" identity+-------------+----------------------------------+| Field       | Value                            |+-------------+----------------------------------+| description | OpenStack Identity               || enabled     | True                             || id          | c9c8ca22d2a54c9fa1f3c77e1af7037d || name        | keystone                         || type        | identity                         |+-------------+----------------------------------+
  • API注册

    openstack为每一服务提供三种API,admin、public、internal

    [root@controller ~]# openstack endpoint create --region RegionOne \   identity public http://controller:5000/v2.0+--------------+----------------------------------+| Field        | Value                            |+--------------+----------------------------------+| enabled      | True                             || id           | 866c0c3f786c4f8c8c34d47c00ef2851 || interface    | public                           || region       | RegionOne                        || region_id    | RegionOne                        || service_id   | c9c8ca22d2a54c9fa1f3c77e1af7037d || service_name | keystone                         || service_type | identity                         || url          | http://controller:5000/v2.0      |+--------------+----------------------------------+[root@controller ~]# openstack endpoint create --region RegionOne \   identity internal http://controller:5000/v2.0+--------------+----------------------------------+| Field        | Value                            |+--------------+----------------------------------+| enabled      | True                             || id           | e6893e1876ac4eca9e0de360c8ee71cc || interface    | internal                         || region       | RegionOne                        || region_id    | RegionOne                        || service_id   | c9c8ca22d2a54c9fa1f3c77e1af7037d || service_name | keystone                         || service_type | identity                         || url          | http://controller:5000/v2.0      |+--------------+----------------------------------+[root@controller ~]# openstack endpoint create --region RegionOne \   identity admin http://controller:35357/v2.0+--------------+----------------------------------+| Field        | Value                            |+--------------+----------------------------------+| enabled      | True                             || id           | b16d1443007b4d0cb126a354ec70c0f5 || interface    | admin                            || region       | RegionOne                        || region_id    | RegionOne                        || service_id   | c9c8ca22d2a54c9fa1f3c77e1af7037d || service_name | keystone                         || service_type | identity                         || url          | http://controller:35357/v2.0     |+--------------+----------------------------------+

回复

使用道具 举报

分生i 发表于 2017-3-29 10:36:06
langke93 发表于 2017-3-28 19:55
楼主参考的文档最好贴出来。
首先确保keystone安装是成功的。如果成功了,在验证endpoint。而endpoint需 ...

贴了网址和内容都被审核了 我直接发下截图好了
1.png

2.png
3.png
4.png
6.png

回复

使用道具 举报

qcbb001 发表于 2017-3-29 17:45:12
分生i 发表于 2017-3-29 10:36
贴了网址和内容都被审核了 我直接发下截图好了

操作没有错,有两种解决办法:
1.全部的endpoint删除,从创建服务开始
[mw_shl_code=bash,true]openstack service create \
   --name keystone --description "OpenStack Identity" identity[/mw_shl_code]
包括
API注册
openstack为每一服务提供三种API,admin、public、internal

[mw_shl_code=bash,true]openstack endpoint create --region RegionOne \
   identity public http://controller:5000/v2.0[/mw_shl_code]
在后面比如gance

注册名为 image 的服务
[mw_shl_code=bash,true]openstack service create --name glance \
   --description "OpenStack Image service" image[/mw_shl_code]
注册API端点
[mw_shl_code=bash,true] openstack endpoint create --region RegionOne \
   image public http://controller:9292[/mw_shl_code]
楼主在这里出现错误可能是上面基本的服务和三种endpoint出现问题。
也就是注册glance之前的上面两步。
2.也可以通过日志查看下错误的原因





回复

使用道具 举报

12
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条