安装KeyStone
yum -y install openstack-keystone httpd mod_wsgi查看keystone用户信息
cat /etc/group | grep keystonecat /etc/passwd | grep keystone创建keystone的数据库,并授权
mysql -uroot -p000000 -e "CREATE DATABASE keystone;"mysql -uroot -p000000 -e "grant all privileges on keystone.* to keystone@'localhost' identified by '000000';"mysql -uroot -p000000 -e "grant all privileges on keystone.* to keystone@'%' identified by '000000';"修改keystone配置文件
cp /etc/keystone/keystone.conf /etc/keystone/keystone.conf.backvi /etc/keystone/keystone.conf命令模式使用/[database找到[database],添加
connection = mysql+pymysql://keystone:000000@controller/keystone命令模式使用/[token找到[token],取消下面的注释
provider = fernet初始化keystone数据库
同步数据库
su keystone -s /bin/sh -c "keystone-manage db_sync"检查数据库
mysql -uroot -p000000use keystone;show tables;keystone组件初始化
初始化Fernet密钥库
keystone-manage fernet_setup --keystone-user keystone --keystone-group keystonekeystone-manage credential_setup --keystone-user keystone --keystone-group keystone初始化用户身份认证信息
keystone-manage bootstrap --bootstrap-password 000000 --bootstrap-admin-url http://controller:5000/v3 --bootstrap-internal-url http://controller:5000/v3 --bootstrap-public-url http://controller:5000/v3 --bootstrap-region-id RegionOne配置web服务
为apache服务器添加wsgi
ln -s /usr/share/keystone/wsgi-keystone.conf /etc/httpd/conf.d # 方法1cp /usr/share/keystone/wsgi-keystone.conf /etc/httpd/conf.d # 方法2修改配置文件
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.backvi /etc/httpd/conf/httpd.conf命令模式使用/ServerName,找到ServerName xxxxx.com:80,取消注释并修改为其下
ServerName controller启动apache,并设置开机自启
systemctl start httpd.service && systemctl enable httpd.service查看apache是否启动,如果没有启动请关闭selinux
systemctl status httpd模拟登录认证
###创建初始化环境变量文件
vi admin-loginexport OS_USERNAME=admin
export OS_PASSWORD=000000
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_AUTH_URL=http://controller:5000/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2导入环境变量进行验证
source admin-loginexport -p检测keystone服务
创建于查阅项目列表
openstack project create --domain default project查看现有项目列表
openstack project list创建角色与查阅角色列表
openstack role create useropenstack role list查看阅域列表,用户列表
openstack domain listopenstack user list
linlink~文档