#############修改hosts文件
10.0.0.11 controller
10.0.0.31 compute1
10.0.0.32 compute2
10.0.0.41 block1
10.0.0.51 object1
10.0.0.52 object2
#############关闭selinux及防火墙#############
systemctl stop firewalld
systemctl disable firewalld
#############下载openstack软件包#############
yum install centos-release-openstack-mitaka
yum upgrade
yum install python-openstackclient
配置时间同步:
yum install -y chrony
vim /etc/chrony.conf
server 10.0.0.11 iburst #只留一行
systemctl enable chronyd.service
systemctl start chronyd.service
timedatectl set-timezone Asia/Shanghai
chronyc sources
安装nova计算节点:
yum install openstack-nova-compute
修改nova配置文件:
[DEFAULT]
...
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 10.0.0.31
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[api_database]
...
connection = mysql+pymysql://nova:[email protected]/nova_api
[database]
...
connection = mysql+pymysql://nova:[email protected]/nova
[oslo_messaging_rabbit]
...
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = openstack
[keystone_authtoken]
...
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova
[vnc]
...
enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = $my_ip
novncproxy_base_url = http://controller:6080/vnc_auto.html
[glance]
...
api_servers = http://controller:9292
[oslo_concurrency]
...
lock_path = /var/lib/nova/tmp
[libvirt]
...
virt_type = qemu
启动nova计算机节点:
systemctl enable libvirtd.service openstack-nova-compute.service
systemctl start libvirtd.service openstack-nova-compute.service
安装neutron:
yum install openstack-neutron-linuxbridge ebtables ipset
修改neutron文件:
vi /etc/neutron/neutron.conf
[DEFAULT]
...
rpc_backend = rabbit
auth_strategy = keystone
[oslo_messaging_rabbit]
...
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = openstack
[keystone_authtoken]
...
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron
[oslo_concurrency]
...
lock_path = /var/lib/neutron/tmp
配置Linuxbridge代理
vi /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = provider:eth0
[vxlan]
enable_vxlan = False
[securitygroup]
...
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
为nova配置neutron:
vi /etc/nova/nova.conf
[neutron]
...
url = http://controller:9696
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron
启动neutron:
systemctl restart openstack-nova-compute.service
systemctl enable neutron-linuxbridge-agent.service
systemctl start neutron-linuxbridge-agent.service