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

相关推荐

  • while循环中的一个常见问题

    在楼主刚刚学习接触while循环的时候,发现了一个问题,在while循环内部对变量赋值、定义变量、数组定义等等环境,在循环外面失效。 一个简单的测试脚本如下: 执行结果证明,$new_var的结果是空值。在google上查了查,才发现问题出在管道上。 先看看下面的内容。 while循环的写法有好几种,它的语法结构为: while test_cmd_list;…

    2017-08-26
  • DNS域名解析系统搭建(BIND)

        【本文导航】    零、准备工作    一、根域服务器配置    二、com顶级域配置    三、linux.com域主服务器配置(DNS1)    四…

    Linux干货 2016-12-21
  • 马哥教育网络21期+第十二周练习博客上

    1、请描述一次完整的http请求处理过程; (1)建立或处理连接:接受请求或拒绝请求 (2)如果接受请求:     并发访问响应模型:         单进程I/O结构:启动一个进程处理用户请求,而且一次只处理一个,多个请求被串行响应; &…

    Linux干货 2016-10-17
  • 十二.Linux博客-2016年8月16日文件查找和压缩、rpm包管理、while循环、until循环

    格式说明: 操作 概念 命令 说明及举例 十二.文件查找和压缩、rpm包管理、yum、while循环、until循环 tar tar -zcvf /testdir/etc.tar.gz /etc/ 备份etc创建etc.tar.gz文件 压缩为gz格式 显示过程 tar -jcvf&nbs…

    Linux干货 2016-08-24
  • 【超全整理】《Linux云计算从入门到精通》系列实战笔记全放送

          为了方便Linux云计算爱好者的学习查看,马哥Linx云计算团队特别整理了《Linux云计算从入门到精通》年度重磅大放送,囊括了整个学习过程的学习精华,内容全部由马哥Linux云计算学员撰写,欢迎大家支持!!!       详情请看:  一、Linux运维基础实战入门 从Linux0基础入门开始,全面讲解作为新手如何学习Linux,以及学习方法和…

    2017-09-14
  • God进程监控框架

    监控重启进程的方案有很多种: 最简单的方法,写个脚本fork进程运行,然后waitpid,如果获pid后就再次启动 最土的方法,配置cron任务,固定时间运行脚本检查进程是否存在,不存在则启动 百度使用qmail里的supervised程序,通过supervised监管进程。 优点:supervised可以启动daemon程序,对于非daemon需要采用no…

    Linux干货 2015-02-13