Openstack安装记录
安装环境 ubuntu12.04 LTS 虚拟机 安装openstack:Havana
apt-get install -y mysql-server python-mysqldb
#设置root密码
```
## Keystone
### 配置 keystone 数据表
MySQL创建数据表 赋权
```bash
mysql> create database keystone;
grant all privileges on keystone .* to 'root'@'loaclhost' identified by '123456';
验证安装、初始化数据库
keystone-manage db_sync
创建keystone用户绑定角色
keystone tenant-create --name=admin
keystone user-create --name=admin --pass='123456'
keystone role-create --name=admin
keystone user-role-add --user admin --role admin --tenant admin
```
定义 keystone Service 和 API endpoint
```bash
keystone service-create --name keystone --type identity --description 'openstack identity'
keystone endpoint-create --service-id xxxxx --publicurl 'http://controller:5000/v2.0' --adminurl 'http://controller:35357/v2.0' --internalurl 'http://controller:5000/v2.0'
keystone user-list
Glance
mysql -uroot -p -e"create database glance;"
mysql -uroot -p -e"grant all privileges on glance.* to 'glanceuser'@'controller'identified by '123456';"
创建user glance tanant glance 并绑定:
keystone tenant-create --name=service
keystone user-create --name=glance --pass='123456'
keystone user-role-add --user glance --role admin --tenant service
#keystone 创建glance服务和endpoint api
keystone service-create --name glance --type image --description 'openstack image service'
keystone endpoint-create --service-id 10f27961d7b34231abefb2a3c001c2a9 --publicurl 'http://controller:9292/' --adminurl 'http://controller:9292/' --internalurl 'http://controller:9292/'
值得注意的是其他组件如neutron、Nova都有类似步骤。