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

相关推荐

  • Find命令的使用

    Find命令的基本用法 在Linux系统中find命令是一个强大文件查找类工具,它支持根据文件名,权限,文件大小,访问以及修改时间查找,使用方法如下: find [option] [查找起始路径] [查找条件] [处理动作] 起始路径:指定查找文件或目录的路径,默认为当前目录 查找条件:可根据文件名,权限,文件大小以及从属关系查找文件 处理动作:动查找到的文…

    Linux干货 2017-08-28
  • 马哥教育网络第21期-第九周课程练习

    1、写一个脚本,判断当前系统上所有用户的shell是否为可登录shell(即用户的shell不是/sbin/nologin);分别这两类用户的个数;通过 字符串比较来实现; #!/bin/bash nologin=$( cut -d: -f7 /etc/passwd | grep &#03…

    Linux干货 2016-11-14
  • 使用Nmap扫描系统风险点

    0x00 迅速了解Nmap Nmap是一款扫描目标网络信息的工具,可以是黑客用来探测主机信息,收集情报的神器。也可以是运维人员扫描网络环境,及时发现系统漏洞的好帮手。 0x01 它的功能 1、主机发现(Host Discovery)#探测目标网络环境中有哪些主机是可以进行通信的,当然你也可以用ping命令试一下 2、端口扫描(Port S…

    Linux干货 2015-04-19
  • 条件判断(if,case)和循环(for,until,while等)详解(附例题正解)

    脚本中的if条件判断和循环 在linux下,写脚本是我们必不可少的。在写脚本的过程中,if判断和各种的循环是我们常用的。这里,详细的说一下条件判断以及循环的使用。 条件判断:if 和 else 1.if shell程序中的条件分支是通过if条件语句来实现的,其格式一般为if -then -fi ,这样的是单分支语句,还有的一种就是if-then-else-f…

    Linux干货 2016-08-18
  • Shell脚本的编写

    1.什么是Shell脚本 Shell脚本是利用 shell 的功能所写的一个程序 program,这个程序是使用纯文本文件,将一些 shell 的语法与指令(含外部指令)写在里面, 搭配正则表达式、管线命令与数据流重导向等功能,以达到我们所想要的处理目的。 Shell 脚本可以简单的被看成是批处理文件, 也可以被说成是一个程序语言,且这个程序语言由于都是利用…

    Linux干货 2017-04-16
  • vim编辑器

    导读:      本章将主要介绍Linux中的一种常用文本编辑器vim,具体内容如下:       □使用vi和vim的三种主要模式       移动光标,进入插入模式       改变、删除、复制文本     &n…

    Linux干货 2016-08-15