标签:
声明:最近在进行openstack的kilo版本的安装,发现现有的网络教程非常少,而且多数教程并不能安装成功,故写此教程。openstack的安装较为复杂,本教程并不能保证在不同环境下也能将其安装成功。个人安装教程,也难免出错。同时,安装是在虚拟机环境下,真实安装环境需要进行更改。
转载请声明出处:
作者:张某人ER
原文链接:http://blog.csdn.net/xinxing__8185/article/details/51317722
Neutron网络结构图,管理员创建和管理Neutron外部网络,是租户虚拟机与互联网信息交互的桥梁。更具体的,外部网络会分出一个子网,它是一组在互联网上可寻址的IP地址。一般情况下,外部网络只有一个(neutron是支持多个外部网络的),且由管理员创建。租户虚拟机创建和管理租户网络,每个网络可以根据需要划分成多个子网。诸多子网通过路由器与Neutron外部网络(图中具体是子网A)连接。路由器的gateway网关端连接外部网络的子网,interfaces接口端有多个,连接租户网络的子网。路由器及interface接口端连接的网络都是由租户根据需要自助创建,管理者只创建和管理Neutron外部网络部分。
总结来看,创建一个Neutron网络的过程如下:
1 、首先管理员拿到一组可以在互联网上寻址的IP地址,并且创建一个外部网络和子网
2、 租户创建一个网络和子网
3、 租户创建一个路由器并且连接租户子网和外部网络
4、 租户创建虚拟机
mysql -u root -p
CREATE DATABASE neutron; GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'NEUTRON_DBPASS'; GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'NEUTRON_DBPASS'; # 替换<span style="font-family: Arial, Helvetica, sans-serif;">NEUTRON_DBPASS</span> quit
source admin-openrc.sh openstack user create --password-prompt neutron ##密码:neutron openstack role add --project service --user neutron admin openstack service create --name neutron --description "OpenStack Networking" network openstack endpoint create --publicurl http://controller:9696 --adminurl http://controller:9696 --internalurl http://controller:9696 --region RegionOne network
yum install openstack-neutron openstack-neutron-ml2 python-neutronclient which
vim /etc/neutron/neutron.conf
[database] connection = mysql://neutron:NEUTRON_DBPASS@controller/neutron [DEFAULT] rpc_backend=rabbit [oslo_messaging_rabbit] rabbit_host=controller rabbit_userid=openstack rabbit_password=openstack auth_strategy=keystone [keystone_authtoken] auth_uri = http://controller:5000 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default project_name = service username = neutron password = neutron [DEFAULT] core_plugin=ml2 service_plugins=router allow_overlapping_ips= True notify_nova_on_port_data_changes = True notify_nova_on_port_status_changes = True nova_url=http://controller:8774/v2 [nova] #auth_plugin = 以下 开始添加 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default region_name = RegionOne project_name = service username = nova password = nova [DEFAULT] verbose=True
vim /etc/neutron/plugins/ml2/ml2_conf.ini
type_drivers = flat,vlan,gre,vxlan tenant_network_types=gre mechanism_drivers = openvswitch tunnel_id_ranges = 1:1000 enable_security_group = True enable_ipset = True #在下面添加一行 firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
vim /etc/nova/nova.conf
[DEFAULT] network_api_class = nova.network.neutronv2.api.API security_group_api = neutron linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver firewall_driver = nova.virt.firewall.NoopFirewallDriver [neutron] #URL for connecting to neutron url = http://controller:9696 auth_strategy = keystone admin_auth_url = http://controller:35357/v2.0 admin_tenant_name = service admin_username = neutron admin_password = neutron
ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
systemctl restart openstack-nova-api.service openstack-nova-scheduler.service openstack-nova-conductor.service systemctl enable neutron-server.service systemctl start neutron-server.service
Oracle VM + centos7.1+openstack kilo 多结点安装教程---neutron的安装(1)
标签:
原文地址:http://blog.csdn.net/xinxing__8185/article/details/51317722