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
|
@ -71,8 +71,8 @@ service {'calico-alt-gateway':
|
|||
# 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'
|
||||
sysctl::value {
|
||||
'net.ipv4.conf.all.rp_filter': value => "0";
|
||||
"net.ipv4.conf.${calico_alt_gateway_br}.rp_filter": value => "0";
|
||||
'net.ipv4.conf.all.rp_filter': value => '0';
|
||||
"net.ipv4.conf.${calico_alt_gateway_br}.rp_filter": value => '0';
|
||||
}
|
||||
|
||||
# vim: set ts=2 sw=2 et :
|
|
@ -6,7 +6,7 @@ $network_metadata = hiera_hash('network_metadata', {})
|
|||
|
||||
# Initial constants
|
||||
$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_ipv6 = try_get_value($plugin_settings, 'enable_ipv6', false)
|
||||
$as_number = try_get_value($plugin_settings, 'as_number', 65001)
|
||||
|
@ -26,7 +26,7 @@ firewall { '410 bird':
|
|||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
} ->
|
||||
class { 'calico::bird':
|
||||
class { '::calico::bird':
|
||||
template => 'compute',
|
||||
as_number => $as_number,
|
||||
enable_ipv4 => $enable_ipv4,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
notice('MODULAR: calico/compute_felix.pp')
|
||||
|
||||
include calico
|
||||
include ::calico
|
||||
|
||||
# required, because neutron-dhcp-agent one of dependency of calico-compute
|
||||
package { 'neutron-dhcp-agent':
|
||||
|
|
|
@ -5,12 +5,12 @@ notice('MODULAR: calico/compute_metadata_api.pp')
|
|||
# $network_metadata = hiera_hash('network_metadata', {})
|
||||
|
||||
package { 'nova-api-metadata':
|
||||
name => 'nova-api-metadata',
|
||||
ensure => 'installed',
|
||||
name => 'nova-api-metadata',
|
||||
} ->
|
||||
service { 'nova-api-metadata':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
ensure => running
|
||||
}
|
||||
|
||||
# Package['nova-api-metadata'] -> Nova_config<||>
|
||||
|
|
|
@ -4,13 +4,13 @@ $network_scheme = hiera_hash('network_scheme', {})
|
|||
prepare_network_config($network_scheme)
|
||||
$network_metadata = hiera_hash('network_metadata', {})
|
||||
|
||||
include calico
|
||||
include ::calico
|
||||
include ::nova::params
|
||||
|
||||
|
||||
# Initial constants
|
||||
$plugin_name = 'fuel-plugin-calico'
|
||||
$plugin_settings = hiera_hash("${plugin_name}", {})
|
||||
$plugin_settings = hiera_hash($plugin_name, {})
|
||||
|
||||
$neutron_config = hiera_hash('neutron_config')
|
||||
$management_vip = hiera('management_vip')
|
||||
|
|
|
@ -3,11 +3,11 @@ notice('MODULAR: calico/etcd_proxy.pp')
|
|||
prepare_network_config(hiera_hash('network_scheme'))
|
||||
$network_metadata = hiera_hash('network_metadata', {})
|
||||
|
||||
include calico
|
||||
include ::calico
|
||||
|
||||
# Initial constants
|
||||
$plugin_name = 'fuel-plugin-calico'
|
||||
$plugin_settings = hiera_hash("${plugin_name}", {})
|
||||
$plugin_settings = hiera_hash($plugin_name, {})
|
||||
|
||||
# Firewall initials
|
||||
class { '::firewall':}
|
||||
|
@ -22,7 +22,7 @@ firewall { '400 etcd':
|
|||
action => 'accept',
|
||||
} ->
|
||||
# Deploy etcd cluster member
|
||||
class { 'calico::etcd':
|
||||
class { '::calico::etcd':
|
||||
node_role => 'proxy',
|
||||
bind_host => $calico::params::mgmt_ip,
|
||||
bind_port => $calico::params::etcd_port,
|
||||
|
|
|
@ -3,8 +3,8 @@ notice('MODULAR: calico/hiera_override.pp')
|
|||
|
||||
# Initial constants
|
||||
$plugin_name = 'fuel-plugin-calico'
|
||||
$plugin_settings = hiera_hash("${plugin_name}", {})
|
||||
$network_scheme = hiera_hash("network_scheme", {})
|
||||
$plugin_settings = hiera_hash($plugin_name, {})
|
||||
$network_scheme = hiera_hash('network_scheme', {})
|
||||
|
||||
# Mangle network_scheme for setup new gateway
|
||||
if $plugin_settings['metadata']['enabled'] {
|
||||
|
@ -16,7 +16,7 @@ if $plugin_settings['metadata']['enabled'] {
|
|||
$overrides = remove_ovs_usage($network_scheme)
|
||||
file {"/etc/hiera/plugins/${plugin_name}.yaml":
|
||||
ensure => file,
|
||||
content => inline_template("<%= @overrides %>")
|
||||
content => inline_template('<%= @overrides %>')
|
||||
}
|
||||
}
|
||||
# vim: set ts=2 sw=2 et :
|
|
@ -4,7 +4,7 @@ notice('MODULAR: calico/neutron_networks.pp')
|
|||
|
||||
# Initial constants
|
||||
$plugin_name = 'fuel-plugin-calico'
|
||||
$plugin_settings = hiera_hash("${plugin_name}", {})
|
||||
$plugin_settings = hiera_hash($plugin_name, {})
|
||||
|
||||
$access_hash = hiera_hash('access', {})
|
||||
$tenant_name = try_get_value($access_hash, 'tenant', 'admin')
|
||||
|
|
|
@ -8,11 +8,11 @@ $network_scheme = hiera_hash('network_scheme', {})
|
|||
prepare_network_config($network_scheme)
|
||||
$network_metadata = hiera_hash('network_metadata', {})
|
||||
|
||||
include calico
|
||||
include ::calico
|
||||
|
||||
# Initial constants
|
||||
$plugin_name = 'fuel-plugin-calico'
|
||||
$plugin_settings = hiera_hash("${plugin_name}", {})
|
||||
$plugin_settings = hiera_hash($plugin_name, {})
|
||||
|
||||
# override neutron options
|
||||
$override_configuration = hiera_hash('configuration', {})
|
||||
|
@ -159,9 +159,9 @@ class { '::neutron::server':
|
|||
}
|
||||
|
||||
Package['neutron'] ~>
|
||||
augeas { "dhcp_agents_per_network":
|
||||
augeas { 'dhcp_agents_per_network':
|
||||
#context => "/files/etc/neutron/neutron.conf",
|
||||
incl => "/etc/neutron/neutron.conf",
|
||||
incl => '/etc/neutron/neutron.conf',
|
||||
lens => 'Puppet.lns',
|
||||
changes => [
|
||||
"set DEFAULT/dhcp_agents_per_network ${calico::params::compute_nodes_count}",
|
||||
|
@ -169,11 +169,13 @@ augeas { "dhcp_agents_per_network":
|
|||
} ~> Service['neutron-server']
|
||||
|
||||
include ::neutron::params
|
||||
tweaks::ubuntu_service_override { $::neutron::params::server_service:
|
||||
package_name => $neutron::params::server_package ? {
|
||||
$neutron_server_package = $neutron::params::server_package ? {
|
||||
false => $neutron::params::package_name,
|
||||
default => $neutron::params::server_package
|
||||
}
|
||||
default => $neutron::params::server_package,
|
||||
}
|
||||
|
||||
tweaks::ubuntu_service_override { $::neutron::params::server_service:
|
||||
package_name => $neutron_server_package,
|
||||
}
|
||||
|
||||
class { '::neutron::server::notifications':
|
||||
|
@ -187,6 +189,6 @@ class { '::neutron::server::notifications':
|
|||
|
||||
# Stub for Nuetron package
|
||||
package { 'neutron':
|
||||
name => 'binutils',
|
||||
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")
|
||||
|
||||
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 :
|
|
@ -2,23 +2,27 @@ notice('MODULAR: calico/repo_setup.pp')
|
|||
|
||||
# Initial constants
|
||||
$plugin_name = 'fuel-plugin-calico'
|
||||
$plugin_settings = hiera_hash("${plugin_name}", {})
|
||||
$plugin_settings = hiera_hash($plugin_name, {})
|
||||
|
||||
# Bird PPA
|
||||
apt::source { 'bird-repo':
|
||||
location => 'http://ppa.launchpad.net/cz.nic-labs/bird/ubuntu',
|
||||
repos => 'main',
|
||||
#release => 'trusty',
|
||||
include => { 'src' => false },
|
||||
include => {
|
||||
'src' => false,
|
||||
},
|
||||
}
|
||||
|
||||
# Calico PPA
|
||||
apt::source { 'calico-repo':
|
||||
#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',
|
||||
#release => 'trusty',
|
||||
include => { 'src' => false },
|
||||
include => {
|
||||
'src' => false,
|
||||
},
|
||||
}
|
||||
|
||||
Apt::Source<||> ~> Exec<| title == 'apt_update' |>
|
||||
|
|
|
@ -3,11 +3,11 @@ notice('MODULAR: calico/etcd.pp')
|
|||
prepare_network_config(hiera_hash('network_scheme'))
|
||||
$network_metadata = hiera_hash('network_metadata', {})
|
||||
|
||||
include calico
|
||||
include ::calico
|
||||
|
||||
# Initial constants
|
||||
$plugin_name = 'fuel-plugin-calico'
|
||||
$plugin_settings = hiera_hash("${plugin_name}", {})
|
||||
$plugin_settings = hiera_hash($plugin_name, {})
|
||||
$cluster_info = hiera_hash('cluster', {})
|
||||
$cluster_token = try_get_value($cluster_info, 'name', 'openstack-calico-cluster')
|
||||
|
||||
|
@ -25,7 +25,7 @@ firewall { '400 etcd':
|
|||
action => 'accept',
|
||||
} ->
|
||||
# Deploy etcd cluster member
|
||||
class { 'calico::etcd':
|
||||
class { '::calico::etcd':
|
||||
node_role => 'server',
|
||||
bind_host => $calico::params::mgmt_ip,
|
||||
bind_port => $calico::params::etcd_port,
|
||||
|
|
|
@ -6,7 +6,7 @@ $network_metadata = hiera_hash('network_metadata', {})
|
|||
|
||||
# Initial constants
|
||||
$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_ipv6 = try_get_value($plugin_settings, 'enable_ipv6', false)
|
||||
$as_number = try_get_value($plugin_settings, 'as_number', 65001)
|
||||
|
@ -31,7 +31,7 @@ firewall { '410 bird':
|
|||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
} ->
|
||||
class { 'calico::bird':
|
||||
class { '::calico::bird':
|
||||
template => 'rr',
|
||||
as_number => $as_number,
|
||||
enable_ipv4 => $enable_ipv4,
|
||||
|
|
|
@ -50,7 +50,7 @@ class calico::bird (
|
|||
mode => '0644',
|
||||
owner => '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':
|
||||
ensure => present,
|
||||
|
|
|
@ -9,7 +9,7 @@ define calico::bird::bgp_peer_record (
|
|||
) {
|
||||
include ::calico::params
|
||||
$peer_config_path = "/etc/bird/peers/${template}__${name}.conf"
|
||||
file { "${peer_config_path}":
|
||||
file { $peer_config_path:
|
||||
ensure => $ensure,
|
||||
require => File['/etc/bird/peers'],
|
||||
before => File['/etc/bird/bird.conf'],
|
||||
|
@ -17,7 +17,7 @@ define calico::bird::bgp_peer_record (
|
|||
content => template("calico/bird-peer-${template}.conf.erb"),
|
||||
}
|
||||
if $include {
|
||||
file_line {"":
|
||||
file_line {'':
|
||||
line => "include ${peer_config_path};",
|
||||
path => '/etc/bird/bird.conf',
|
||||
#after => undef,
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
class calico {
|
||||
|
||||
include calico::params
|
||||
include ::calico::params
|
||||
|
||||
}
|
||||
# vim: set ts=2 sw=2 et :
|
|
@ -38,6 +38,6 @@ class calico::params {
|
|||
$etcd_peer_port = '2380'
|
||||
$etcd_servers = suffix(prefix($etcd_nodes_ips, 'http://'), ":${etcd_port}")
|
||||
$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 :
|
|
@ -9,4 +9,4 @@
|
|||
# Learn more about module testing here:
|
||||
# http://docs.puppetlabs.com/guides/tests_smoke.html
|
||||
#
|
||||
include calico
|
||||
include ::calico
|
||||
|
|
Loading…
Reference in New Issue