ocata openvswtich

 

一、Controller配置
1、安装软件

# yum –enablerepo=centos-openstack-ocata,epel -y install openstack-neutron openstack-neutron-ml2

2、修改配置文件/etc/neutron/neutron.conf

[DEFAULT]
core_plugin = ml2
service_plugins = router
auth_strategy = keystone
state_path = /var/lib/neutron
dhcp_agent_notification = True
allow_overlapping_ips = True
notify_nova_on_port_status_changes = True
notify_nova_on_port_data_changes = True
transport_url = rabbit://openstack:password@172.16.100.10
[keystone_authtoken]
auth_uri = http://172.16.100.10:5000
auth_url = http://172.16.100.10:35357
memcached_servers = 172.16.100.10:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = servicepassword
[database]
connection = mysql+pymysql://neutron:password@172.16.100.10/neutron
[nova]
auth_url = http://172.16.100.10:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = nova
password = servicepassword
[oslo_concurrency]
lock_path = $state_path/tmp

3、修改权限

# chmod 640 /etc/neutron/neutron.conf
# chgrp neutron /etc/neutron/neutron.conf

 

4、修改配置文件/etc/neutron/plugins/ml2/ml2_conf.ini

[ml2]
type_drivers = flat,vlan,gre,vxlan
tenant_network_types =
mechanism_drivers = openvswitch,l2population
extension_drivers = port_security
#注释以下几行
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
enable_ipset = True

5、修改/etc/nova/nova.conf

[DEFAULT]
use_neutron = True
linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[neutron]
url = http://172.16.100.10:9696
auth_url = http://172.16.100.10:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = servicepassword

6、创建链接

# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini

 

7、同步数据库

# su -s /bin/bash neutron -c “neutron-db-manage –config-file /etc/neutron/neutron.conf –config-file /etc/neutron/plugin.ini upgrade head”

 

8、重启服务

# systemctl start neutron-server
# systemctl enable neutron-server
# systemctl restart openstack-nova-api

 

二、网络节点配置
1、安装软件

# yum –enablerepo=centos-openstack-ocata,epel -y install openstack-neutron openstack-neutron-ml2 openstack-neutron-openvswitch

 

2、修改配置文件/etc/neutron/neutron.conf

[DEFAULT]
core_plugin = ml2
service_plugins = router
auth_strategy = keystone
state_path = /var/lib/neutron
allow_overlapping_ips = True
transport_url = rabbit://openstack:password@172.16.100.10
[keystone_authtoken]
auth_uri = http://172.16.100.10:5000
auth_url = http://172.16.100.10:35357
memcached_servers = 172.16.100.10:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = servicepassword
[oslo_concurrency]
lock_path = $state_path/lock

 

2、修改权限

# chmod 640 /etc/neutron/neutron.conf
# chgrp neutron /etc/neutron/neutron.conf

1
2

3、修改配置文件/etc/neutron/l3_agent.ini

# line 17: add
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
# line 100: add ( it’s OK with no value (set later if need) )
external_network_bridge =

 

4、修改配置文件/etc/neutron/dhcp_agent.ini

# line 17: add
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
# line 32: uncomment
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
# line 41: uncomment and change
enable_isolated_metadata = True
5、修改配置文件/etc/neutron/metadata_agent.ini
# line 22: uncomment and specify Nova API server
nova_metadata_ip = 172.16.100.10
# line 34: uncomment and specify any secret key you like
metadata_proxy_shared_secret = metadata_secret

 

6、修改配置文件/etc/neutron/plugins/ml2/ml2_conf.ini

[ml2]
type_drivers = flat,vlan,gre,vxlan
tenant_network_types =
mechanism_drivers = openvswitch,l2population
extension_drivers = port_security
# line 247: uncomment and add
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
# end line: uncomment
enable_ipset = True

 

7、创建链接

# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini

 

8、重启服务

# systemctl start openvswitch
# systemctl enable openvswitch

 

9、创建网桥

# ovs-vsctl add-br br-int

 

10、重启服务

# for service in dhcp-agent l3-agent metadata-agent openvswitch-agent; do
systemctl start neutron-$service
systemctl enable neutron-$service
done

 

