python openstack oslo_config使用_centos7+openstack (2) keystone配置

本文档详述了在CentOS7上配置OpenStack Keystone的步骤,包括生成token、修改keystone.conf文件、数据库连接、配置memcached、启动服务、配置httpd以及解决配置过程中的错误。通过这些步骤,成功地设置了Keystone服务。
摘要由CSDN通过智能技术生成

这篇文章内容主要描述如何配置keystone

先生成一个token

[root@localhost ~]# openssl rand -hex 10

f0d1ce6d4da5928849fa

修改/etc/keystone/keystone.conf

admin_token = f0d1ce6d4da5928849fa

verbose = true

[database]

connection = mysql://keystone:keystone@192.168.1.151/keystone

# mysql://keystone:your_password_of_user_keystone@192.168.1.151/keystone

# 生产环境密码要换一下

[memcache]

servers = 192.168.1.151:11211

[revoke]

driver = sql

[token]

provider = fernet

driver = memcache

内容有点乱, 再对比一下,一共7处改动

[root@localhost ~]# cat /etc/keystone/keystone.conf|grep -v "^#"|grep -v "^$"

[DEFAULT]

admin_token = f0d1ce6d4da5928849fa

verbose = true

[assignment]

[auth]

[cache]

[catalog]

[cors]

[cors.subdomain]

[credential]

[database]

connection = mysql://keystone:keystone@192.168.1.151/keystone

[domain_config]

[endpoint_filter]

[endpoint_policy]

[eventlet_server]

[eventlet_server_ssl]

[federation]

[fernet_tokens]

[identity]

[identity_mapping]

[kvs]

[ldap]

[matchmaker_redis]

[matchmaker_ring]

[memcache]

servers = 192.168.1.151:11211

[oauth1]

[os_inherit]

[oslo_messaging_amqp]

[oslo_messaging_qpid]

[oslo_messaging_rabbit]

[oslo_middleware]

[oslo_policy]

[paste_deploy]

[policy]

[resource]

[revoke]

driver = sql

[role]

[saml]

[signing]

[ssl]

[token]

provider = fernet

driver = memcache

[tokenless_auth]

[trust]

调用

keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone

创建数据库表

su -s /bin/sh -c "keystone-manage db_sync" keystone

oslo_config.cfg的错误可以忽略,另外如果你像我一样使用root用户,可以省略su -s

[root@localhost ~]# /bin/sh -c "keystone-manage db_sync" keystone

No handlers could be found for logger "oslo_config.cfg"

[root@localhost ~]#

这里会自动创建一个名为keystone的用户,密码也是keystone,测试一下登录

mysql -h 192.168.1.151 -u keystone -p

启动并且设置开机启动memcached

systemctl ena

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值