neutron对接思科apic插件

前言

最近在忙的一件事情,就是openstack对接思科的apic控制器。踩了些坑,但还好都解决了。目前apic的neutron插件已经从networking-cisco移除,思科官方提供的安装办法是neutron-install。大致总结了一下安装的步骤。

安装步骤

1.依序安装下列rpm包:

rpm -ivh python-click-6.3-1.el7.noarch.rpm
rpm -ivh python2-tabulate-0.7.5-4.fc25.noarch.rpm
rpm -ivh python-websocket-client-0.34.0-3.el7.noarch.rp
rpm -ivh acitoolkit-0.3.2-12.el7.noarch.rpm
rpm -ivh aci-integration-module-0.11.1~dev1-231.el7.noarch.rpm
rpm -ivh apicapi-1.6.0-198.el7.noarch.rpm
rpm -ivh python2-meld3-1.0.2-4.el7.noarch.rpm
rpm -ivh supervisor-3.3.1-2.el7.noarch.rpm
rpm -ivh neutron-opflex-agent-7.2.0-29.el7.noarch.rpm
rpm -ivh openstack-neutron-gbp-7.1.0-61.el7.noarch.rpm
rpm -ivh python-gbpclient-0.15.0-61.el7.noarch.rpm

2.解压semantic_version的tar包,然后进入解压后的目录,执行python setup.py install

3.修改以下配置文件:
修改/etc/aim/aim.conf:

[DEFAULT]
debug=True
rpc_backend=rabbit
control_exchange=neutron
default_log_levels=neutron.context=ERROR
[oslo_messaging_rabbit]
rabbit_host=rabbitmq-service
rabbit_port=5672
rabbit_use_ssl=False
rabbit_userid=openstack
rabbit_password=password
rabbit_ha_queues=False
[database]
connection = mysql://neutronuser:password@mysql-service/neutron
[aim]
agent_down_time = 75
poll_config = False
aim_system_id = cloud
max_operation_retry=5
[apic]
apic_hosts=111.111.111.11
apic_username=admin
apic_password=password
apic_use_ssl=True

修改/etc/aim/aimctl.conf:

[DEFAULT]
apic_system_id=cloud
[apic]
[apic_vmdom:cloud]

目录/etc/neutron/conf.d/neutron-server下创建ml2_conf_cisco_apic.conf:

[apic_aim_auth]
auth_plugin=v3password
auth_url=http://keystone-service:35357/v3/
username=neutron
password=password
user_domain_name=default
project_domain_name=default
project_name=service
[ml2_apic_aim]
enable_optimized_metadata=True
[group_policy]
policy_drivers=aim_mapping
extension_drivers=aim_extension,proxy_group
[group_policy_implicit_policy]
defalut_ip_pool=192.168.0.0/16

修改/etc/neutron/neutron.conf下列配置:

[DEFAULT]
core_plugin = ml2plus
service_plugins = apic_aim_l3

修改/etc/neutron/plugin.ini下列配置:

[DEFAULT]
apic_system_id = cloud
mechanism_drivers = apic_aim
extension_drivers = apic_aim

4.执行aim数据库初始化:
aimctl db-migration upgrade head
aimctl config update
aimctl infra create
aimctl manager load-domains —enforce

5.运行aim服务:
systemctl start aim-aid
systemctl start aim-event-service-polling
systemctl start aim-event-service-rpc
systemctl enable aim-aid
systemctl enable aim-event-service-polling
systemctl enable aim-event-service-rpc
重启neutron-server:
systemctl restart neutron-server

附录:

gbp-db-manage:gbp数据库命令
修改neutron的cllation:alter database neutron collate utf8_general_ci;
查询数据库结构:select * from information_schema.schemata where schema_name=’neutron’\G;