-
Notifications
You must be signed in to change notification settings - Fork 35
Puppet open source
Amy Buck edited this page Nov 20, 2018
·
7 revisions
This use case describes how to use Puppet to configure systems — each system is connected to a server.
1. Install the Puppet master on an external server and configure it to manage systems running the software by following the instructions at www.puppetlabs.com.
2. Install and configure the Puppet agent on both systems by following the instructions at www.puppetlabs.com.
3. Verify if the Puppet master can communicate with the Puppet agents through the management network.
node 'R1.dell.com' {
$int_enabled = true
$int_loopback = '2.2.2.2'
$int_layer3 = {
e101-019-0 => {'int'=>'e101-019-0', 'address' => '19.0.0.1', 'netmask' => '255.255.255.0', 'cidr_netmask' => 24},
e101-020-0 => {'int'=>'e101-020-0', 'address' => '20.0.0.1', 'netmask' => '255.255.255.0', 'cidr_netmask' => 24},
}
$bgp = {
myasn => 65000,
peergroupv4 => [ { name => 'R2', asn => 65000, peers => [ '19.0.0.2','20.0.0.2' ] } ]
}
include ibgp::switch
}
node 'R2.dell.com' {
$int_enabled = true
$int_loopback = '3.3.3.3'
$int_layer3 = {
e101-019-0 => { 'int'=> 'e101-019-0', 'address' => '19.0.0.2', 'netmask' => '255.255.255.0', 'cidr_netmask' => 24 },
e101-020-0 => { 'int'=> ' e101-020-0','address' => '21.0.0.1', 'netmask' => '255.255.255.0', 'cidr_netmask' => 24 },
}
$bgp = {
myasn => 65000,
peergroupv4 => [ { name => 'R1', asn => 65000, peers => [ '19.0.0.1','20.0.0.1' ] } ]
}
include ibgp::switch
}
class ibgp::switch {
include ibgp::quagga
}
class ibgp::quagga {
service { 'quagga':
ensure => running,
hasstatus => false,
enable => true,
}
file { '/etc/quagga/daemons':
owner => quagga,
group => quagga,
source => 'puppet:///modules/ibgp/quagga_daemons',
notify => Service['quagga']
}
file { '/etc/quagga/Quagga.conf':
owner => root,
group => quaggavty,
mode => '0644',
content => template('ibgp/Quagga.conf.erb'),
notify => Service['quagga']
}
}
! This file is managed by Puppet
hostname zebra
log file /var/log/frr/zebra.log
hostname ospfd
log file /var/log/frr/ospfd.log
log timestamp precision 6
hostname bgpd
log file /var/log/frr/bgpd.log
!
password cn321
enable password cn321
!
<% @int_layer3.each_pair do |layer3, options| -%>
interface <%= options["int"] %>
ip address <%=options["address"]%>/<%=options["cidr_netmask"] %>
no shutdown
<% end -%>
route-id <%= @int_loopback %>
<% if @bgp -%>
router bgp <%= @bgp["myasn"] %>
maximum-paths ibgp 4
bgp router-id <%= int_loopback %>
bgp log-neighbor-changes
network <%= @int_loopback %>/32
<% @int_bridges.each_pair do |bridge, options| -%> network <%= options["address"] %>/<%= options["cidr_netmask"] %>
<% end -%>
<% @bgp["peergroupv4"].each do |peergroup| -%>
neighbor <%= peergroup["name"] %> peer-group
neighbor <%= peergroup["name"] %> remote-as <%= peergroup["asn"] %>
<% if peergroup["name"]["routereflectorclient"] -%>
neighbor <% peergroup["name"] %> route-reflector-client
<% end -%>
<% peergroup["peers"].each do |peer| -%>
neighbor <%= peer %> peer-group <%= peergroup["name"] %>
<% end -%>
<% end -%>
<% end -%>
!
<% if @int_unnumbered -%>
<% @int_unnumbbers.each do |interface| -%>
no passive-interface <%= interface %>
<% end -%>
network <%= @int_loopback >/32 area 0.0.0.0
<% if @hostnetranges and @is_leaf -%>
<% @hostnetranges.each do |hostnetrange| -%>
network <%= hostnetrange %> area 0.0.0.0
<% end -%>
<% end -%>
<% end -%>
zebra=yes
bgpd=yes
ospfd=no
ospf6d=no
ripd=no
ripngd=no
isisd=no
babeld=no
© 2019 OpenSwitch project. All information is contributed to and made available by OPX under the Creative Commons Attribution 4.0 International License (available at http://creativecommons.org/licenses/by/4.0/).
- Home
- System overview
- Software releases
- Hardware support
- FAQs
- Install
- Build
- Configure
- Develop
- Administer
- Troubleshoot
- Software compatibility
- Contribute
- DevOps
- Join