(1).安装Horizon
[[email protected]~]# yum -y install openstack-dashboard
(2).修改local_settings文件,将DEBUG=
False修改为DEBUG =True
[[email protected] ~]# vi/etc/openstack-dashboard/local_settings
DEBUG = True
……
(3).修改httpd.conf文件,将#ServerNamewww.example.com:80修改为ServerName192.168.1.2:80
[[email protected] ~]# vi/etc/httpd/conf/httpd.conf
#ServerNamewww.example.com:80
ServerName192.168.1.2:80
(4).修改local_settings.py文件,将"Member"修改为"admin"
[[email protected] keystone]#vi /usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py
#OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member"
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "admin"
(5).启动http服务,设置开机自启动
[[email protected] ~]# servicehttpd start
[[email protected] ~]# chkconfighttpd on
(6).重启nova-api服务
[[email protected] ~]# serviceopenstack-nova-api restart
(7).添加防火墙策略
[[email protected] ~]# iptables-I INPUT -p tcp --dport 80 -j ACCEPT
[[email protected] ~]# iptables-I INPUT -p tcp -m multiport --dports 5900:6000 -j ACCEPT
[[email protected] ~]# iptables-I INPUT -p tcp --dport 6080 -j ACCEPT
[[email protected] ~]# serviceiptables save
Horizon安装完成,使用http://10.1.1.2/dashboard访问openstackweb界面。
用户名:admin
密码:password
添加新项目
(1).为操作员用户创建一个tenant:
[[email protected]~]# keystone tenant-create --name=manager --description=‘Manager Tenant‘
(2).创建操作员用户:
[[email protected]~]# keystone user-create --name=manager [email protected]
(3).创建一个管理角色manager:
[[email protected]~]# keystone role-create --name=manager
(4).将manager角色添加到用户:
[[email protected]~]# keystone user-role-add --user=manager --tenant=manager --role=manager
(5).将nova角色添加到用户:
[[email protected]~]# keystone user-role-add --user=nova --tenant=service--role=manager