Node roles for plugin tasks updated.
Node_role variable for plugin puppet tasks set explicitly to address the case when nodes may have multiple roles assigned, e.g. compute nodes with ceph-osd. Change-Id: I1e42f0f57c52a5ad1821eb252edbfc28c4507774
This commit is contained in:
@@ -13,9 +13,16 @@
|
||||
# under the License.
|
||||
|
||||
include contrail
|
||||
|
||||
$node_role = 'compute'
|
||||
Exec { path => '/bin:/sbin:/usr/bin:/usr/sbin', refresh => 'echo NOOP_ON_REFRESH'}
|
||||
|
||||
class { 'contrail::network':
|
||||
node_role => $node_role,
|
||||
address => $contrail::address,
|
||||
ifname => $contrail::ifname,
|
||||
netmask => $contrail::netmask_short,
|
||||
} ->
|
||||
|
||||
case $operatingsystem {
|
||||
Ubuntu: {
|
||||
|
||||
@@ -28,7 +35,7 @@ case $operatingsystem {
|
||||
CentOS: {
|
||||
class { 'contrail::package':
|
||||
install => ['contrail-openstack-vrouter','iproute','haproxy','patch'],
|
||||
remove => ['openvswitch','openstack-neutron-openvswitch']
|
||||
remove => ['openvswitch','openstack-neutron-openvswitch'],
|
||||
}
|
||||
->
|
||||
class { 'contrail::vrouter_module':}
|
||||
@@ -36,29 +43,21 @@ case $operatingsystem {
|
||||
file { '/etc/supervisord.conf':
|
||||
ensure => 'link',
|
||||
target => '/etc/contrail/supervisord_vrouter.conf',
|
||||
force => yes
|
||||
force => 'yes',
|
||||
}
|
||||
->
|
||||
file {'/etc/contrail/default_pmac':
|
||||
ensure => present
|
||||
ensure => present,
|
||||
}
|
||||
->
|
||||
service {'supervisor-vrouter': enable => true}
|
||||
}
|
||||
}
|
||||
|
||||
class { 'contrail::network':
|
||||
node_role => 'compute',
|
||||
address => $contrail::address,
|
||||
ifname => $contrail::ifname,
|
||||
netmask => $contrail::netmask_short,
|
||||
require => Class['contrail::package']
|
||||
} ->
|
||||
|
||||
class { 'contrail::config':
|
||||
node_role => $contrail::node_role,
|
||||
node_role => $node_role,
|
||||
} ->
|
||||
|
||||
class { 'contrail::provision':
|
||||
node_role => $contrail::node_role,
|
||||
node_role => $node_role,
|
||||
}
|
||||
|
||||
@@ -13,11 +13,12 @@
|
||||
# under the License.
|
||||
|
||||
include contrail
|
||||
$node_role = 'base-os'
|
||||
if $contrail::node_name =~ /^contrail.\d+$/ {
|
||||
class { 'contrail::config':
|
||||
node_role => $contrail::node_role,
|
||||
node_role => $node_role,
|
||||
} ~>
|
||||
class { 'contrail::service':
|
||||
node_role => $contrail::node_role,
|
||||
node_role => $node_role,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
# under the License.
|
||||
|
||||
include contrail
|
||||
$node_role = 'base-os'
|
||||
if $contrail::node_name == $contrail::deployment_node {
|
||||
class {'contrail::provision':
|
||||
node_role => $contrail::node_role,
|
||||
node_role => $node_role,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
include contrail
|
||||
|
||||
$node_role = 'base-os'
|
||||
Exec { path => '/bin:/sbin:/usr/bin:/usr/sbin'}
|
||||
|
||||
if $contrail::node_name =~ /^contrail.\d+$/ {
|
||||
@@ -35,14 +35,14 @@ if $contrail::node_name =~ /^contrail.\d+$/ {
|
||||
}
|
||||
|
||||
class { 'contrail::network':
|
||||
node_role => 'base-os',
|
||||
node_role => $node_role,
|
||||
address => $contrail::address,
|
||||
ifname => $contrail::ifname,
|
||||
netmask => $contrail::netmask_short,
|
||||
public_addr => $contrail::public_addr,
|
||||
public_netmask => $contrail::public_netmask,
|
||||
public_if => $contrail::public_if,
|
||||
public_gw => $contrail::public_gw
|
||||
public_gw => $contrail::public_gw,
|
||||
} ->
|
||||
|
||||
class { 'contrail::ssh':
|
||||
|
||||
@@ -13,12 +13,13 @@
|
||||
# under the License.
|
||||
|
||||
include contrail
|
||||
$node_role = 'controller'
|
||||
class { 'contrail::config':
|
||||
node_role => $contrail::node_role,
|
||||
node_role => $node_role,
|
||||
} ~>
|
||||
class { 'contrail::service':
|
||||
node_role => $contrail::node_role,
|
||||
node_role => $node_role,
|
||||
} ->
|
||||
class {'contrail::provision':
|
||||
node_role => $contrail::node_role,
|
||||
node_role => $node_role,
|
||||
}
|
||||
@@ -14,14 +14,14 @@
|
||||
|
||||
class contrail::vrouter_module () {
|
||||
package {['contrail-vrouter-source','dkms']:
|
||||
ensure => present,
|
||||
ensure => present,
|
||||
install_options => ['nogpgcheck'] # dkms package it not signed yet
|
||||
}
|
||||
->
|
||||
|
||||
file {'/tmp/vrouter.patch':
|
||||
ensure => file,
|
||||
source => 'puppet:///modules/contrail/vrouter.patch'
|
||||
source => 'puppet:///modules/contrail/vrouter.patch',
|
||||
}
|
||||
->
|
||||
|
||||
@@ -29,7 +29,7 @@ class contrail::vrouter_module () {
|
||||
->
|
||||
|
||||
exec {'unpack_src':
|
||||
command =>'tar -xf /usr/src/modules/contrail-vrouter/contrail-vrouter-2.01.tar.gz -C /usr/src/vrouter-2.01',
|
||||
command => 'tar -xf /usr/src/modules/contrail-vrouter/contrail-vrouter-2.01.tar.gz -C /usr/src/vrouter-2.01',
|
||||
}
|
||||
->
|
||||
|
||||
@@ -40,11 +40,12 @@ class contrail::vrouter_module () {
|
||||
->
|
||||
|
||||
exec {'patch_vrouter':
|
||||
command =>'patch /usr/src/vrouter-2.01/include/vr_compat.h /tmp/vrouter.patch',
|
||||
command => 'patch /usr/src/vrouter-2.01/include/vr_compat.h /tmp/vrouter.patch',
|
||||
}
|
||||
->
|
||||
|
||||
exec {'build_install_module':
|
||||
command =>'dkms add vrouter/2.01 && dkms build vrouter/2.01 && dkms install vrouter/2.01',
|
||||
command => 'dkms add vrouter/2.01 && dkms build vrouter/2.01 && dkms install vrouter/2.01',
|
||||
unless => 'dkms status vrouter/2.01 | grep installed 2>/dev/null',
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user