#Controller
2.1 通过脚本安装keystone服务
2.2-2.10的认证服务的操作命令已经编写成shell脚本,通过脚本进行一键安装。如下:
# Controller节点
执行脚本iaas-install-keystone.sh进行安装。
2.2安装keystone服务软件包
yum install -y openstack-keystone httpd mod_wsgi
2.3创建Keystone数据库
# mysql –u root -p(此处数据库密码为之前安装Mysql设置的密码)
mysql> CREATE DATABASE keystone;
mysql> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'KEYSTONE_DBPASS';
mysql> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'KEYSTONE_DBPASS';
mysql> exit
2.4配置数据库连接
# crudini --set /etc/keystone/keystone.conf database connection mysql+pymysql://keystone:$KEYSTONE_DBPASS@$HOST_NAME/keystone
2.5为keystone服务创建数据库表
# su -s /bin/sh -c "keystone-manage db_sync" keystone
2.6创建令牌
#ADMIN_TOKEN=$(openssl rand -hex 10)
# crudini --set /etc/keystone/keystone.conf DEFAULT admin_token $ADMIN_TOKEN
2.7创建签名密钥和证书# crudini --set /etc/keystone/keystone.conf token provider ferne