三、计算节点配置
1、安装软件

# yum –enablerepo=centos-openstack-ocata,epel -y install openstack-neutron openstack-neutron-ml2 openstack-neutron-openvswitch

 

2、修改配置文件/etc/neutron/neutron.conf

[DEFAULT]
core_plugin = ml2
service_plugins = router
auth_strategy = keystone
state_path = /var/lib/neutron
allow_overlapping_ips = True
transport_url = rabbit://openstack:password@172.16.100.10

[keystone_authtoken]
auth_uri = http://172.16.100.10:5000
auth_url = http://172.16.100.10:35357
memcached_servers = 172.16.100.10:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = servicepassword

[oslo_concurrency]
lock_path = $state_path/lock

 

3、修改权限

# chmod 640 /etc/neutron/neutron.conf
# chgrp neutron /etc/neutron/neutron.conf

 

4、修改/etc/neutron/plugins/ml2/ml2_conf.ini

[ml2]
type_drivers = flat,vlan,gre,vxlan
tenant_network_types =
mechanism_drivers = openvswitch,l2population
extension_drivers = port_security
# line 247: uncomment and add
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
# end line: uncomment
enable_ipset = True

 

5、修改/etc/nova/nova.conf

[DEFAULT]
use_neutron = True
linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver
vif_plugging_is_fatal = True
vif_plugging_timeout = 300

[neutron]
url = http://172.16.100.10:9696
auth_url = http://172.16.100.10:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = servicepassword
service_metadata_proxy = True
metadata_proxy_shared_secret = metadata_secret

 

6、创建软连接

# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini

1

7、启动服务

# systemctl start openvswitch
# systemctl enable openvswitch

 

8、创建网桥

# ovs-vsctl add-br br-int

 

9、重启服务并设置开机启动

# systemctl restart openstack-nova-compute
# systemctl start neutron-openvswitch-agent
# systemctl enable neutron-openvswitch-agent

 

作者:【吴业亮】云计算开发工程师

本文来自投稿,不代表Linux运维部落立场,如若转载,请注明出处:http://www.178linux.com/91211

(0)
N27_DanryN27_Danry
上一篇 2018-01-22 14:15
下一篇 2018-01-22 14:51

相关推荐

  • iptables

    Evernote Export   基于本机服务器的iptables: 创建、重命名、删除自定义chain ~]# iptables -N testchain ~]# iptables -nL Chain INPUT (policy ACCEPT) target     prot opt source    …

    Linux干货 2016-11-20
  • gitlab-ce官方文档查看备录

    gitlab文档 关于gitlab-ce GitLab Community Edition (CE) is available freely under the MIT Expat license. 关于unicorn的workers For&nbs…

    Linux干货 2015-09-06
  • 关于大型网站技术演进的思考(十四)–网站静态化处理—前后端分离—上(6)

    原文出处: 夏天的森林  前文讲到了CSI技术,这就说明网站静态化技术的讲述已经推进到了浏览器端了即真正到了web前端的范畴了,而时下web前端技术的前沿之一就是前后端 分离技术了,那么在这里网站静态化技术和前后端分离技术产生了交集,所以今天我将讨论下前后端分离技术,前后端分离技术讨论完后,下一篇文章我将会以网站 静态化技术的角度回过头来…

    Linux干货 2015-02-26
  • MHA

    1.关于MHA MHA是一款开源的mysql的高可用程序,它为mysql主从复制架构提供了automating master failover功能。MHA在监控到master节点故障时,会提升其中拥有最新数据的slave节点成为新的master节点,在此期间,MHA会通过与其他从节点获取额外的信息来避免不一致性的问题。MHA还提供了master节点的在线切换…

    2016-11-26
  • 计算机基础

    小白入门

    2018-03-08
  • linux文件基本权限、默认权限、隐藏权限和ACL权限

    基本权限    文件属性rwx     每个文件当用ls -l查看时,都会显示文件的详细属性信息,其中在排在首位的共有10位字符信息     例如 -rw-r–rw-. 1 root root …….. 共有10位,第一位代表的是文件的类型,后边9位表示的是文件的…

    Linux干货 2016-08-04