Cisco-n1kv-neutron
目录
Nexus1000v Neutron 插件
概述
Nexus1000v Neutron 插件 v2 实现了 Neutron v2.0 API。
需求
- Cisco Nexus1000v for KVM Release 5.2(1)SK(2.2) (或更高版本)
配置
Nexus1000v Neutron 插件配置
- 应在主机上安装 MySQL。按照以下步骤初始化 MySQL(其中 $PASS = mysql 密码)
$ mysql -u root -p$PASS -e 'DROP DATABASE IF EXISTS cisco_neutron;' $ mysql -u root -p$PASS -e 'CREATE DATABASE IF NOT EXISTS cisco_neutron;' $ mysql -u root -p$PASS -e 'GRANT ALL ON cisco_neutron.* TO '$Neutron_User'@'%' IDENTIFIED BY '$Neutron_Pass';
- 编辑 /etc/neutron/neutron.conf 并将 provider 设置为
[DEFAULT] core_plugin = neutron.plugins.cisco.network_plugin.PluginV2 [DATABASE] sql_connection = mysql://<username>:<password>@<database_ip>:3306/cisco_neutron
- 编辑文件 /etc/neutron/plugins/cisco/cisco_plugins.ini 并根据需要注释掉
[CISCO_PLUGINS] # (StrOpt) Period-separated module path to the plugin class to use for # the Cisco Nexus switches. # #nexus_plugin = neutron.plugins.cisco.nexus.cisco_nexus_plugin_v2.NexusPlugin # (StrOpt) Period-separated module path to the plugin class to use for # the virtual switches on compute nodes. # vswitch_plugin = neutron.plugins.cisco.n1kv.n1kv_neutron_plugin.N1kvNeutronPluginV2 [cisco] # Cisco Nexus Switch configurations. # Each switch to be managed by Openstack Neutron must be configured here. # # Cisco Nexus Switch Format. # [NEXUS_SWITCH:<IP address of switch>] # <hostname>=<port> (1) # ssh_port=<ssh port> (2) # username=<credential username> (3) # password=<credential password> (4) # # (1) For each host connected to a port on the switch, specify the hostname # and the Nexus physical port (interface) it is connected to. # (2) The TCP port for connecting via SSH to manage the switch. This is # port number 22 unless the switch has been configured otherwise. # (3) The username for logging into the switch to manage it. # (4) The password for logging into the switch to manage it. # # Example: # [NEXUS_SWITCH:1.1.1.1] # compute1=1/1 # compute2=1/2 # ssh_port=22 # username=admin # password=mySecretPassword # [N1KV:<IP address of VSM>] # username=<credential username> # password=<credential password> # # Example: # [N1KV:2.2.2.2] # username=admin # password=mySecretPassword [cisco_n1k] # (StrOpt) Specify the name of the integration bridge to which the VIFs are # attached. # # Example: integration_bridge = br-int # (StrOpt) Name of the policy profile to be associated with a port when no # policy profile is specified during port creates. # # Example: default_policy_profile = service_profile # (StrOpt) Name of the policy profile to be associated with a port owned by # network node (dhcp, router). # # Example: network_node_policy_profile = dhcp_pp # (StrOpt) Name of the network profile to be associated with a network when no # network profile is specified during network creates. Admin should pre-create # a network profile with this name. # # Example: default_network_profile = network_pool # (StrOpt) Time in seconds for which the plugin polls the VSM for updates in # policy profiles. # # Example: poll_duration = 180 [database] # (StrOpt) Connection to the neutron_l2network database # # connection = mysql://<credential username>:<credential password>@127.0.0.1/cisco_neutron?charset=utf8 # Example: connection = mysql://root:mySecretPassword@127.0.0.1/cisco_neutron?charset=utf8
配置示例
[CISCO_PLUGINS] vswitch_plugin = neutron.plugins.cisco.n1kv.n1kv_neutron_plugin.N1kvNeutronPluginV2 [CISCO] [N1KV:10.10.10.10] username = admin password = mySecretPassword [CISCO_N1K] integration_bridge = br-int default_policy_profile = service_pp network_node_policy_profile = dhcp_pp poll_duration = 10 [DATABASE] connection = mysql://root:cisco@127.0.0.1/cisco_neutron?charset=utf8 Start the neutron service by providing the relevant configuration files: cd <neutron_path> && python <neutron_path>/bin/neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/cisco/cisco_plugins.ini
Devstack
在 "localrc/local.conf" 文件中包含以下变量
Q_PLUGIN=cisco