Fix puppet manifest to the style guide
Fix puppet manifest to the style guide Change-Id: I39d7d2fe0d7a441385bef9e7b61a7312d0b24327
This commit is contained in:
parent
52a3bb920d
commit
3c2cadd2fa
|
@ -28,12 +28,12 @@ firewallchain { 'calico-alt-gw-MARK:mangle:IPv4':
|
||||||
}->
|
}->
|
||||||
# iptables -t mangle -A PREROUTING -i tap+ -j calico-alt-gw-MARK
|
# iptables -t mangle -A PREROUTING -i tap+ -j calico-alt-gw-MARK
|
||||||
firewall { '010 process traffic from VM instances to outside':
|
firewall { '010 process traffic from VM instances to outside':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
table => 'mangle',
|
table => 'mangle',
|
||||||
chain => 'PREROUTING',
|
chain => 'PREROUTING',
|
||||||
iniface => 'tap+',
|
iniface => 'tap+',
|
||||||
proto => 'all',
|
proto => 'all',
|
||||||
jump => 'calico-alt-gw-MARK',
|
jump => 'calico-alt-gw-MARK',
|
||||||
} ->
|
} ->
|
||||||
#iptables -t mangle -A calico-alt-gw-MARK -d 192.168.111.0/24 -j RETURN
|
#iptables -t mangle -A calico-alt-gw-MARK -d 192.168.111.0/24 -j RETURN
|
||||||
firewall { '011 skip internal traffic':
|
firewall { '011 skip internal traffic':
|
||||||
|
@ -46,12 +46,12 @@ firewall { '011 skip internal traffic':
|
||||||
} ->
|
} ->
|
||||||
#iptables -t mangle -A calico-alt-gw-MARK -j MARK --set-mark 0x222
|
#iptables -t mangle -A calico-alt-gw-MARK -j MARK --set-mark 0x222
|
||||||
firewall { '012 mark traffic from VM instances to outside':
|
firewall { '012 mark traffic from VM instances to outside':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
table => 'mangle',
|
table => 'mangle',
|
||||||
chain => 'calico-alt-gw-MARK',
|
chain => 'calico-alt-gw-MARK',
|
||||||
jump => 'MARK',
|
jump => 'MARK',
|
||||||
proto => 'all',
|
proto => 'all',
|
||||||
set_mark => $calico_mark
|
set_mark => $calico_mark
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/init/calico-alt-gateway.conf':
|
file { '/etc/init/calico-alt-gateway.conf':
|
||||||
|
@ -71,8 +71,8 @@ service {'calico-alt-gateway':
|
||||||
# read the https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt
|
# read the https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt
|
||||||
# Value '2' may be better, but Calico Felix agent is not compotible with '2'
|
# Value '2' may be better, but Calico Felix agent is not compotible with '2'
|
||||||
sysctl::value {
|
sysctl::value {
|
||||||
'net.ipv4.conf.all.rp_filter': value => "0";
|
'net.ipv4.conf.all.rp_filter': value => '0';
|
||||||
"net.ipv4.conf.${calico_alt_gateway_br}.rp_filter": value => "0";
|
"net.ipv4.conf.${calico_alt_gateway_br}.rp_filter": value => '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
# vim: set ts=2 sw=2 et :
|
# vim: set ts=2 sw=2 et :
|
||||||
|
|
|
@ -6,7 +6,7 @@ $network_metadata = hiera_hash('network_metadata', {})
|
||||||
|
|
||||||
# Initial constants
|
# Initial constants
|
||||||
$plugin_name = 'fuel-plugin-calico'
|
$plugin_name = 'fuel-plugin-calico'
|
||||||
$plugin_settings = hiera_hash("${plugin_name}", {})
|
$plugin_settings = hiera_hash($plugin_name, {})
|
||||||
$enable_ipv4 = try_get_value($plugin_settings, 'enable_ipv4', true)
|
$enable_ipv4 = try_get_value($plugin_settings, 'enable_ipv4', true)
|
||||||
$enable_ipv6 = try_get_value($plugin_settings, 'enable_ipv6', false)
|
$enable_ipv6 = try_get_value($plugin_settings, 'enable_ipv6', false)
|
||||||
$as_number = try_get_value($plugin_settings, 'as_number', 65001)
|
$as_number = try_get_value($plugin_settings, 'as_number', 65001)
|
||||||
|
@ -26,7 +26,7 @@ firewall { '410 bird':
|
||||||
proto => 'tcp',
|
proto => 'tcp',
|
||||||
action => 'accept',
|
action => 'accept',
|
||||||
} ->
|
} ->
|
||||||
class { 'calico::bird':
|
class { '::calico::bird':
|
||||||
template => 'compute',
|
template => 'compute',
|
||||||
as_number => $as_number,
|
as_number => $as_number,
|
||||||
enable_ipv4 => $enable_ipv4,
|
enable_ipv4 => $enable_ipv4,
|
||||||
|
|
|
@ -47,4 +47,4 @@ tweaks::ubuntu_service_override { 'calico-dhcp-agent':
|
||||||
neutron_config { 'DEFAULT/use_namespaces': value => false }
|
neutron_config { 'DEFAULT/use_namespaces': value => false }
|
||||||
|
|
||||||
Neutron_config<||> ~> Service['calico-dhcp-agent']
|
Neutron_config<||> ~> Service['calico-dhcp-agent']
|
||||||
Neutron_dhcp_agent_config<||> ~> Service['calico-dhcp-agent']
|
Neutron_dhcp_agent_config<||> ~> Service['calico-dhcp-agent']
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
notice('MODULAR: calico/compute_felix.pp')
|
notice('MODULAR: calico/compute_felix.pp')
|
||||||
|
|
||||||
include calico
|
include ::calico
|
||||||
|
|
||||||
# required, because neutron-dhcp-agent one of dependency of calico-compute
|
# required, because neutron-dhcp-agent one of dependency of calico-compute
|
||||||
package { 'neutron-dhcp-agent':
|
package { 'neutron-dhcp-agent':
|
||||||
|
@ -38,4 +38,4 @@ file { '/etc/calico/felix.cfg':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
content => template('calico/felix.cfg.erb'),
|
content => template('calico/felix.cfg.erb'),
|
||||||
} ~>
|
} ~>
|
||||||
Service['calico-felix']
|
Service['calico-felix']
|
||||||
|
|
|
@ -5,12 +5,12 @@ notice('MODULAR: calico/compute_metadata_api.pp')
|
||||||
# $network_metadata = hiera_hash('network_metadata', {})
|
# $network_metadata = hiera_hash('network_metadata', {})
|
||||||
|
|
||||||
package { 'nova-api-metadata':
|
package { 'nova-api-metadata':
|
||||||
name => 'nova-api-metadata',
|
|
||||||
ensure => 'installed',
|
ensure => 'installed',
|
||||||
|
name => 'nova-api-metadata',
|
||||||
} ->
|
} ->
|
||||||
service { 'nova-api-metadata':
|
service { 'nova-api-metadata':
|
||||||
|
ensure => running,
|
||||||
enable => true,
|
enable => true,
|
||||||
ensure => running
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Package['nova-api-metadata'] -> Nova_config<||>
|
# Package['nova-api-metadata'] -> Nova_config<||>
|
||||||
|
|
|
@ -4,13 +4,13 @@ $network_scheme = hiera_hash('network_scheme', {})
|
||||||
prepare_network_config($network_scheme)
|
prepare_network_config($network_scheme)
|
||||||
$network_metadata = hiera_hash('network_metadata', {})
|
$network_metadata = hiera_hash('network_metadata', {})
|
||||||
|
|
||||||
include calico
|
include ::calico
|
||||||
include ::nova::params
|
include ::nova::params
|
||||||
|
|
||||||
|
|
||||||
# Initial constants
|
# Initial constants
|
||||||
$plugin_name = 'fuel-plugin-calico'
|
$plugin_name = 'fuel-plugin-calico'
|
||||||
$plugin_settings = hiera_hash("${plugin_name}", {})
|
$plugin_settings = hiera_hash($plugin_name, {})
|
||||||
|
|
||||||
$neutron_config = hiera_hash('neutron_config')
|
$neutron_config = hiera_hash('neutron_config')
|
||||||
$management_vip = hiera('management_vip')
|
$management_vip = hiera('management_vip')
|
||||||
|
|
|
@ -3,11 +3,11 @@ notice('MODULAR: calico/etcd_proxy.pp')
|
||||||
prepare_network_config(hiera_hash('network_scheme'))
|
prepare_network_config(hiera_hash('network_scheme'))
|
||||||
$network_metadata = hiera_hash('network_metadata', {})
|
$network_metadata = hiera_hash('network_metadata', {})
|
||||||
|
|
||||||
include calico
|
include ::calico
|
||||||
|
|
||||||
# Initial constants
|
# Initial constants
|
||||||
$plugin_name = 'fuel-plugin-calico'
|
$plugin_name = 'fuel-plugin-calico'
|
||||||
$plugin_settings = hiera_hash("${plugin_name}", {})
|
$plugin_settings = hiera_hash($plugin_name, {})
|
||||||
|
|
||||||
# Firewall initials
|
# Firewall initials
|
||||||
class { '::firewall':}
|
class { '::firewall':}
|
||||||
|
@ -22,7 +22,7 @@ firewall { '400 etcd':
|
||||||
action => 'accept',
|
action => 'accept',
|
||||||
} ->
|
} ->
|
||||||
# Deploy etcd cluster member
|
# Deploy etcd cluster member
|
||||||
class { 'calico::etcd':
|
class { '::calico::etcd':
|
||||||
node_role => 'proxy',
|
node_role => 'proxy',
|
||||||
bind_host => $calico::params::mgmt_ip,
|
bind_host => $calico::params::mgmt_ip,
|
||||||
bind_port => $calico::params::etcd_port,
|
bind_port => $calico::params::etcd_port,
|
||||||
|
|
|
@ -3,8 +3,8 @@ notice('MODULAR: calico/hiera_override.pp')
|
||||||
|
|
||||||
# Initial constants
|
# Initial constants
|
||||||
$plugin_name = 'fuel-plugin-calico'
|
$plugin_name = 'fuel-plugin-calico'
|
||||||
$plugin_settings = hiera_hash("${plugin_name}", {})
|
$plugin_settings = hiera_hash($plugin_name, {})
|
||||||
$network_scheme = hiera_hash("network_scheme", {})
|
$network_scheme = hiera_hash('network_scheme', {})
|
||||||
|
|
||||||
# Mangle network_scheme for setup new gateway
|
# Mangle network_scheme for setup new gateway
|
||||||
if $plugin_settings['metadata']['enabled'] {
|
if $plugin_settings['metadata']['enabled'] {
|
||||||
|
@ -16,7 +16,7 @@ if $plugin_settings['metadata']['enabled'] {
|
||||||
$overrides = remove_ovs_usage($network_scheme)
|
$overrides = remove_ovs_usage($network_scheme)
|
||||||
file {"/etc/hiera/plugins/${plugin_name}.yaml":
|
file {"/etc/hiera/plugins/${plugin_name}.yaml":
|
||||||
ensure => file,
|
ensure => file,
|
||||||
content => inline_template("<%= @overrides %>")
|
content => inline_template('<%= @overrides %>')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# vim: set ts=2 sw=2 et :
|
# vim: set ts=2 sw=2 et :
|
||||||
|
|
|
@ -4,7 +4,7 @@ notice('MODULAR: calico/neutron_networks.pp')
|
||||||
|
|
||||||
# Initial constants
|
# Initial constants
|
||||||
$plugin_name = 'fuel-plugin-calico'
|
$plugin_name = 'fuel-plugin-calico'
|
||||||
$plugin_settings = hiera_hash("${plugin_name}", {})
|
$plugin_settings = hiera_hash($plugin_name, {})
|
||||||
|
|
||||||
$access_hash = hiera_hash('access', {})
|
$access_hash = hiera_hash('access', {})
|
||||||
$tenant_name = try_get_value($access_hash, 'tenant', 'admin')
|
$tenant_name = try_get_value($access_hash, 'tenant', 'admin')
|
||||||
|
@ -29,11 +29,11 @@ neutron_network { $net :
|
||||||
tenant_name => $tenant_name,
|
tenant_name => $tenant_name,
|
||||||
} ->
|
} ->
|
||||||
neutron_subnet { $subnet :
|
neutron_subnet { $subnet :
|
||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
cidr => $subnet_cidr,
|
cidr => $subnet_cidr,
|
||||||
network_name => $net,
|
network_name => $net,
|
||||||
gateway_ip => $subnet_gw,
|
gateway_ip => $subnet_gw,
|
||||||
enable_dhcp => true,
|
enable_dhcp => true,
|
||||||
ip_version => '4',
|
ip_version => '4',
|
||||||
tenant_name => $tenant_name,
|
tenant_name => $tenant_name,
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,11 +8,11 @@ $network_scheme = hiera_hash('network_scheme', {})
|
||||||
prepare_network_config($network_scheme)
|
prepare_network_config($network_scheme)
|
||||||
$network_metadata = hiera_hash('network_metadata', {})
|
$network_metadata = hiera_hash('network_metadata', {})
|
||||||
|
|
||||||
include calico
|
include ::calico
|
||||||
|
|
||||||
# Initial constants
|
# Initial constants
|
||||||
$plugin_name = 'fuel-plugin-calico'
|
$plugin_name = 'fuel-plugin-calico'
|
||||||
$plugin_settings = hiera_hash("${plugin_name}", {})
|
$plugin_settings = hiera_hash($plugin_name, {})
|
||||||
|
|
||||||
# override neutron options
|
# override neutron options
|
||||||
$override_configuration = hiera_hash('configuration', {})
|
$override_configuration = hiera_hash('configuration', {})
|
||||||
|
@ -112,20 +112,20 @@ Package['calico-control'] -> Class['::neutron::server']
|
||||||
Package['calico-control'] -> Class['::neutron::plugins::ml2']
|
Package['calico-control'] -> Class['::neutron::plugins::ml2']
|
||||||
|
|
||||||
class { '::neutron::plugins::ml2':
|
class { '::neutron::plugins::ml2':
|
||||||
type_drivers => ['local', 'flat'],
|
type_drivers => ['local', 'flat'],
|
||||||
tenant_network_types => 'local',
|
tenant_network_types => 'local',
|
||||||
mechanism_drivers => ['calico'],
|
mechanism_drivers => ['calico'],
|
||||||
flat_networks => ['*'],
|
flat_networks => ['*'],
|
||||||
#network_vlan_ranges => $network_vlan_ranges,
|
#network_vlan_ranges => $network_vlan_ranges,
|
||||||
#tunnel_id_ranges => [],
|
#tunnel_id_ranges => [],
|
||||||
#vxlan_group => $vxlan_group,
|
#vxlan_group => $vxlan_group,
|
||||||
#vni_ranges => $tunnel_id_ranges,
|
#vni_ranges => $tunnel_id_ranges,
|
||||||
path_mtu => $physical_net_mtu,
|
path_mtu => $physical_net_mtu,
|
||||||
extension_drivers => $extension_drivers,
|
extension_drivers => $extension_drivers,
|
||||||
#supported_pci_vendor_devs => $pci_vendor_devs,
|
#supported_pci_vendor_devs => $pci_vendor_devs,
|
||||||
sriov_agent_required => false,
|
sriov_agent_required => false,
|
||||||
enable_security_group => true,
|
enable_security_group => true,
|
||||||
firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver',
|
firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver',
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::neutron::server':
|
class { '::neutron::server':
|
||||||
|
@ -159,9 +159,9 @@ class { '::neutron::server':
|
||||||
}
|
}
|
||||||
|
|
||||||
Package['neutron'] ~>
|
Package['neutron'] ~>
|
||||||
augeas { "dhcp_agents_per_network":
|
augeas { 'dhcp_agents_per_network':
|
||||||
#context => "/files/etc/neutron/neutron.conf",
|
#context => "/files/etc/neutron/neutron.conf",
|
||||||
incl => "/etc/neutron/neutron.conf",
|
incl => '/etc/neutron/neutron.conf',
|
||||||
lens => 'Puppet.lns',
|
lens => 'Puppet.lns',
|
||||||
changes => [
|
changes => [
|
||||||
"set DEFAULT/dhcp_agents_per_network ${calico::params::compute_nodes_count}",
|
"set DEFAULT/dhcp_agents_per_network ${calico::params::compute_nodes_count}",
|
||||||
|
@ -169,11 +169,13 @@ augeas { "dhcp_agents_per_network":
|
||||||
} ~> Service['neutron-server']
|
} ~> Service['neutron-server']
|
||||||
|
|
||||||
include ::neutron::params
|
include ::neutron::params
|
||||||
|
$neutron_server_package = $neutron::params::server_package ? {
|
||||||
|
false => $neutron::params::package_name,
|
||||||
|
default => $neutron::params::server_package,
|
||||||
|
}
|
||||||
|
|
||||||
tweaks::ubuntu_service_override { $::neutron::params::server_service:
|
tweaks::ubuntu_service_override { $::neutron::params::server_service:
|
||||||
package_name => $neutron::params::server_package ? {
|
package_name => $neutron_server_package,
|
||||||
false => $neutron::params::package_name,
|
|
||||||
default => $neutron::params::server_package
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::neutron::server::notifications':
|
class { '::neutron::server::notifications':
|
||||||
|
@ -187,6 +189,6 @@ class { '::neutron::server::notifications':
|
||||||
|
|
||||||
# Stub for Nuetron package
|
# Stub for Nuetron package
|
||||||
package { 'neutron':
|
package { 'neutron':
|
||||||
name => 'binutils',
|
|
||||||
ensure => 'installed',
|
ensure => 'installed',
|
||||||
|
name => 'binutils',
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ $calico_alt_gateway_br = get_network_role_property('neutron/mesh','interface')
|
||||||
$calico_alt_gateway = try_get_value($network_scheme,"endpoints/${calico_alt_gateway_br}/vendor_specific/provider_gateway")
|
$calico_alt_gateway = try_get_value($network_scheme,"endpoints/${calico_alt_gateway_br}/vendor_specific/provider_gateway")
|
||||||
|
|
||||||
if ! is_ip_address($calico_alt_gateway) {
|
if ! is_ip_address($calico_alt_gateway) {
|
||||||
fail("Gateway for Private network does not specified or wrong !!!")
|
fail('Gateway for Private network does not specified or wrong !!!')
|
||||||
}
|
}
|
||||||
|
|
||||||
# vim: set ts=2 sw=2 et :
|
# vim: set ts=2 sw=2 et :
|
||||||
|
|
|
@ -2,23 +2,27 @@ notice('MODULAR: calico/repo_setup.pp')
|
||||||
|
|
||||||
# Initial constants
|
# Initial constants
|
||||||
$plugin_name = 'fuel-plugin-calico'
|
$plugin_name = 'fuel-plugin-calico'
|
||||||
$plugin_settings = hiera_hash("${plugin_name}", {})
|
$plugin_settings = hiera_hash($plugin_name, {})
|
||||||
|
|
||||||
# Bird PPA
|
# Bird PPA
|
||||||
apt::source { 'bird-repo':
|
apt::source { 'bird-repo':
|
||||||
location => 'http://ppa.launchpad.net/cz.nic-labs/bird/ubuntu',
|
location => 'http://ppa.launchpad.net/cz.nic-labs/bird/ubuntu',
|
||||||
repos => 'main',
|
repos => 'main',
|
||||||
#release => 'trusty',
|
#release => 'trusty',
|
||||||
include => { 'src' => false },
|
include => {
|
||||||
|
'src' => false,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
# Calico PPA
|
# Calico PPA
|
||||||
apt::source { 'calico-repo':
|
apt::source { 'calico-repo':
|
||||||
#location => "http://ppa.launchpad.net/project-calico/stable/ubuntu",
|
#location => "http://ppa.launchpad.net/project-calico/stable/ubuntu",
|
||||||
location => "http://ppa.launchpad.net/project-calico/calico-1.4/ubuntu",
|
location => 'http://ppa.launchpad.net/project-calico/calico-1.4/ubuntu',
|
||||||
repos => 'main',
|
repos => 'main',
|
||||||
#release => 'trusty',
|
#release => 'trusty',
|
||||||
include => { 'src' => false },
|
include => {
|
||||||
|
'src' => false,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
Apt::Source<||> ~> Exec<| title == 'apt_update' |>
|
Apt::Source<||> ~> Exec<| title == 'apt_update' |>
|
||||||
|
|
|
@ -3,11 +3,11 @@ notice('MODULAR: calico/etcd.pp')
|
||||||
prepare_network_config(hiera_hash('network_scheme'))
|
prepare_network_config(hiera_hash('network_scheme'))
|
||||||
$network_metadata = hiera_hash('network_metadata', {})
|
$network_metadata = hiera_hash('network_metadata', {})
|
||||||
|
|
||||||
include calico
|
include ::calico
|
||||||
|
|
||||||
# Initial constants
|
# Initial constants
|
||||||
$plugin_name = 'fuel-plugin-calico'
|
$plugin_name = 'fuel-plugin-calico'
|
||||||
$plugin_settings = hiera_hash("${plugin_name}", {})
|
$plugin_settings = hiera_hash($plugin_name, {})
|
||||||
$cluster_info = hiera_hash('cluster', {})
|
$cluster_info = hiera_hash('cluster', {})
|
||||||
$cluster_token = try_get_value($cluster_info, 'name', 'openstack-calico-cluster')
|
$cluster_token = try_get_value($cluster_info, 'name', 'openstack-calico-cluster')
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ firewall { '400 etcd':
|
||||||
action => 'accept',
|
action => 'accept',
|
||||||
} ->
|
} ->
|
||||||
# Deploy etcd cluster member
|
# Deploy etcd cluster member
|
||||||
class { 'calico::etcd':
|
class { '::calico::etcd':
|
||||||
node_role => 'server',
|
node_role => 'server',
|
||||||
bind_host => $calico::params::mgmt_ip,
|
bind_host => $calico::params::mgmt_ip,
|
||||||
bind_port => $calico::params::etcd_port,
|
bind_port => $calico::params::etcd_port,
|
||||||
|
|
|
@ -6,7 +6,7 @@ $network_metadata = hiera_hash('network_metadata', {})
|
||||||
|
|
||||||
# Initial constants
|
# Initial constants
|
||||||
$plugin_name = 'fuel-plugin-calico'
|
$plugin_name = 'fuel-plugin-calico'
|
||||||
$plugin_settings = hiera_hash("${plugin_name}", {})
|
$plugin_settings = hiera_hash($plugin_name, {})
|
||||||
$enable_ipv4 = try_get_value($plugin_settings, 'enable_ipv4', true)
|
$enable_ipv4 = try_get_value($plugin_settings, 'enable_ipv4', true)
|
||||||
$enable_ipv6 = try_get_value($plugin_settings, 'enable_ipv6', false)
|
$enable_ipv6 = try_get_value($plugin_settings, 'enable_ipv6', false)
|
||||||
$as_number = try_get_value($plugin_settings, 'as_number', 65001)
|
$as_number = try_get_value($plugin_settings, 'as_number', 65001)
|
||||||
|
@ -31,7 +31,7 @@ firewall { '410 bird':
|
||||||
proto => 'tcp',
|
proto => 'tcp',
|
||||||
action => 'accept',
|
action => 'accept',
|
||||||
} ->
|
} ->
|
||||||
class { 'calico::bird':
|
class { '::calico::bird':
|
||||||
template => 'rr',
|
template => 'rr',
|
||||||
as_number => $as_number,
|
as_number => $as_number,
|
||||||
enable_ipv4 => $enable_ipv4,
|
enable_ipv4 => $enable_ipv4,
|
||||||
|
|
|
@ -50,7 +50,7 @@ class calico::bird (
|
||||||
mode => '0644',
|
mode => '0644',
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
content => template("calico/bird-calico_os-filters.conf.erb"),
|
content => template('calico/bird-calico_os-filters.conf.erb'),
|
||||||
} ->
|
} ->
|
||||||
file { '/etc/bird/bird.conf':
|
file { '/etc/bird/bird.conf':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
@ -92,4 +92,4 @@ class calico::bird (
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
# vim: set ts=2 sw=2 et :
|
# vim: set ts=2 sw=2 et :
|
||||||
|
|
|
@ -9,7 +9,7 @@ define calico::bird::bgp_peer_record (
|
||||||
) {
|
) {
|
||||||
include ::calico::params
|
include ::calico::params
|
||||||
$peer_config_path = "/etc/bird/peers/${template}__${name}.conf"
|
$peer_config_path = "/etc/bird/peers/${template}__${name}.conf"
|
||||||
file { "${peer_config_path}":
|
file { $peer_config_path:
|
||||||
ensure => $ensure,
|
ensure => $ensure,
|
||||||
require => File['/etc/bird/peers'],
|
require => File['/etc/bird/peers'],
|
||||||
before => File['/etc/bird/bird.conf'],
|
before => File['/etc/bird/bird.conf'],
|
||||||
|
@ -17,19 +17,19 @@ define calico::bird::bgp_peer_record (
|
||||||
content => template("calico/bird-peer-${template}.conf.erb"),
|
content => template("calico/bird-peer-${template}.conf.erb"),
|
||||||
}
|
}
|
||||||
if $include {
|
if $include {
|
||||||
file_line {"":
|
file_line {'':
|
||||||
line => "include ${peer_config_path};",
|
line => "include ${peer_config_path};",
|
||||||
path => '/etc/bird/bird.conf',
|
path => '/etc/bird/bird.conf',
|
||||||
#after => undef,
|
#after => undef,
|
||||||
#ensure => 'present',
|
#ensure => 'present',
|
||||||
#match => undef, # /.*match/
|
#match => undef, # /.*match/
|
||||||
#multiple => undef, # 'true' or 'false'
|
#multiple => undef, # 'true' or 'false'
|
||||||
#name => undef,
|
#name => undef,
|
||||||
#replace => true, # 'true' or 'false'
|
#replace => true, # 'true' or 'false'
|
||||||
require => File['/etc/bird/bird.conf'],
|
require => File['/etc/bird/bird.conf'],
|
||||||
notify => Service['bird']
|
notify => Service['bird']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# vim: set ts=2 sw=2 et :
|
# vim: set ts=2 sw=2 et :
|
||||||
|
|
|
@ -54,9 +54,9 @@ case $node_role {
|
||||||
|
|
||||||
file { '/var/log/etcd.log':
|
file { '/var/log/etcd.log':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
mode => '0644',
|
mode => '0644',
|
||||||
owner => 'etcd',
|
owner => 'etcd',
|
||||||
group => 'etcd',
|
group => 'etcd',
|
||||||
} ->
|
} ->
|
||||||
|
|
||||||
file { '/etc/init/etcd.conf':
|
file { '/etc/init/etcd.conf':
|
||||||
|
@ -74,4 +74,4 @@ case $node_role {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
# vim: set ts=2 sw=2 et :
|
# vim: set ts=2 sw=2 et :
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
class calico {
|
class calico {
|
||||||
|
|
||||||
include calico::params
|
include ::calico::params
|
||||||
|
|
||||||
}
|
}
|
||||||
# vim: set ts=2 sw=2 et :
|
# vim: set ts=2 sw=2 et :
|
||||||
|
|
|
@ -38,6 +38,6 @@ class calico::params {
|
||||||
$etcd_peer_port = '2380'
|
$etcd_peer_port = '2380'
|
||||||
$etcd_servers = suffix(prefix($etcd_nodes_ips, 'http://'), ":${etcd_port}")
|
$etcd_servers = suffix(prefix($etcd_nodes_ips, 'http://'), ":${etcd_port}")
|
||||||
$etcd_servers_list = join($etcd_servers, ',')
|
$etcd_servers_list = join($etcd_servers, ',')
|
||||||
$etcd_servers_named_list = join(suffix(join_keys_to_values($etcd_nodes_map,"=http://"), ":${etcd_peer_port}"), ',')
|
$etcd_servers_named_list = join(suffix(join_keys_to_values($etcd_nodes_map,'=http://'), ":${etcd_peer_port}"), ',')
|
||||||
}
|
}
|
||||||
# vim: set ts=2 sw=2 et :
|
# vim: set ts=2 sw=2 et :
|
||||||
|
|
|
@ -9,4 +9,4 @@
|
||||||
# Learn more about module testing here:
|
# Learn more about module testing here:
|
||||||
# http://docs.puppetlabs.com/guides/tests_smoke.html
|
# http://docs.puppetlabs.com/guides/tests_smoke.html
|
||||||
#
|
#
|
||||||
include calico
|
include ::calico
|
||||||
|
|
Loading…
Reference in New Issue