Skip to content

Commit

Permalink
synchronise with local version
Browse files Browse the repository at this point in the history
  • Loading branch information
schwicke committed Apr 17, 2013
1 parent 679fe03 commit 5d481f5
Show file tree
Hide file tree
Showing 20 changed files with 291 additions and 28 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
2012-12-10 Ulrich Schwickerath <ulrich.schwickerath at cern.ch>

* First Release
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright 1990-2012 CERN and Members of the EGEE Collaboration

This work has been partially funded by the EU Commission (contract
INFSO-RI-222667) under the EGEE-III collaboration.
See http://www.eu-egee.org/partners/ for details on the copyright holders.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the
License.

8 changes: 8 additions & 0 deletions Modulefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name 'glexecwn'
version '0.0.1'
author 'schwicke'
license 'Apache License, Version 2.0 (the "License")'
summary 'Glexec enabled Grid worker node for CERN'
description 'This modules provides classes and definitions required for a glExec enabled worker node with Argus'
project_page 'http://www.eu-emi.eu/'
dependency 'puppetlabs/stdlib'
1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

4 changes: 0 additions & 4 deletions README.md

This file was deleted.

27 changes: 27 additions & 0 deletions manifests/emi_glexec_wn.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
class glexecwn::emi_glexec_wn {

#lcas-plugins-basic
#emi-version
#mkgltempdir
#lcmaps-plugins-tracking-groupid
#lcmaps-plugins-basic
#yaim-glexec-wn
#lcmaps-plugins-verify-proxy
#nagios-plugins-emi.glexec
#lcmaps-plugins-c-pep
#lcmaps-plugins-voms
#glexec
#glexec-wrapper-scripts
#lcas-plugins-check-executable
#lcas
#edg-mkgridmap
#lcmaps
#lcas-plugins-voms
#rpmlib(PayloadFilesHavePrefix) <= 4.0-1
#rpmlib(CompressedFileNames) <= 3.0.4-1


package {emi-glexec_wn:
ensure => present,
}
}
56 changes: 56 additions & 0 deletions manifests/emi_wn.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
class glexecwn::emi_wn {

#
# in the CERN case we have merged the UI and the WN setup therefore some packages are already defined at this point.
#
if $::cern_network_domain {
case $::operatingsystemmajorrelease {
5:
{
package {["a1_grid_env","c-ares","cleanup-grid-accounts","dcache-srmclient","emi.amga.amga-cli","emi.saga-adapter.context-cpp","emi.saga-adapter.isn-cpp","emi.saga-adapter.sd-cpp"]:
ensure => present,
}
package {["dcap","dcap-devel","dcap-libs","dcap-tunnel-gsi","dcap-tunnel-krb","dcap-tunnel-ssl","dcap-tunnel-telnet"]:
ensure => present,
}
package {["dpm-libs","dpm-devel","dpm-perl","dpm-python","dpm-python26"]:
ensure => present,
}
package {["glite-jobid-api-c","glite-lb-client","glite-lb-common","glite-lb-client-progs","glite-lbjp-common-gss","glite-lbjp-common-trio","glite-service-discovery-api-c","glite-wms-brokerinfo-access","glite-wn-info","glite-yaim-clients","glite-yaim-core","lcg-ManageVOTag","lcg-tags","lcg-util-python26","lfc-devel","lfc-python26","openldap-clients","python-ldap"]:
ensure => present,
}
}

6:
{
package {["a1_grid_env","c-ares","cleanup-grid-accounts","dcache-srmclient","emi.amga.amga-cli","emi.saga-adapter.context-cpp","emi.saga-adapter.isn-cpp","emi.saga-adapter.sd-cpp"]:
ensure => present,
}
package {["dcap","dcap-devel","dcap-libs","dcap-tunnel-gsi","dcap-tunnel-krb","dcap-tunnel-ssl","dcap-tunnel-telnet"]:
ensure => present,
}
package {["dpm-libs","dpm-devel","dpm-perl","dpm-python"]:
ensure => present,
}
package {["glite-jobid-api-c","glite-lb-client","glite-lb-common","glite-lb-client-progs","glite-lbjp-common-gss","glite-lbjp-common-trio","glite-service-discovery-api-c","glite-wms-brokerinfo-access","glite-wn-info","glite-yaim-clients","glite-yaim-core","lcg-ManageVOTag","lcg-tags","lfc-devel","openldap-clients","python-ldap"]:
ensure => present,
}
}

default:
{
package {emi-wn:
ensure => present,
}
}
}
} else {

#
# for all other cases we follow the standart procedures
#
package {emi-wn:
ensure => present,
}
}
}
28 changes: 28 additions & 0 deletions manifests/env.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
class glexecwn::env inherits glexecwn::params {

concat{$gridenvfile:
owner => 'root',
group => 'root',
mode => '0755',
warn => "# $gridenvfile is managed by Puppet env.pp.\n#Any changes in here will be overwritten",
}
concat::fragment{"grid-env header":
target => $gridenvfile,
order => '01',
content => template('glexecwn/gridenvsh_header.erb')
}
concat::fragment{"grid-env footer":
target => $gridenvfile,
order => '99',
content => template('glexecwn/gridenvsh_footer.erb')
}

file {"/etc/profile.d/grid-env.csh":
ensure => present,
content => template("glexecwn/gridenvcsh.erb"),
owner => "root",
group => "root",
mode => 0644,
}
}

