-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from rwf14f/master
Major rewrite for perfsonar 3.4
- Loading branch information
Showing
25 changed files
with
613 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class perfsonar::bwctl { | ||
include 'perfsonar::bwctl::install' | ||
include 'perfsonar::bwctl::service' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class perfsonar::bwctl::install( | ||
$ensure = $::perfsonar::params::bwctl_install_ensure, | ||
) inherits perfsonar::params { | ||
package { $::perfsonar::params::bwctl_packages: | ||
ensure => $ensure, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class perfsonar::bwctl::service( | ||
$ensure = $::perfsonar::params::bwctl_ensure, | ||
$enable = $::perfsonar::params::bwctl_enable, | ||
) inherits perfsonar::params { | ||
service { 'bwctld': | ||
ensure => $ensure, | ||
enable => $enable, | ||
hasstatus => false, | ||
hasrestart => true, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
class perfsonar::esmond ( | ||
$use_db_module = true, | ||
$dbname = $::perfsonar::params::esmond_dbname, | ||
$dbuser = $::perfsonar::params::esmond_dbuser, | ||
$dbpassword = $::perfsonar::params::esmond_dbpass, | ||
) inherits perfsonar::params { | ||
if $use_db_module { | ||
class { 'postgresql::server': } | ||
postgresql::server::db { $dbname: | ||
user => $dbuser, | ||
password => postgresql_password($dbuser, $dbpassword), | ||
grant => 'ALL', | ||
before => Exec['run esmond configuration script'], | ||
} | ||
# update auth to allow esmond access to the DB | ||
postgresql::server::pg_hba_rule { 'allow local password auth': | ||
description => 'allow local authentication using a password', | ||
type => 'local', | ||
database => 'all', | ||
user => 'all', | ||
auth_method => 'md5', | ||
# need local md5 auth for esmond user, but the second default pg_hba rule | ||
# is a generic ident auth for local connections, therefore we need to place | ||
# this rule before the second default rule | ||
order => '002', | ||
before => Exec['run esmond configuration script'], | ||
} | ||
} | ||
|
||
file { '/opt/esmond/esmond.conf': | ||
ensure => 'file', | ||
owner => 'root', | ||
group => 'root', | ||
mode => '0644', | ||
content => template("${module_name}/esmond.conf.erb"), | ||
require => Package['esmond'], | ||
} | ||
# the remaining content of this script should be moved here if possible | ||
file { '/usr/local/sbin/puppet_perfsonar_configure_esmond': | ||
ensure => 'file', | ||
owner => 'root', | ||
group => 'root', | ||
mode => '0750', | ||
content => template("${module_name}/configure_esmond.erb"), | ||
require => File['/opt/esmond/esmond.conf'], | ||
} | ||
exec { 'run esmond configuration script': | ||
command => '/usr/local/sbin/puppet_perfsonar_configure_esmond', | ||
logoutput => 'on_failure', | ||
creates => '/var/lib/esmond/.configured.puppet', | ||
require => File['/usr/local/sbin/puppet_perfsonar_configure_esmond'], | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class perfsonar { | ||
include 'perfsonar::install' | ||
include 'perfsonar::config' | ||
include 'perfsonar::service' | ||
include 'perfsonar::apache' | ||
include 'perfsonar::esmond' | ||
include 'perfsonar::regular_testing' | ||
include 'perfsonar::mesh_config' | ||
include 'perfsonar::owamp' | ||
include 'perfsonar::bwctl' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
class perfsonar::install ( | ||
$packages = $perfsonar::params::install_packages, | ||
$ensure = $::perfsonar::install_ensure, | ||
) inherits perfsonar::params { | ||
package { $packages: } | ||
package { $perfsonar::params::install_packages: | ||
ensure => $ensure, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class perfsonar::mesh_config { | ||
include 'perfsonar::mesh_config::install' | ||
include 'perfsonar::mesh_config::config' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
class perfsonar::mesh_config::config( | ||
$agentconfig = $::perfsonar::params::mesh_config_agent, | ||
) inherits perfsonar::params { | ||
$agent_options = merge($perfsonar::params::agentconfig, $agentconfig) | ||
file { '/opt/perfsonar_ps/mesh_config/etc/agent_configuration.conf': | ||
ensure => 'present', | ||
owner => 'perfsonar', | ||
group => 'perfsonar', | ||
mode => '0644', | ||
content => template("${module_name}/agent_configuration.conf.erb"), | ||
require => Package['perl-perfSONAR_PS-MeshConfig-Agent'] | ||
} | ||
# needs notty in sudoers | ||
exec { 'generate mesh configuration': | ||
command => '/usr/bin/sudo -u perfsonar /opt/perfsonar_ps/mesh_config/bin/generate_configuration', | ||
logoutput => 'on_failure', | ||
subscribe => File['/opt/perfsonar_ps/mesh_config/etc/agent_configuration.conf'], | ||
require => [ | ||
Exec['run regular testing configuration script'], | ||
File['/etc/sudoers.d/perfsonar'], | ||
], | ||
refreshonly => true, | ||
notify => Service['regular_testing'], | ||
} | ||
file { '/etc/sudoers.d/perfsonar': | ||
ensure => 'file', | ||
owner => 'root', | ||
group => 'root', | ||
mode => '0440', | ||
content => "Defaults!/opt/perfsonar_ps/mesh_config/bin/generate_configuration !requiretty\n", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class perfsonar::mesh_config::install( | ||
$ensure = $::perfsonar::params::mesh_config_install_ensure, | ||
) inherits perfsonar::params { | ||
package { $::perfsonar::params::mesh_config_packages: | ||
ensure => $ensure, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class perfsonar::owamp { | ||
include 'perfsonar::owamp::install' | ||
include 'perfsonar::owamp::service' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class perfsonar::owamp::install( | ||
$ensure = $::perfsonar::params::owamp_install_ensure, | ||
) inherits perfsonar::params { | ||
package { $::perfsonar::params::owamp_packages: | ||
ensure => $ensure, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class perfsonar::owamp::service( | ||
$ensure = $::perfsonar::params::owamp_ensure, | ||
$enable = $::perfsonar::params::owamp_enable, | ||
) inherits perfsonar::params { | ||
service { 'owampd': | ||
ensure => $ensure, | ||
enable => $enable, | ||
hasstatus => false, | ||
hasrestart => true, | ||
} | ||
} |
Oops, something went wrong.