Configure Calico specific BIRD settings in OSA
In an effort to decouple the upstream BIRD role from Calico's specific use-case, the role no longer configures BGP peers by default as of tag 1.1. We should insert some example BGP peers into the group vars so that a deployer using Calico will receive some base BGP peer configuration in their hypervisors. This is essentially deploying the same configuration that was already being deployed to BIRD, however the Calico specific defaults will now reside in OSA. Change-Id: Ic0ece84f259d0e72f79fedbd8a90fcc691f03229
This commit is contained in:
parent
b92c7971bc
commit
0b16414369
99
playbooks/inventory/group_vars/neutron_calico_dhcp_agent.yml
Normal file
99
playbooks/inventory/group_vars/neutron_calico_dhcp_agent.yml
Normal file
@ -0,0 +1,99 @@
|
||||
---
|
||||
# Copyright 2016, Logan Vig <logan2211@gmail.com>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Based on the default Calico BIRD template at
|
||||
# https://github.com/projectcalico/felix/blob/master/etc/bird/calico-bird.conf.template
|
||||
|
||||
# BGP peer configuration for Calico by default will attempt to configure peering
|
||||
# sessions with the host's default gateway over IPv4/IPv6. This is just one
|
||||
# example of the various BGP peering configurations that could be used here
|
||||
# and should be customized further to match the deployer's upstream BGP
|
||||
# configuration. Calico has documented some example BGP topologies at:
|
||||
# http://docs.projectcalico.org/master/reference/private-cloud/l2-interconnect-fabric
|
||||
# http://docs.projectcalico.org/master/reference/private-cloud/l3-interconnect-fabric
|
||||
|
||||
# Set to your iBGP ASN
|
||||
bird_bgp_asn: 65000
|
||||
|
||||
bird_bgp_ipv4_peer_ip: "{{ ansible_default_ipv4['gateway'] }}"
|
||||
#calculate the first address in the subnet since the IPv6 "gateway" may be a
|
||||
#link local address that we cannot peer to.
|
||||
bird_bgp_ipv6_peer_ip: "{{ ((ansible_default_ipv6['address'] ~ '/' ~ ansible_default_ipv6['prefix']) | ipaddr('network') ~ '/' ~ ansible_default_ipv6['prefix']) | ipaddr('net') | ipaddr(1) | ipaddr('address') }}"
|
||||
|
||||
bird_ipv4_protocols:
|
||||
kernel: |
|
||||
learn;
|
||||
persist;
|
||||
scan time 2;
|
||||
graceful restart;
|
||||
device: |
|
||||
scan time 2;
|
||||
direct: |
|
||||
interface "-dummy0", "dummy1", "eth*", "em*", "en*";
|
||||
bgp:
|
||||
UPLINK: |
|
||||
description "Connection to BGP route reflector";
|
||||
local as {{ bird_bgp_asn }};
|
||||
neighbor {{ bird_bgp_ipv4_peer_ip }} as {{ bird_bgp_asn }};
|
||||
hold time 15;
|
||||
graceful restart;
|
||||
check link;
|
||||
direct;
|
||||
gateway direct;
|
||||
export filter export_bgp;
|
||||
next hop self;
|
||||
|
||||
bird_ipv6_protocols:
|
||||
kernel: |
|
||||
learn;
|
||||
persist;
|
||||
scan time 2;
|
||||
graceful restart;
|
||||
device: |
|
||||
scan time 2;
|
||||
direct: |
|
||||
interface "-dummy0", "dummy1", "eth*", "em*", "en*";
|
||||
bgp:
|
||||
UPLINK: |
|
||||
description "Connection to BGP route reflector";
|
||||
local as {{ bird_bgp_asn }};
|
||||
neighbor {{ bird_bgp_ipv6_peer_ip }} as {{ bird_bgp_asn }};
|
||||
hold time 15;
|
||||
graceful restart;
|
||||
check link;
|
||||
direct;
|
||||
gateway direct;
|
||||
export filter export_bgp;
|
||||
next hop self;
|
||||
|
||||
#configure bird to advertise subnets bound to these interface wildcards
|
||||
bird_advertise_interfaces:
|
||||
- 'tap*'
|
||||
- 'cali*'
|
||||
- 'dummy1'
|
||||
|
||||
bird_ipv4_filters:
|
||||
export_bgp: |
|
||||
if ( {% for i in bird_advertise_interfaces %}(ifname ~ "{{ i }}"){% if not loop.last %} || {% endif %}{% endfor %} ) then {
|
||||
if net != 0.0.0.0/0 then accept;
|
||||
}
|
||||
reject;
|
||||
|
||||
bird_ipv6_filters:
|
||||
export_bgp: |
|
||||
if ( {% for i in bird_advertise_interfaces %}(ifname ~ "{{ i }}"){% if not loop.last %} || {% endif %}{% endfor %} ) then {
|
||||
if net != ::/0 then accept;
|
||||
}
|
||||
reject;
|
Loading…
x
Reference in New Issue
Block a user