R版OpenStack----keystone手动搭建(ubuntu 16.04):

一、R版OpenStack----keystone手动搭建(ubuntu 16.04):
1、安装前准备:

(1)安装mariadb---apt update   apt install mariadb-service
(2)登录mariadb: mysql -u root -p
(3)创建数据库----CREATE DATABASE keystone;
(4)赋予远程访问的权限:MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' \
IDENTIFIED BY 'KEYSTONE_DBPASS';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' \
IDENTIFIED BY 'KEYSTONE_DBPASS';
注:KEYSTONE_DBPASS-------->替换为合适的密码:
(5)刷新权限:--FLUSH PRIVILEGES;
(6)退出数据库:exit

2、安装组件:
(1)安装keystone Apache2 libapache2-mod-wsgi
(2)配置keystone的配置文件:—vim /etc/keystone/keystone.conf
[database]
connection=mysql+pymysql://keystone:KEYSTONE_DBPASS@controller/keystone
注:KEYSTONE_DBPASS----》数据库的密码,controller----》服务器的节点名称
[token]
provider=fernet

3、生成keystone数据库的数据: su -s /bin/sh -c “keystone-manage db_sync” keystone
注:不能连接数据库时:检查keystone配置文件,检查节点的ip

4、初始化fernet密钥存储库:
# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
# keystone-manage credential_setup --keystone-user keystone --keystone-group keystone

5、引导身份服务,创建管理员:
# keystone-manage bootstrap --bootstrap-password ADMIN_PASS
–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
注:ADMIN_PASS—>创建的管理员的密码,controller----->服务器节点的名称。

6、配置apache: vim /etc/apache2/apache2.conf
添加:ServerName ubuntu(节点名称)

7、重启apache2:service apache2 restart

8、新建环境变量配置管理用户:
$ export OS_USERNAME=admin
$ export OS_PASSWORD=ADMIN_PASS
$ 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
注:ADMIN_PASS----》管理用户的密码

你可能感兴趣的:(R版OpenStack----keystone手动搭建(ubuntu 16.04):)