OpenStackの中性子を展開

コントローラ

 

  1.データベースとセットの権限を作成します。

  MySQLの-uルート-p0330

  DATABASE中性子を作成します。

  中性子上のすべての権限を付与* 'localhostの' \ @ '中性子TO'。'NEUTRON_DBPASS BY' IDENTIFIED。

    中性子上のすべての権限を付与*「中性子」@「%」をするには、\。「NEUTRON_DBPASS BY」IDENTIFIED。

  2.ユーザーを作成しますOpenStackの

  ソースopenrc

  OpenStackのユーザー作成--domainデフォルト--password =中性子中性子

  3. adminロールに中性子セットを与えます

  OpenStackの役割は--projectサービス--user中性子管理者を追加します

  4.サービスを作成します。

  OpenStackのサービスは、--name中性子作成の\ --description 「OpenStackのネットワーク」のネットワークを

  5.サービスのエンドポイントを作成します。

  OpenStackのエンドポイント--region RegionOne作成\ネットワーク公衆にhttp://コントローラー:9696

  OpenStackのエンドポイント--region RegionOne作成\ネットワーク内部にhttp://コントローラー:9696

  OpenStackのエンドポイント--region RegionOne作成\ネットワーク管理者にhttp://コントローラー:9696

  6.インストールサービス

  yumをOpenStackの中性子OpenStackの中性子-ML2 openvswitch OpenStackは、中性子openvswitch ebtablesの-yをインストール

   7.プロファイル編集(NIC第三の構成は、no ip)
  CP /etc/neutron/neutron.conf /etc/neutron/neutron.conf.bak
  CPの/etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugins/ml2/ml2_conf.ini.BAK
  CP /etc/neutron/plugins/ml2/openvswitch_agent.ini /etc/neutron/plugins/ml2/openvswitch_agent.ini.bak
  CP /etc/neutron/l3_agent.ini /etc/neutron/l3_agent.ini明博
  CP /etc/neutron/dhcp_agent.ini /etc/neutron/dhcp_agent.ini明博
  CPの/etc/neutron/metadata_agent.ini /etc/neutron/metadata_agent.ini.BAK
[DEFAULT] 
state_path = / VAR / libに/ 中性子#neutron拡張ディレクトリ
auth_strategy = キーストーン#認証
core_plugin = ML2#コアプラグ
service_plugins = ルータ#サービスプラグイン:ルーティング
dhcp_agent_notification = 真に   #のDHCPがオンに自動的にIPが割り当てられ
allow_overlapping_ips = 
notify_nova_on_port_status_changesを = trueに         #あなたは、ポート変更することができます
notify_nova_on_port_data_changesの =をtrueに             ポートメタデータ変更#
transport_url:ウサギを= // OpenStackの:コントローラ@ ADMINを

[エージェント] 

[CORS] 

[cors.subdomain] 

[データベース] 
接続 = MySQLの+ pymysql:// 中性子:NEUTRON_DBPASSする@コントローラ/中性子

[keystone_authtoken] 
auth_uri =のhttp:// コントローラ:5000 
auth_url = HTTP:// コントローラ:35357 
memcached_servers =コントローラ:11211 
AUTH_TYPE = パスワード
project_domain_name = デフォルト
user_domain_name = デフォルト
PROJECT_NAME = サービス = 中性子
パスワード = 中性子

[matchmaker_redis] 

[ノヴァ] 
のregion_name = RegionOne 
auth_url =のhttp:// コントローラ:35357 
AUTH_TYPE = パスワード
project_domain_name = デフォルト
PROJECT_NAME = サービス
user_domain_name = デフォルト
のユーザー名 = 新星の
パスワード = 新星

[oslo_concurrency] 
lock_path = $ state_path / ロック      #临时文件目录

[ oslo_messaging_amqp] 

[oslo_messaging_kafka] 

[oslo_messaging_notifications] 

[oslo_messaging_rabbit]

[oslo_messaging_zmq] 

[oslo_middleware] 

[oslo_policy] 

[なQoS] 

[クォータ] 

[SSL]
 
Vimの/etc/neutron/neutron.conf
[DEFAULT]

[ml2]
type_drivers = flat,vxlan       #类型驱动
tenant_network_types = vxlan           #租户网络类型
mechanism_drivers = openvswitch,l2population    
extension_drivers = port_security

[ml2_type_flat]

[ml2_type_geneve]

[ml2_type_gre]

