Skip to content

Commit

Permalink
Merge pull request #2 from kreczko/updates
Browse files Browse the repository at this point in the history
Updates
  • Loading branch information
kreczko committed Oct 27, 2014
2 parents 5d481f5 + 4303d53 commit 6b4f6a7
Show file tree
Hide file tree
Showing 20 changed files with 421 additions and 171 deletions.
23 changes: 23 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>glexecwn</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.puppetlabs.geppetto.pp.dsl.ui.modulefileBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.puppetlabs.geppetto.pp.dsl.ui.puppetNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
7 changes: 5 additions & 2 deletions Modulefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name 'glexecwn'
name 'cernops-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'
dependency 'puppetlabs-stdlib', '>=4.1.0'
dependency 'cernops-fetchcrl', '>=0.0.2'
dependency 'puppetlabs-concat', '>=1.0.0'
dependency 'cernops-vosupport', '>=0.0.1'
32 changes: 17 additions & 15 deletions manifests/argus.pp
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
class glexecwn::argus inherits glexecwn::params {

file {"/etc/glexec.conf":
ensure => present,
content => template("glexecwn/glexec.conf.erb"),
owner => "root",
group => "glexec",
mode => 0640,
class glexecwn::argus (
$argus_server = $glexecwn::params::argus_server,
$argus_port = $glexecwn::params::argus_port,
$user_white_list = $glexecwn::params::user_white_list) {
file { '/etc/glexec.conf':
ensure => present,
content => template('glexecwn/glexec.conf.erb'),
owner => 'root',
group => 'glexec',
mode => 0640,
}
file {"/etc/lcmaps/lcmaps-glexec.db":
ensure => present,
content => template("glexecwn/lcmaps-glexec.db.erb"),
owner => "root",
group => "root",
mode => 0640,

file { '/etc/lcmaps/lcmaps-glexec.db':
ensure => present,
content => template('glexecwn/lcmaps-glexec.db.erb'),
owner => 'root',
group => 'root',
mode => 0640,
}
}
56 changes: 56 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#
# configure the emi glexec enabled worker node
#
class glexecwn::config (
$glexec_location = $glexecwn::params::glexec_location,
$glite_env_set = $glexecwn::params::glite_env_set,
$glite_location = $glexecwn::params::glite_location,
$glite_location_var = $glexecwn::params::glite_location_var,
$gridenvfile = $glexecwn::params::gridenvfile,
$gridmapdir = $glexecwn::params::gridmapdir,
$grid_env_location = $glexecwn::params::grid_env_location,
$gt_proxy_mode = $glexecwn::params::gt_proxy_mode,
$myproxy_server = $glexecwn::params::myproxy_server,
$lcg_gfal_infosys = $glexecwn::params::lcg_gfal_infosys,
$lcg_location = $glexecwn::params::lcg_location,
$site_name = $glexecwn::params::site_name,
$srm_path = $glexecwn::params::srm_path,
$supported_vos = $glexecwn::params::supported_vos,) {
# setup environment for glExec WN
class { 'glexecwn::env':
glexec_location => $glexec_location,
glite_env_set => $glite_env_set,
glite_location => $glite_location,
glite_location_var => $glite_location_var,
gridenvfile => $gridenvfile,
gridmapdir => $gridmapdir,
grid_env_location => $grid_env_location,
gt_proxy_mode => $gt_proxy_mode,
myproxy_server => $myproxy_server,
lcg_gfal_infosys => $lcg_gfal_infosys,
lcg_location => $lcg_location,
site_name => $site_name,
srm_path => $srm_path,
}

# configure VOs
if empty($supported_vos) == false {
class { 'vosupport':
# prod.vo.eu-eela.eu: missing voms
supported_vos => $supported_vos,
enable_mappings_for_service => 'ARGUS'
}
}

file { '/var/log/glexec':
ensure => 'directory',
owner => 'root',
group => 'root',
}

if empty($supported_vos) == false {
File['/var/log/glexec'] -> Class['vosupport'] -> Class['glexecwn::env']
} else {
File['/var/log/glexec'] -> Class['glexecwn::env']
}
}
47 changes: 22 additions & 25 deletions manifests/emi_glexec_wn.pp
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
class glexecwn::emi_glexec_wn {
class glexecwn::emi_glexec_wn (
$emi_glexec_wn = '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

#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,
}
package { $emi_glexec_wn: ensure => present, }
}
16 changes: 8 additions & 8 deletions manifests/emi_wn.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,32 @@
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"]:
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"]:
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"]:
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"]:
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"]:
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"]:
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"]:
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"]:
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,
}
}
Expand Down
56 changes: 38 additions & 18 deletions manifests/env.pp
Original file line number Diff line number Diff line change
@@ -1,28 +1,48 @@
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",
class glexecwn::env (
$gridenvfile = $glexecwn::params::gridenvfile,
$srm_path = $glexecwn::params::srm_path,
$site_name = $glexecwn::params::site_name,
$myproxy_server = $glexecwn::params::myproxy_server,
$lcg_gfal_infosys = $glexecwn::params::lcg_gfal_infosys,
$lcg_location = $glexecwn::params::lcg_location,
$gt_proxy_mode = $glexecwn::params::gt_proxy_mode,
$grid_env_location = $glexecwn::params::grid_env_location,
$gridmapdir = $glexecwn::params::gridmapdir,
$glite_location = $glexecwn::params::glite_location,
$glite_location_var = $glexecwn::params::glite_location_var,
$glite_env_set = $glexecwn::params::glite_env_set,
$glexec_location = $glexecwn::params::glexec_location,) {
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":

concat::fragment { 'grid-env header':
target => $gridenvfile,
order => '01',
content => template('glexecwn/gridenvsh_header.erb')
}
concat::fragment{"grid-env footer":

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,
}

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

# site-env
concat::fragment { 'site-env global':
target => $gridenvfile,
order => '55',
content => template('glexecwn/gridenv-site.sh.erb')
}
}

75 changes: 65 additions & 10 deletions manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,15 +1,70 @@
class glexecwn inherits glexecwn::params {
class glexecwn (
$argus_port = $glexecwn::params::argus_port,
$argus_server = $glexecwn::params::argus_server,
$emi_version = $glexecwn::params::emi_version,
$glexec_location = $glexecwn::params::glexec_location,
$glexec_permissions = $glexecwn::params::glexec_permissions,
$glite_env_set = $glexecwn::params::glite_env_set,
$glite_location = $glexecwn::params::glite_location,
$glite_location_var = $glexecwn::params::glite_location_var,
$gridenvfile = $glexecwn::params::gridenvfile,
$gridmapdir = $glexecwn::params::gridmapdir,
$grid_env_location = $glexecwn::params::grid_env_location,
$gt_proxy_mode = $glexecwn::params::gt_proxy_mode,
$install_dummydpm = $glexecwn::params::install_dummydpm,
$install_emi_wn = $glexecwn::params::install_emi_wn,
$myproxy_server = $glexecwn::params::myproxy_server,
$lcg_gfal_infosys = $glexecwn::params::lcg_gfal_infosys,
$lcg_location = $glexecwn::params::lcg_location,
$site_name = $glexecwn::params::site_name,
$srm_path = $glexecwn::params::srm_path,
$supported_vos = $glexecwn::params::supported_vos,
$user_white_list = $glexecwn::params::user_white_list,) {
case $::operatingsystem {
RedHat,SLC,SL: {
require afs,fetchcrl
include ('glexecwn::repositories')
include ('glexecwn::install')
include ('glexecwn::argus')
include ('glexecwn::wninfo')
RedHat, SLC, SL, Scientific : {
require fetchcrl

class { 'glexecwn::repositories': emi_version => $emi_version, }

class { 'glexecwn::install':
emi_version => $emi_version,
glexec_permissions => $glexec_permissions,
install_dummydpm => $install_dummydpm,
install_emi_wn => $install_emi_wn,
}

class { 'glexecwn::config':
gridenvfile => $gridenvfile,
gridmapdir => $gridmapdir,
grid_env_location => $grid_env_location,
glite_env_set => $glite_env_set,
glite_location => $glite_location,
glite_location_var => $glite_location_var,
glexec_location => $glexec_location,
gt_proxy_mode => $gt_proxy_mode,
lcg_gfal_infosys => $lcg_gfal_infosys,
lcg_location => $lcg_location,
myproxy_server => $myproxy_server,
site_name => $site_name,
srm_path => $srm_path,
supported_vos => $supported_vos,
}

class { 'glexecwn::argus':
argus_server => $argus_server,
argus_port => $argus_port,
user_white_list => $user_white_list,
}

class { 'glexecwn::wninfo':
}

Class['glexecwn::repositories'] -> Class['glexecwn::install'] -> Class['glexecwn::config'
]
}
default: {
# There is some fedora configuration present but I can't actually get it to work.
default : {
# There is some fedora configuration present but I can't actually get it
# to work.
}
}
}

Loading

0 comments on commit 6b4f6a7

Please sign in to comment.