diff --git a/manifests/esmond.pp b/manifests/esmond.pp index f8206b1..f5d42a1 100644 --- a/manifests/esmond.pp +++ b/manifests/esmond.pp @@ -3,6 +3,8 @@ $dbname = $::perfsonar::params::esmond_dbname, $dbuser = $::perfsonar::params::esmond_dbuser, $dbpassword = $::perfsonar::params::esmond_dbpass, + $esmondroot = $::perfsonar::params::esmond_root, + $esmondconf = $::perfsonar::params::esmond_conf_path, ) inherits perfsonar::params { if $use_db_module { class { 'postgresql::server': } @@ -25,9 +27,7 @@ order => '002', before => Exec['run esmond configuration script'], } - } - else - { + } else { # the sudo rule is only required if postgresql is configured by the script file { '/etc/sudoers.d/perfsonar_esmond': ensure => 'file', diff --git a/manifests/mesh_config/config.pp b/manifests/mesh_config/config.pp index 4943181..ff7cf25 100644 --- a/manifests/mesh_config/config.pp +++ b/manifests/mesh_config/config.pp @@ -27,6 +27,6 @@ owner => 'root', group => 'root', mode => '0440', - content => "Defaults!/opt/perfsonar_ps/mesh_config/bin/generate_configuration !requiretty\n", + content => "Defaults!/usr/lib/perfsonar/bin/generate_configuration !requiretty\n", } } diff --git a/manifests/params.pp b/manifests/params.pp index b96785a..0c01515 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -81,7 +81,7 @@ 'nscd', 'cassandra20', $modssl_package, -# don't want to install SystemEnvironment because it keeps overwriting my configurations during updates +# don't want to install perfsonar-toolkit-systemenv because it keeps overwriting my configurations during updates # 'perfsonar-toolkit-systemenv', # packages that are installed by perfsonar-toolkit-systemenv: # perfsonar-toolkit-ntp @@ -93,22 +93,13 @@ # according to /opt/perfsonar_ps/toolkit/lib/perfSONAR_PS/NPToolkit/Services/*.pm, the following services need regular restarts: OWAMP, RegularTesting # perfsonar-toolkit-sysctl # configures /etc/sysctl.conf (appends values) -# don't want to install gcc and mysql, it's not required -# 'gcc', -# 'mysql-devel', -# is this for the web100 kernel only ?? -# 'kmod-sk98lin', +# unfortunately, with ps 3.5.1.x the main perfsonar-toolkit depends on perfsonar-toolkit-systemenv +# perfsonar-toolkit is also not a meta package, it contains necessary files, so it has to be installed +# the easiest option to avoid the systemenv package is to create dummy rpm with the same name and a higher version number + # are the ones below still required ? 'device-mapper-multipath', -# 'php-gd', -# 'php-xml', -# 'syslinux', -# 'xplot-tcptrace', ] - # other packages in the original kickstart, but left out - # 'perl-DBD-mysql' doesn't exist, it's called perl-DBD-MySQL - # 'xkeyboard-config' do we need it, we don't run X ?? - # 'comps-extras' contains images only, do we need it ?? $regular_testing_packages = [ 'perfsonar-regulartesting', diff --git a/manifests/patches.pp b/manifests/patches.pp index e1118ae..d930db7 100644 --- a/manifests/patches.pp +++ b/manifests/patches.pp @@ -12,19 +12,21 @@ $patchpackage_require = undef } case $perfsonar_version { - /^3\.5\.0/: { + /^3\.5\.1/: { $patches = { '01_perfsonar_webservice_auth.patch.3.5.0' => { - path => '/opt/perfsonar_ps/toolkit/lib/perfSONAR_PS/NPToolkit/WebService', + path => '/usr/lib/perfsonar/lib/perfSONAR_PS/NPToolkit/WebService', strip => 1, - # file itself is part of perfsonar-toolkit-library - # which is installed as a dependency of perfsonar-toolkit - # therefore we use the latter as a dependency for the patch + # file itself is part of perfsonar-toolkit-library + # which is installed as a dependency of perfsonar-toolkit + # therefore we use the latter as a dependency for the patch + # need to remove perfsonar-toolkit due to dependency issues in 3.5.1, + # which means the dependency needs updating (to libperfsonar-toolkit-perl) deps => Package['perfsonar-toolkit'], checkfile => 'Auth.pm', # relative to path }, '02_perfsonar_webservice_pageauth.patch.3.5.0' => { - path => '/opt/perfsonar_ps/toolkit/web-ng/root', + path => '/usr/lib/perfsonar/web-ng/root', strip => 1, deps => Package['perfsonar-toolkit'], checkfile => 'index.cgi', # relative to path diff --git a/templates/configure_esmond.erb b/templates/configure_esmond.erb index 0c91657..74a831c 100644 --- a/templates/configure_esmond.erb +++ b/templates/configure_esmond.erb @@ -10,25 +10,25 @@ if [ -z "$(ls -A /var/lib/pgsql/data)" ]; then sudo -u postgres psql -c "CREATE USER <%= @dbuser %> WITH PASSWORD '<%= @dbpassword %>'" sudo -u postgres psql -c "CREATE DATABASE <%= @dbname %>" sudo -u postgres psql -c "GRANT ALL ON DATABASE <%= @dbname %> to <%= @dbuser %>" - cp -f /opt/perfsonar_ps/toolkit/etc/default_service_configs/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf + cp -f /etc/perfsonar/toolkit/default_service_configs/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf /sbin/service postgresql restart -# sed -i "s/sql_db_name = .*/sql_db_name = esmond/g" /opt/esmond/esmond.conf -# sed -i "s/sql_db_user = .*/sql_db_user = esmond/g" /opt/esmond/esmond.conf -# sed -i "s/sql_db_password = .*/sql_db_password = 7hc4m1/g" /opt/esmond/esmond.conf +# sed -i "s/sql_db_name = .*/sql_db_name = esmond/g" /etc/esmond/esmond.conf +# sed -i "s/sql_db_user = .*/sql_db_user = esmond/g" /etc/esmond/esmond.conf +# sed -i "s/sql_db_password = .*/sql_db_password = 7hc4m1/g" /etc/esmond/esmond.conf fi <% end -%> -#disable JMX in cassandra so will start even if /etc/sysconfig/network HOSTNAME does not resolve +#disable JMX in cassandra so it will start even if /etc/sysconfig/network HOSTNAME does not resolve sed -i '/^JVM_OPTS="\$JVM_OPTS -Dcom.sun.management.jmx/ s/^/#/' /etc/cassandra/conf/cassandra-env.sh #set esmond env variables -export ESMOND_ROOT=/opt/esmond -export ESMOND_CONF=$ESMOND_ROOT/esmond.conf +export ESMOND_ROOT=<%= @esmondroot %> +export ESMOND_CONF=<%= @esmondconf -%>/esmond.conf export DJANGO_SETTINGS_MODULE=esmond.settings #initialize python -cd /opt/esmond -source /opt/rh/python27/enable +cd $ESMOND_ROOT +. /opt/rh/python27/enable /opt/rh/python27/root/usr/bin/virtualenv --prompt="(esmond)" . . bin/activate