40 changes: 16 additions & 24 deletions manifests/install.pp
Original file line number Diff line number Diff line change
@@ -1,44 +1,36 @@
class glexecwn::install {
notice('installing glExec WN')
#if ($operatingsystemmajorrelease == 5){
# package {xerces-c:
# ensure => '2.7.0-8',
# require => Exec ['downgrade-xerces-c'],
# }
# exec {'downgrade-xerces-c':
# command => 'yum -y downgrade xerces-c-2.7.0-8',
# path => ['/sbin', '/bin', '/usr/sbin', '/usr/bin'],
# unless => 'rpm -qa | grep xerces-c-2.7.0-8',
# }
#}

#
# install and configure the emi glexec enabled worker node
#
package {dummydpm:
ensure => present,
}
package {emi-wn:
ensure => present,
}
package {emi-glexec_wn:
ensure => present,
}

# install worker node software
class {"emi_wn":}
class {"emi_glexec_wn":}

exec {"glexecperms":
command => '/bin/chgrp glexec /usr/sbin/glexec ; /bin/chmod 06111 /usr/sbin/glexec'
}

# setup environment for glExec WN
include ('glexecwn::env')
include ('glexecwn::site-env')

notice('configuring VOs')
#CHANGED BY ALOSSENT 20130322 DUE TO REFACTORING VOSUPPORT MODULE
# configure VOs
class {'vosupport':
supported_vos => [atlas, cms, lhcb, alice, dteam, ops, 'vo.aleph.cern.ch', 'vo.delphi.cern.ch', 'vo.l3.cern.ch',
'vo.opal.cern.ch', ilc, 'envirogrids.vo.eu-egee.org', geant4, na48, unosat, 'vo.gear.cern.ch',
'vo.sixt.cern.ch'], #prod.vo.eu-eela.eu: missing voms
supported_vos => $supported_vos, #prod.vo.eu-eela.eu: missing voms
enable_mappings_for_service => 'ARGUS'
}

file {"/var/log/glexec":
ensure => "directory",
owner => "root",
group => "root",
}
Class["glexecwn::repositories"]->Package["dummydpm","emi-wn","emi-glexec_wn"] -> Exec["glexecperms"] -> File["/var/log/glexec"] -> Class["vosupport","glexecwn::env","glexecwn::site-env"]

# Class["glexecwn::repositories"]->Package["dummydpm","emi-wn","emi-glexec_wn"] -> Exec["glexecperms"] -> File["/var/log/glexec"] -> Class["vosupport","glexecwn::env","glexecwn::site-env"]
Class["glexecwn::repositories"] -> Package["dummydpm"] -> Class["emi_wn","emi_glexec_wn"] -> Exec["glexecperms"] -> File["/var/log/glexec"] -> Class["vosupport","glexecwn::env","glexecwn::site-env"]
}
22 changes: 22 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
class glexecwn::params {
$user_white_list = hiera('user_white_list',' ')
$argus_server = hiera('argus_server','localhost')
$argus_port = hiera('argus_port','8154')
$srm_path = hiera('srm_path','/opt/d-cache/srm')
$site_name = hiera('site_name','unset')
$myproxy_server = hiera('myproxy_server','localhost')
$lcg_location = hiera('lcg_location','/usr')
$lcg_gfal_infosys = hiera('lcg_gfal_infosys','unset')
$gt_proxy_mode = hiera('gt_proxy_mode','old')
$grid_env_location = hiera('grid_env_location','/usr/libexec')
$gridmapdir = hiera('gridmapdir','/etc/grid-security/gridmapdir')
$glite_location_var = hiera('glite_location_var','/var')
$glite_location = hiera('glite_location','/usr')
$glite_env_set = hiera('glite_env_set','true')
$glexec_location = hiera('glexec_location','/usr')
$gridenvfile = hiera('gridenvfile','/etc/profile.d/grid-env.sh')
$supported_vos = hiera("supported_vos",[atlas, cms, lhcb, alice, dteam, ops, 'vo.aleph.cern.ch', 'vo.delphi.cern.ch', 'vo.l3.cern.ch',
'vo.opal.cern.ch', ilc, 'envirogrids.vo.eu-egee.org', geant4, na48, unosat, 'vo.gear.cern.ch',
'vo.sixt.cern.ch'])

}
8 changes: 8 additions & 0 deletions manifests/site-env.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class glexecwn::site-env inherits glexecwn::params
{
concat::fragment{"site-env global":
target => $gridenvfile,
order => '55',
content => template('glexecwn/gridenv-site.sh.erb')
}
}
17 changes: 17 additions & 0 deletions manifests/wninfo.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class glexecwn::wninfo(){
file {"/etc/glite-wn-info":
ensure => directory,
owner => "root",
group => "root",
mode => 0755,
}

file {"/etc/glite-wn-info/glite-wn-info.conf":
ensure => present,
content => template("glexecwn/wninfo.erb"),
owner => "root",
group => "root",
mode => 0644,
require => File["/etc/glite-wn-info"],
}
}
17 changes: 17 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
dir = File.expand_path(File.dirname(__FILE__))
$LOAD_PATH.unshift File.join(dir, 'lib')

