Skip to content

Commit

Permalink
Merge pull request #6 from rwf14f/ps-update-fixes
Browse files Browse the repository at this point in the history
PS Update Fixes
  • Loading branch information
rwf14f committed Apr 6, 2016
2 parents d088f61 + 9cc68d8 commit a52eeb6
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 33 deletions.
6 changes: 3 additions & 3 deletions manifests/esmond.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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': }
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion manifests/mesh_config/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
}
19 changes: 5 additions & 14 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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',
Expand Down
14 changes: 8 additions & 6 deletions manifests/patches.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions templates/configure_esmond.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a52eeb6

Please sign in to comment.