JeffSunpan27

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

官方文档安装:https://docs.openstack.org/newton/zh_CN/install-guide-rdo/keystone-install.html

mysql>
CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'keystone';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'keystone';

CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'glance';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'glance';

CREATE DATABASE nova_api;
CREATE DATABASE nova;

GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' IDENTIFIED BY 'nova';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'nova';

CREATE DATABASE neutron;
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'neutron';
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'neutron';

初始化身份认证服务的数据库

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

初始化Fernet key:

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

检查 ll /etc/keystone/

注册

keystone-manage bootstrap --bootstrap-password admin
--bootstrap-admin-url http://controller:35357/v3/
--bootstrap-internal-url http://controller:35357/v3/
--bootstrap-public-url http://controller:5000/v3/
--bootstrap-region-id RegionOne

检查

use keystone;
select * from user\G
select * from role\G
select * from endpoint\G

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:35357/v3
export OS_IDENTITY_API_VERSION=3

openstack user list
openstack role list
openstack service list
openstack project list
openstack endpoint list

配置apache

/etc/httpd/conf/httpd.conf
ServerName controller
ln -s /usr/share/keystone/wsgi-keystone.conf /etc/httpd/conf.d/

systemctl enable httpd.service
systemctl start httpd.service

2.创建项目

openstack project create --domain default
--description "Service Project" service
openstack project list

openstack project create --domain default
--description "Demo Project" demo

yum install openstack-glance

yum install openstack-nova-api openstack-nova-conductor
openstack-nova-console openstack-nova-novncproxy
openstack-nova-scheduler

yum install openstack-neutron openstack-neutron-ml2
openstack-neutron-linuxbridge ebtables

posted on 2017-09-12 10:55  JeffSunpan27  阅读(93)  评论(0编辑  收藏  举报