require 'mocha'
require 'puppet'
require 'rspec'
require 'spec/autorun'

Spec::Runner.configure do |config|
config.mock_with :mocha
end

# We need this because the RAL uses 'should' as a method. This
# allows us the same behaviour but with a different method name.
class Object
alias :must :should
end
23 changes: 23 additions & 0 deletions templates/glexec.conf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# Glexec configuration file
#
[glexec]
silent_logging = no
log_level = 3
user_white_list = <%=user_white_list%>
linger = yes
user_identity_switch_by = glexec
use_lcas = no
lcmaps_db_file = /etc/lcmaps/lcmaps-glexec.db
lcmaps_log_file = /var/log/glexec/lcas_lcmaps.log
lcmaps_debug_level = 1
lcmaps_log_level = 1
lcmaps_get_account_policy = glexec_get_account
lcmaps_verify_account_policy = glexec_verify_account

lcas_db_file = /etc/lcas/lcas-glexec.db
lcas_log_file = /var/log/glexec/lcas_lcmaps.log
lcas_debug_level = 1
lcas_log_level = 1
preserve_env_variables = no
log_destination = syslog
13 changes: 13 additions & 0 deletions templates/gridenv-site.sh.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# set site parameters.
gridenv_set "SRM_PATH" "<%=srm_path%>"
gridenv_set "SITE_NAME" "<%=site_name%>"
gridenv_set "MYPROXY_SERVER" "<%=myproxy_server%>"
gridenv_set "LCG_LOCATION" "<%=lcg_location%>"
gridenv_set "LCG_GFAL_INFOSYS" "<%=lcg_gfal_infosys%>"
gridenv_set "GT_PROXY_MODE" "<%=gt_proxy_mode%>"
gridenv_set "GRID_ENV_LOCATION" "<%=grid_env_location%>"
gridenv_set "GRIDMAPDIR" "<%=gridmapdir%>"
gridenv_set "GLITE_LOCATION_VAR" "<%=glite_location_var%>"
gridenv_set "GLITE_LOCATION" "<%=glite_location%>"
gridenv_set "GLITE_ENV_SET" "<%=glite_env_set%>"
gridenv_set "GLEXEC_LOCATION" "<%=glexec_location%>"
4 changes: 4 additions & 0 deletions templates/gridenv-vo.sh.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

# specific settings for <%=voname%>
gridenv_set "VO_<%=voname.upcase.gsub('.','_')%>_DIR" "<%=vo_sw_dir%>"
gridenv_set "VO_<%=voname.upcase.gsub('.','_')%>_DEFAULT_SE" "<%=vo_default_se%>"
16 changes: 16 additions & 0 deletions templates/gridenvcsh.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# This is the file which manipulates the grid environment for tcsh shell.
#
# - It saves the exported environment variables to a file,
# - perform the manipulations in bash, using the bash functions
# - then it sources the resulted set of environment variables.
#
# To see what is going on exactly, how te environment variables are affected
# have a look to the grid-env.sh file !
#
#

set mycshtmpfile=`mktemp /tmp/gridenv.XXXXXX`
bash -c "export ISCSHELL=yes ; source /usr/libexec/grid-env.sh" >> $mycshtmpfile
source $mycshtmpfile
rm -f $mycshtmpfile
2 changes: 2 additions & 0 deletions templates/gridenvsh_footer.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
. /usr/libexec/clean-grid-env-funcs.sh
fi
8 changes: 8 additions & 0 deletions templates/gridenvsh_header.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
if [ "X${GLITE_ENV_SET+X}" = "X" ]; then
. /usr/libexec/grid-env-funcs.sh
if [ "x${GLITE_UI_ARCH:-$1}" = "x32BIT" ]; then arch_dir=lib; else arch_dir=lib64; fi
gridpath_prepend "PATH" "/opt/d-cache/srm/bin:/opt/d-cache/dcap/bin"
gridpath_prepend "PATH" "/bin"
gridpath_prepend "MANPATH" "/opt/glite/share/man"
gridpath_prepend "LD_LIBRARY_PATH" "/opt/d-cache/dcap/lib64"
gridpath_prepend "LD_LIBRARY_PATH" "/opt/d-cache/dcap/lib"
3 changes: 3 additions & 0 deletions templates/wninfo.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[static]
GlueSubClusterUniqueId=<%= fqdn %>

0 comments on commit 5d481f5

Please sign in to comment.