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

相关推荐

  • 初探VIM_第六周练习(02)

    引言—什么是Vim? 接触Linux这么久,想必对于一切皆文件的哲学思想已经不陌生了。因此,学习并掌握用一款Linux文本编辑器,对于玩转LInux来说,是很有必要的。 vi编辑器是Unix系统最初的编辑器,它使用控制台图形模式来模拟文本编辑窗口,允许查看文件中的行、在文件中移动、插入、编辑和替换文本。 在GNU项目将vi编辑器移植到开源世界时,…

    Linux干货 2016-12-18
  • 自定义命令提示符

     命令提示符的格式放在变量PS1中         命令提示符特殊字符定义             \u  当前用户      &…

    Linux干货 2017-05-02
  • 02Linux上终端的类型

    一、终端的概念 所谓终端就是在一个连接主机的端子上面接入鼠标、键盘、显示器等所组成的一个组合。终端用于用户与主机之间的交互。早期的时候,在大型主机上,想使用主机的用户很多,但是主机却只有一个,也不能实现人手一台。于是为了让一台主机给多个用户使用,便产生了多个终端和多个用户,这样每个用户只要有一个终端变可以与主机交互了。 二、终端的种类 终端的类型有四类:物理…

    Linux干货 2016-10-14
  • Linux的文本处理工具及grep正则表达式的使用

    文本处理工具及grep正则表达式的使用 本章节学习的内容: 1、各种文本工具来查看、分析、统计文本文件 2、grep正则表达式 3、扩展正则表达式 一、抽取文本的工具: 1、按文件内容:less和cat 2、按文件截取:head和tail 3、按列抽取:cut 4、按关键字抽取:grep 二、文件查看命令:cat, tac,rev 1、命令cat: (1)文…

    Linux干货 2016-08-05
  • day7作业练习

    1、显示当前系统root、mage或wang用户的UID和默认shell  2、找出/etc/rc.d/init.d/functions文件中行首为某单词(包 括下划线)后面跟一个小括号的行  3、使用egrep取出/etc/rc.d/init.d/functions中其基名     v …

    系统运维 2016-08-08
  • 虚拟化介绍、以及kvm

    什么是虚拟化? 在计算机领域中虚拟化,和我们平时说的虚拟化并没有什么两样,说白了就是一个虚拟出来的东西罢了,并不是真实存在的。 虚拟化的历史 虚拟化早在20实际60年代末,由IBM开发被命名为vmm(Virtual Machine Monitor)虚拟机监视器的软件,我们知道那时候工艺技术并不发达,电脑也不像现在这样属于每家每户的标配,IBM为了解决电脑使用…

    2017-03-08