[ml2_type_vlan]

[ml2_type_vxlan]
vni_ranges = 1:1000        #vlan的id号码的取值范围

[securitygroup]
enable_ipset = true     #开启安全组策略
vim /etc/neutron/plugins/ml2/ml2_conf.bak
[DEFAULT]

[agent]
tunnel_types = vxlan   #隧道类型
l2_population = True

[ovs]
tunnel_bridge = br-tun   #隧道网桥
local_ip = 192.168.42.147     #租户网的ip地址
bridge_mappings =

[securitygroup]
firewall_driver = iptables_hybrid
enable_security_group = true

[xenapi]
vim /etc/neutron/plugins/ml2/openvswitch_agent.ini
[DEFAULT]
interface_driver = openvswitch   1路由由openswitch做出来的
external_network_bridge = br-ex   #外网的网桥

[agent]

[ovs]
vim /etc/neutron/l3_agent.ini
[DEFAULT]
interface_driver = openvswitch
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true    #开启元数据

[agent]

[ovs]
vim /etc/neutron/dhcp_agent.ini
[DEFAULT]
nova_metadata_ip = controller
metadata_proxy_shared_secret = METADATA_SECRET   #元数据证书的密码

[agent]

[cache]
vim /etc/neutron/metadata_agent.ini

  8.编辑nova的配置文件

[neutron]
# ...
url = http://controller:9696
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = NEUTRON_PASS
service_metadata_proxy = true
metadata_proxy_shared_secret = METADATA_SECRET
vim /etc/nova/nova.conf

  9.创建软链接

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

  10.同步数据库

  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

  11.重启服务

  systemctl restart openstack-nova-api.service、

  systemctl enable neutron-server.service neutron-dhcp-agent.service openvswitch neutron-openvswitch-agent neutron-metadata-agent.service

   systemctl start neutron-server.service neutron-dhcp-agent.service openvswitch neutron-openvswitch-agent neutron-metadata-agent.service

    12.创建网桥

   ovs-vsctl add-br br-ex

 

  ovs-vsctl add-port br-ex eth38
   ovs-vsctl show
    13.开启l3-agent
    systemctl enable neutron-l3-agent.service
    systemctl enable neutron-l3-agent.service
  14.查看neutron服务状态
  openstack  neutron service list
 
compute
 
  1.安装服务
    yum install openvswitch openstack-neutron-openvswitch ebtables ipset
    2.编辑配置文件
    cp /etc/neutron/neutron.conf /etc/neutron/neutron.conf.bak
    cp /etc/neutron/plugins/ml2/openswitch_agent.ini /etc/neutron/plugins/ml2/openswitch_agent.ini.bak
[DEFAULT]
#state_path = /var/lib/neutron
auth_strategy = keystone
#core_plugin = ml2
#service_plugins = router
#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:admin@controller

[agent]

[cors]

[cors.subdomain]

[database]
#connection = mysql+pymysql://neutron:NEUTRON_DBPASS@controller/neutron

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

[matchmaker_redis]

[nova]
region_name = RegionOne
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
project_name = service
user_domain_name = default
username = nova
password = nova

[oslo_concurrency]
lock_path = /var/lib/neutron/tmp

[oslo_messaging_amqp]

[oslo_messaging_kafka]

[oslo_messaging_notifications]

[oslo_messaging_rabbit]

[oslo_messaging_zmq]

[oslo_middleware]

[oslo_policy]

[qos]

[quotas]

[ssl]
vim /etc/neutron/neutron.conf
[DEFAULT]

[agent]
tunnel_types = vxlan
l2_population = True

[ovs]
tunnel_bridge = br-tun
local_ip = 192.168.42.151
bridge_mappings =

[securitygroup]
firewall_driver = iptables_hybrid
enable_security_group = true

[xenapi]
vim /etc/neutron/plugins/ml2/openswitch_agent.ini

    3.编辑nova配置文件

[neutron]
# ...
url = http://controller:9696
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = NEUTRON_PASS
vim /etc/nova/nova.conf

    4.重启服务

    systemctl restart openstack-nova-compute.service

    systemctl enable openvswitch neutron-openvswitch-agent

      systemctl start openvswitch neutron-openvswitch-agent
    5.到控制节点查看
    openstack  neutron service list
  以上是neutron的安装,如果需要的话也可以在storage节点上部署neutron服务。

おすすめ

転載: www.cnblogs.com/daisyyang/p/10981403.html