openstack-ansible/group_vars/neutron_calico_dhcp_agent.yml
Jean-Philippe Evrard 58b4f6deb7 Use root folder group_vars
Make sure the group_vars can be overriden by the deployer in
userspace.

This uses the vars_plugin to load all group_vars, to allow
key-based alphabetic merging of deployer overrides
from /etc/openstack_deploy.

Change-Id: I58aea2d2d3a1c872ae31ffe463a1ef4b553d9e17
2017-05-27 19:50:14 +00:00

108 lines
3.4 KiB
YAML

---
# 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: >-
{% if ansible_default_ipv6['address'] is defined
and ansible_default_ipv6['prefix'] is defined %}
{{
((ansible_default_ipv6['address'] ~ '/' ~ ansible_default_ipv6['prefix']) |
ipaddr('network') ~ '/' ~ ansible_default_ipv6['prefix']
) | ipaddr('net') | ipaddr(1) | ipaddr('address')
}}
{% endif %}
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;