From b75605486ba41a4adf7e2aaef30e4777eff58027 Mon Sep 17 00:00:00 2001 From: Ulrich Schwickerath Date: Mon, 2 Sep 2013 10:36:29 +0200 Subject: [PATCH 01/14] re-sync with local version --- manifests/emi_wn.pp | 6 ++++++ manifests/install.pp | 18 ++++++++++++------ templates/glexec.conf.erb | 2 +- templates/gridenv-site.sh.erb | 24 ++++++++++++------------ templates/gridenv-vo.sh.erb | 6 +++--- templates/gridenvcsh.erb | 2 +- templates/lcmaps-glexec.db.erb | 2 +- templates/wninfo.erb | 2 +- 8 files changed, 37 insertions(+), 25 deletions(-) diff --git a/manifests/emi_wn.pp b/manifests/emi_wn.pp index d5e42ca..fa51804 100644 --- a/manifests/emi_wn.pp +++ b/manifests/emi_wn.pp @@ -19,6 +19,9 @@ 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, } + package {["gfal2-all","gfal2-plugin-rfio","gfal2-python","jclassads","lcg-info","lcg-infosites","voms-devel"]: + ensure => present, + } } 6: @@ -35,6 +38,9 @@ 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, } + package {["gfal2-all","gfal2-plugin-rfio","gfal2-python","jclassads","lcg-info","lcg-infosites","voms-devel"]: + ensure=>present, + } } default: diff --git a/manifests/install.pp b/manifests/install.pp index 948bfee..47991ff 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -1,5 +1,7 @@ class glexecwn::install { + include ('glexecwn::params') + # # install and configure the emi glexec enabled worker node # @@ -11,17 +13,22 @@ class {"emi_wn":} class {"emi_glexec_wn":} - exec {"glexecperms": - command => '/bin/chgrp glexec /usr/sbin/glexec ; /bin/chmod 06111 /usr/sbin/glexec' + # + file{'/usr/sbin/glexec': + ensure => file, + replace => false, + mode => '6111', + owner => 'root', + group => 'glexec', } - + # setup environment for glExec WN include ('glexecwn::env') include ('glexecwn::site-env') # configure VOs class {'vosupport': - supported_vos => $supported_vos, #prod.vo.eu-eela.eu: missing voms + supported_vos => $glexecwn::params::supported_vos, #prod.vo.eu-eela.eu: missing voms enable_mappings_for_service => 'ARGUS' } @@ -31,6 +38,5 @@ 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"] -> Class["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"] -> File["/usr/sbin/glexec"] -> File["/var/log/glexec"] -> Class["vosupport","glexecwn::env","glexecwn::site-env"] } diff --git a/templates/glexec.conf.erb b/templates/glexec.conf.erb index ccdf5ce..d6e2526 100644 --- a/templates/glexec.conf.erb +++ b/templates/glexec.conf.erb @@ -4,7 +4,7 @@ [glexec] silent_logging = no log_level = 3 -user_white_list = <%=user_white_list%> +user_white_list = <%=@user_white_list%> linger = yes user_identity_switch_by = glexec use_lcas = no diff --git a/templates/gridenv-site.sh.erb b/templates/gridenv-site.sh.erb index 06999d4..67630cf 100644 --- a/templates/gridenv-site.sh.erb +++ b/templates/gridenv-site.sh.erb @@ -1,13 +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%>" + 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%>" diff --git a/templates/gridenv-vo.sh.erb b/templates/gridenv-vo.sh.erb index 37ad60f..04bb7b9 100644 --- a/templates/gridenv-vo.sh.erb +++ b/templates/gridenv-vo.sh.erb @@ -1,4 +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%>" + # 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%>" diff --git a/templates/gridenvcsh.erb b/templates/gridenvcsh.erb index 6d22de2..8073886 100644 --- a/templates/gridenvcsh.erb +++ b/templates/gridenvcsh.erb @@ -11,6 +11,6 @@ # set mycshtmpfile=`mktemp /tmp/gridenv.XXXXXX` -bash -c "export ISCSHELL=yes ; source /usr/libexec/grid-env.sh" >> $mycshtmpfile +bash -c "export ISCSHELL=yes ; source /etc/profile.d/grid-env.sh" >> $mycshtmpfile source $mycshtmpfile rm -f $mycshtmpfile diff --git a/templates/lcmaps-glexec.db.erb b/templates/lcmaps-glexec.db.erb index 96f2230..5b3abf2 100644 --- a/templates/lcmaps-glexec.db.erb +++ b/templates/lcmaps-glexec.db.erb @@ -7,7 +7,7 @@ verify_proxy = "lcmaps_verify_proxy.mod" " --allow-limited-proxy" pepc = "lcmaps_c_pep.mod" - "--pep-daemon-endpoint-url https://<%=argus_server%>:<%=argus_port%>/authz" + "--pep-daemon-endpoint-url https://<%=@argus_server%>:<%=@argus_port%>/authz" " -resourceid http://authz-interop.org/xacml/resource/resource-type/wn" " -actionid http://glite.org/xacml/action/execute" " -capath /etc/grid-security/certificates/" diff --git a/templates/wninfo.erb b/templates/wninfo.erb index 6d9034e..0b78048 100644 --- a/templates/wninfo.erb +++ b/templates/wninfo.erb @@ -1,3 +1,3 @@ [static] -GlueSubClusterUniqueId=<%= fqdn %> +GlueSubClusterUniqueId=<%= @fqdn %> From 46d1391cb5a3900335e85777f2613c344df0190c Mon Sep 17 00:00:00 2001 From: Luke Kreczko Date: Tue, 1 Oct 2013 13:56:16 +0100 Subject: [PATCH 02/14] adding Eclipse project files and completing the module dependencies --- .project | 23 +++++++++++++++++++++++ Modulefile | 7 +++++-- metadata.json | 30 ++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 .project create mode 100644 metadata.json diff --git a/.project b/.project new file mode 100644 index 0000000..06a5afd --- /dev/null +++ b/.project @@ -0,0 +1,23 @@ + + + glexecwn + + + + + + org.cloudsmith.geppetto.pp.dsl.ui.modulefileBuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + + org.cloudsmith.geppetto.pp.dsl.ui.puppetNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/Modulefile b/Modulefile index 0888729..6fd2cd6 100644 --- a/Modulefile +++ b/Modulefile @@ -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' diff --git a/metadata.json b/metadata.json new file mode 100644 index 0000000..b5cd3d0 --- /dev/null +++ b/metadata.json @@ -0,0 +1,30 @@ +{ + "name": "cernops-glexecwn", + "version": "0.0.1", + "summary": "Glexec enabled Grid worker node for CERN", + "author": "schwicke", + "description": "This modules provides classes and definitions required for a glExec enabled worker node with Argus", + "dependencies": [ + { + "name": "puppetlabs/stdlib", + "version_requirement": "\u003e\u003d4.1.0" + }, + { + "name": "cernops/fetchcrl", + "version_requirement": "\u003e\u003d0.0.2" + }, + { + "name": "puppetlabs/concat", + "version_requirement": "\u003e\u003d1.0.0" + }, + { + "name": "cernops/vosupport", + "version_requirement": "\u003e\u003d0.0.1" + } + ], + "types": [], + "checksums": {}, + "source": "", + "project_page": "http://www.eu-emi.eu/", + "license": "Apache License, Version 2.0 (the \"License\")" +} \ No newline at end of file From f49e55900fc70dadf405acda04428ddfac150a5a Mon Sep 17 00:00:00 2001 From: Luke Kreczko Date: Tue, 1 Oct 2013 13:59:16 +0100 Subject: [PATCH 03/14] fixing Puppet style issues ("->', http://docs.puppetlabs.com/guides/style_guide.html#quoting and class name). --- manifests/argus.pp | 16 ++++++------- manifests/emi_wn.pp | 22 +++++++----------- manifests/env.pp | 15 ++++++------ manifests/install.pp | 32 +++++++++++--------------- manifests/params.pp | 4 ++-- manifests/{site-env.pp => site_env.pp} | 4 ++-- manifests/wninfo.pp | 16 ++++++------- 7 files changed, 48 insertions(+), 61 deletions(-) rename manifests/{site-env.pp => site_env.pp} (56%) diff --git a/manifests/argus.pp b/manifests/argus.pp index 592f742..a51d7f0 100644 --- a/manifests/argus.pp +++ b/manifests/argus.pp @@ -1,18 +1,18 @@ class glexecwn::argus inherits glexecwn::params { - file {"/etc/glexec.conf": + file {'/etc/glexec.conf': ensure => present, - content => template("glexecwn/glexec.conf.erb"), - owner => "root", - group => "glexec", + content => template('glexecwn/glexec.conf.erb'), + owner => 'root', + group => 'glexec', mode => 0640, } - file {"/etc/lcmaps/lcmaps-glexec.db": + file {'/etc/lcmaps/lcmaps-glexec.db': ensure => present, - content => template("glexecwn/lcmaps-glexec.db.erb"), - owner => "root", - group => "root", + content => template('glexecwn/lcmaps-glexec.db.erb'), + owner => 'root', + group => 'root', mode => 0640, } } diff --git a/manifests/emi_wn.pp b/manifests/emi_wn.pp index fa51804..d039ee0 100644 --- a/manifests/emi_wn.pp +++ b/manifests/emi_wn.pp @@ -7,40 +7,34 @@ 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"]: - ensure => present, - } - package {["gfal2-all","gfal2-plugin-rfio","gfal2-python","jclassads","lcg-info","lcg-infosites","voms-devel"]: + 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, } - package {["gfal2-all","gfal2-plugin-rfio","gfal2-python","jclassads","lcg-info","lcg-infosites","voms-devel"]: - ensure=>present, - } } default: diff --git a/manifests/env.pp b/manifests/env.pp index 6139fa0..98a4505 100644 --- a/manifests/env.pp +++ b/manifests/env.pp @@ -4,25 +4,24 @@ owner => 'root', group => 'root', mode => '0755', - warn => "# $gridenvfile is managed by Puppet env.pp.\n#Any changes in here will be overwritten", + 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": + file {'/etc/profile.d/grid-env.csh': ensure => present, - content => template("glexecwn/gridenvcsh.erb"), - owner => "root", - group => "root", + content => template('glexecwn/gridenvcsh.erb'), + owner => 'root', + group => 'root', mode => 0644, } } - diff --git a/manifests/install.pp b/manifests/install.pp index 47991ff..d4633c2 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -1,7 +1,5 @@ class glexecwn::install { - include ('glexecwn::params') - # # install and configure the emi glexec enabled worker node # @@ -10,33 +8,29 @@ } # install worker node software - class {"emi_wn":} - class {"emi_glexec_wn":} + class {'emi_wn':} + class {'emi_glexec_wn':} - # - file{'/usr/sbin/glexec': - ensure => file, - replace => false, - mode => '6111', - owner => 'root', - group => 'glexec', + 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') + include ('glexecwn::site_env') # configure VOs class {'vosupport': - supported_vos => $glexecwn::params::supported_vos, #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", + file {'/var/log/glexec': + ensure => 'directory', + owner => 'root', + group => 'root', } - Class["glexecwn::repositories"] -> Package["dummydpm"] -> Class["emi_wn","emi_glexec_wn"] -> File["/usr/sbin/glexec"] -> 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'] } diff --git a/manifests/params.pp b/manifests/params.pp index 67877fe..e82bc64 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -12,10 +12,10 @@ $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') + $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', + $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']) diff --git a/manifests/site-env.pp b/manifests/site_env.pp similarity index 56% rename from manifests/site-env.pp rename to manifests/site_env.pp index 68e98f5..14a486e 100644 --- a/manifests/site-env.pp +++ b/manifests/site_env.pp @@ -1,6 +1,6 @@ -class glexecwn::site-env inherits glexecwn::params +class glexecwn::site_env inherits glexecwn::params { - concat::fragment{"site-env global": + concat::fragment{'site-env global': target => $gridenvfile, order => '55', content => template('glexecwn/gridenv-site.sh.erb') diff --git a/manifests/wninfo.pp b/manifests/wninfo.pp index 0c31a82..678bdd9 100644 --- a/manifests/wninfo.pp +++ b/manifests/wninfo.pp @@ -1,17 +1,17 @@ class glexecwn::wninfo(){ - file {"/etc/glite-wn-info": + file {'/etc/glite-wn-info': ensure => directory, - owner => "root", - group => "root", + owner => 'root', + group => 'root', mode => 0755, } - file {"/etc/glite-wn-info/glite-wn-info.conf": + file {'/etc/glite-wn-info/glite-wn-info.conf': ensure => present, - content => template("glexecwn/wninfo.erb"), - owner => "root", - group => "root", + content => template('glexecwn/wninfo.erb'), + owner => 'root', + group => 'root', mode => 0644, - require => File["/etc/glite-wn-info"], + require => File['/etc/glite-wn-info'], } } From 09980975798ede3b01cf7e029ea9f652cc2b49f5 Mon Sep 17 00:00:00 2001 From: Luke Kreczko Date: Tue, 1 Oct 2013 14:01:00 +0100 Subject: [PATCH 04/14] replacing emirepos::emi2repositories with full repo definitions for now (emirepos not available outside cernops) --- manifests/params.pp | 1 + manifests/repositories.pp | 59 ++++++++++++++++++++++++++++++++------- 2 files changed, 50 insertions(+), 10 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index e82bc64..33e773b 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -18,5 +18,6 @@ $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']) + $emi_version = hiera('emi_version', 2) } diff --git a/manifests/repositories.pp b/manifests/repositories.pp index a30dd61..ef61088 100644 --- a/manifests/repositories.pp +++ b/manifests/repositories.pp @@ -1,20 +1,59 @@ -class glexecwn::repositories { - +class glexecwn::repositories ( + $emi_version = glexecwn::params::emi_version) { # - # ensure that we get everything from EMI and not mix with EPEL unless we need stuff from there + # ensure that we get everything from EMI and not mix with EPEL unless we need + # stuff from there # - - include "emirepos::emi2repositories" - + + # include 'emirepos::emi2repositories' + $major_release = regsubst($::operatingsystemrelease, '^(\d+)\.\d+$', '\1') + + yumrepo { "EMI_${emi_version}_base": + name => "emi-${emi_version}-base", + descr => 'EMI - $basearch - base', + baseurl => "http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/sl${major_release}/\$basearch/base", + gpgcheck => 1, + gpgkey => 'http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/RPM-GPG-KEY-emi', + enabled => 1, + priority => 40, + } + + yumrepo { "EMI_${emi_version}_contribs": + name => "emi-${emi_version}-contribs", + descr => 'EMI - $basearch - contribs', + baseurl => "http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/sl${major_release}/\$basearch/contribs", + gpgcheck => 1, + gpgkey => 'http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/RPM-GPG-KEY-emi', + enabled => 1, + priority => 40, + } + + yumrepo { "EMI_${emi_version}_third-party": + name => "emi-${emi_version}-third-party", + descr => 'EMI - $basearch - third-party', + baseurl => "http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/sl${major_release}/\$basearch/third-party", + gpgcheck => 1, + gpgkey => 'http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/RPM-GPG-KEY-emi', + enabled => 1, + priority => 40, + } + + yumrepo { "EMI_${emi_version}_updates": + name => "emi-${emi_version}-updates", + descr => 'EMI - $basearch - updates', + baseurl => "http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/sl${major_release}/\$basearch/updates", + gpgcheck => 1, + gpgkey => 'http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/RPM-GPG-KEY-emi', + enabled => 1, + priority => 40, + } + # # upgrade path conflicts # # conflict with voms-client3 - #package {voms-clients: + # package {voms-clients: # ensure => absent, #} - } - - From 6582d62aa29e14130b0c49a4cc71750f54d7ba69 Mon Sep 17 00:00:00 2001 From: Luke Kreczko Date: Tue, 1 Oct 2013 14:01:33 +0100 Subject: [PATCH 05/14] removing AFS dependency as it is not supported on most sites and not a dependency of glexec_wn --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index b2d9f59..af5192f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,7 +1,7 @@ class glexecwn inherits glexecwn::params { case $::operatingsystem { RedHat,SLC,SL: { - require afs,fetchcrl + require fetchcrl include ('glexecwn::repositories') include ('glexecwn::install') include ('glexecwn::argus') From a5a06448b8bbf21e09ce6a3a7b3ce2c76620970a Mon Sep 17 00:00:00 2001 From: Luke Kreczko Date: Tue, 1 Oct 2013 14:02:19 +0100 Subject: [PATCH 06/14] fixing error due to missing $supported_vos parameter (and not inheriting from glexecwn::params either) --- manifests/install.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/install.pp b/manifests/install.pp index d4633c2..f8470b5 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -1,4 +1,4 @@ -class glexecwn::install { +class glexecwn::install ($supported_vos = $glexecwn::params::supported_vos,) { # # install and configure the emi glexec enabled worker node From e9a0e4ed5cf24c47e16828ff78e115f9dd5a2b97 Mon Sep 17 00:00:00 2001 From: Luke Kreczko Date: Tue, 1 Oct 2013 14:05:39 +0100 Subject: [PATCH 07/14] These are several commits in one: 1) Add parameters to the necessary modules to make clear what is used in the sames. Now the module can be used with Foreman and scripts (as well as hiera) 2) Changing the structure slightly: a) removing site-env.pp (merged with env.pp) as they have same parameters b) adding config.pp and moving configuration (including dependencies) in there 3) Adding 'Scientific' to supported OS (the fact defaults to that on SL 6.4) 4) making dummydpm and vosupport (see cernops/puppet-vosupport/#1) optional 5) changing exec to change file permissions to file class (otherwise it runs every time!) --- manifests/argus.pp | 28 ++++++++-------- manifests/config.pp | 56 ++++++++++++++++++++++++++++++++ manifests/emi_glexec_wn.pp | 47 +++++++++++++-------------- manifests/env.pp | 53 +++++++++++++++++++++--------- manifests/init.pp | 66 ++++++++++++++++++++++++++++++++------ manifests/install.pp | 56 ++++++++++++++++---------------- manifests/params.pp | 2 +- manifests/site_env.pp | 8 ----- 8 files changed, 216 insertions(+), 100 deletions(-) create mode 100644 manifests/config.pp delete mode 100644 manifests/site_env.pp diff --git a/manifests/argus.pp b/manifests/argus.pp index a51d7f0..71dde1a 100644 --- a/manifests/argus.pp +++ b/manifests/argus.pp @@ -1,18 +1,20 @@ -class glexecwn::argus inherits glexecwn::params { - - file {'/etc/glexec.conf': - ensure => present, +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, + owner => 'root', + group => 'glexec', + mode => 0640, } - - file {'/etc/lcmaps/lcmaps-glexec.db': - ensure => present, + + file { '/etc/lcmaps/lcmaps-glexec.db': + ensure => present, content => template('glexecwn/lcmaps-glexec.db.erb'), - owner => 'root', - group => 'root', - mode => 0640, + owner => 'root', + group => 'root', + mode => 0640, } } diff --git a/manifests/config.pp b/manifests/config.pp new file mode 100644 index 0000000..b99d528 --- /dev/null +++ b/manifests/config.pp @@ -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'] + } +} diff --git a/manifests/emi_glexec_wn.pp b/manifests/emi_glexec_wn.pp index 60766c3..a307883 100644 --- a/manifests/emi_glexec_wn.pp +++ b/manifests/emi_glexec_wn.pp @@ -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, } } diff --git a/manifests/env.pp b/manifests/env.pp index 98a4505..bd20aac 100644 --- a/manifests/env.pp +++ b/manifests/env.pp @@ -1,27 +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, + + file { '/etc/profile.d/grid-env.csh': + ensure => present, content => template('glexecwn/gridenvcsh.erb'), - owner => 'root', - group => 'root', - mode => 0644, - } + owner => 'root', + group => 'root', + mode => 0644, + } + + # site-env + concat::fragment { 'site-env global': + target => $gridenvfile, + order => '55', + content => template('glexecwn/gridenv-site.sh.erb') + } } diff --git a/manifests/init.pp b/manifests/init.pp index af5192f..f1474c1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,15 +1,63 @@ -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, + $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, + $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: { + RedHat, SLC, SL, Scientific : { require fetchcrl - include ('glexecwn::repositories') - include ('glexecwn::install') - include ('glexecwn::argus') - include ('glexecwn::wninfo') + include('glexecwn::repositories') + + class { 'glexecwn::install': + emi_version => $emi_version, + install_dummydpm => $install_dummydpm, + supported_vos => $supported_vos, + } + + 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, + } + + class { 'glexecwn::argus': + argus_server => $argus_server, + argus_port => $argus_port, + user_white_list => $user_white_list, + } + include('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. } } } - diff --git a/manifests/install.pp b/manifests/install.pp index f8470b5..a4ac45b 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -1,36 +1,36 @@ -class glexecwn::install ($supported_vos = $glexecwn::params::supported_vos,) { - - # - # install and configure the emi glexec enabled worker node - # - package {dummydpm: - ensure => present, +# +# install the emi glexec enabled worker node +# +class glexecwn::install ( + $supported_vos = $glexecwn::params::supported_vos, + $install_dummydpm = $glexecwn::params::install_dummydpm, + $emi_version = $glexecwn::params::emi_version,) { + if $install_dummydpm == true { + package { dummydpm: 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' - } + # according to + # http://wiki.nikhef.nl/grid/GLExec_Argus_Quick_Installation_Guide + # emi_wn is not needed + # class { 'emi_wn': + # } - # setup environment for glExec WN - include ('glexecwn::env') - include ('glexecwn::site_env') + $glexec_wn_package = { + 2 => 'emi-glexec_wn', + 3 => 'glexec-wn', + } - # configure VOs - class {'vosupport': - supported_vos => $supported_vos, #prod.vo.eu-eela.eu: missing voms - enable_mappings_for_service => 'ARGUS' + class { 'emi_glexec_wn': + emi_glexec_wn => $glexec_wn_package[$emi_version] } - file {'/var/log/glexec': - ensure => 'directory', - owner => 'root', - group => 'root', + file { '/usr/sbin/glexec': + ensure => present, + group => 'glexec', + mode => '0611', } - -# 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'] + + Class['emi_glexec_wn'] -> File['/usr/sbin/glexec'] + } diff --git a/manifests/params.pp b/manifests/params.pp index 33e773b..9f30609 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -19,5 +19,5 @@ 'vo.opal.cern.ch', ilc, 'envirogrids.vo.eu-egee.org', geant4, na48, unosat, 'vo.gear.cern.ch', 'vo.sixt.cern.ch']) $emi_version = hiera('emi_version', 2) - + $install_dummydpm = hiera('install_dummydpm', true) } diff --git a/manifests/site_env.pp b/manifests/site_env.pp deleted file mode 100644 index 14a486e..0000000 --- a/manifests/site_env.pp +++ /dev/null @@ -1,8 +0,0 @@ -class glexecwn::site_env inherits glexecwn::params -{ - concat::fragment{'site-env global': - target => $gridenvfile, - order => '55', - content => template('glexecwn/gridenv-site.sh.erb') - } -} From 0f1f31864e06890000bd4e1e23bfdfd47cf76494 Mon Sep 17 00:00:00 2001 From: Luke Kreczko Date: Tue, 1 Oct 2013 14:07:25 +0100 Subject: [PATCH 08/14] Making emi_wn optional and params beatiful: a) making emi_wn an optional package as it tries to import 32 bit packages (replacing 64 bit ones) on our HTCondor WNs see fix: https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=LCG-ROLLOUT;9c44abbe.1310 b) formatting params and ordering alphabetically --- manifests/init.pp | 2 ++ manifests/install.pp | 11 +++++++- manifests/params.pp | 64 +++++++++++++++++++++++++++++++------------- 3 files changed, 57 insertions(+), 20 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index f1474c1..f69c19e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -11,6 +11,7 @@ $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, @@ -26,6 +27,7 @@ class { 'glexecwn::install': emi_version => $emi_version, install_dummydpm => $install_dummydpm, + install_emi_wn => $install_emi_wn, supported_vos => $supported_vos, } diff --git a/manifests/install.pp b/manifests/install.pp index a4ac45b..32ad89c 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -4,11 +4,16 @@ class glexecwn::install ( $supported_vos = $glexecwn::params::supported_vos, $install_dummydpm = $glexecwn::params::install_dummydpm, + $install_emi_wn = $glexecwn::params::install_emi_wn, $emi_version = $glexecwn::params::emi_version,) { if $install_dummydpm == true { package { dummydpm: ensure => present, } } + if $install_emi_wn == true { + class { 'emi_wn': } + } + # install worker node software # according to # http://wiki.nikhef.nl/grid/GLExec_Argus_Quick_Installation_Guide @@ -31,6 +36,10 @@ mode => '0611', } - Class['emi_glexec_wn'] -> File['/usr/sbin/glexec'] + if $install_emi_wn == true { + Class['emi_glexec_wn'] -> File['/usr/sbin/glexec'] + } else { + Class['emi_wn'] -> Class['emi_glexec_wn'] -> File['/usr/sbin/glexec'] + } } diff --git a/manifests/params.pp b/manifests/params.pp index 9f30609..4d73d6d 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,23 +1,49 @@ 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']) + $argus_server = hiera('argus_server', 'localhost') + $argus_port = hiera('argus_port', '8154') + $emi_version = hiera('emi_version', 2) + + $glexec_location = hiera('glexec_location', '/usr') + + $glite_env_set = hiera('glite_env_set', true) + $glite_location = hiera('glite_location', '/usr') + $glite_location_var = hiera('glite_location_var', '/var') + + $gridenvfile = hiera('gridenvfile', '/etc/profile.d/grid-env.sh') + $gridmapdir = hiera('gridmapdir', '/etc/grid-security/gridmapdir') + $grid_env_location = hiera('grid_env_location', '/usr/libexec') + + $gt_proxy_mode = hiera('gt_proxy_mode', 'old') + $install_dummydpm = hiera('install_dummydpm', true) + $install_emi_wn = hiera('install_emi_wn', true) + + $myproxy_server = hiera('myproxy_server', 'localhost') + + $lcg_gfal_infosys = hiera('lcg_gfal_infosys', 'unset') + $lcg_location = hiera('lcg_location', '/usr') + + $site_name = hiera('site_name', 'unset') + $srm_path = hiera('srm_path', '/opt/d-cache/srm') + $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']) + + $user_white_list = hiera('user_white_list', ' ') } From 6793b316f34a6aac8404bbd888086f0ec795769b Mon Sep 17 00:00:00 2001 From: Luke Kreczko Date: Tue, 1 Oct 2013 14:11:06 +0100 Subject: [PATCH 09/14] making the glexec binary permissions a parameter --- manifests/init.pp | 10 ++++++---- manifests/install.pp | 21 +++++++++------------ manifests/params.pp | 1 + 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index f69c19e..6193853 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -3,6 +3,7 @@ $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, @@ -25,10 +26,11 @@ include('glexecwn::repositories') class { 'glexecwn::install': - emi_version => $emi_version, - install_dummydpm => $install_dummydpm, - install_emi_wn => $install_emi_wn, - supported_vos => $supported_vos, + emi_version => $emi_version, + glexec_permissions => $glexec_permissions, + install_dummydpm => $install_dummydpm, + install_emi_wn => $install_emi_wn, + supported_vos => $supported_vos, } class { 'glexecwn::config': diff --git a/manifests/install.pp b/manifests/install.pp index 32ad89c..4eaaa30 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -2,24 +2,22 @@ # install the emi glexec enabled worker node # class glexecwn::install ( - $supported_vos = $glexecwn::params::supported_vos, - $install_dummydpm = $glexecwn::params::install_dummydpm, - $install_emi_wn = $glexecwn::params::install_emi_wn, - $emi_version = $glexecwn::params::emi_version,) { + $supported_vos = $glexecwn::params::supported_vos, + $install_dummydpm = $glexecwn::params::install_dummydpm, + $install_emi_wn = $glexecwn::params::install_emi_wn, + $glexec_permissions = $glexecwn::params::glexec_permissions, + $emi_version = $glexecwn::params::emi_version,) { if $install_dummydpm == true { package { dummydpm: ensure => present, } } - if $install_emi_wn == true { - class { 'emi_wn': } - } - # install worker node software # according to # http://wiki.nikhef.nl/grid/GLExec_Argus_Quick_Installation_Guide # emi_wn is not needed - # class { 'emi_wn': - # } + if $install_emi_wn == true { + class { 'emi_wn': } + } $glexec_wn_package = { 2 => 'emi-glexec_wn', @@ -33,7 +31,7 @@ file { '/usr/sbin/glexec': ensure => present, group => 'glexec', - mode => '0611', + mode => $glexec_permissions, } if $install_emi_wn == true { @@ -41,5 +39,4 @@ } else { Class['emi_wn'] -> Class['emi_glexec_wn'] -> File['/usr/sbin/glexec'] } - } diff --git a/manifests/params.pp b/manifests/params.pp index 4d73d6d..504b35e 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -5,6 +5,7 @@ $emi_version = hiera('emi_version', 2) $glexec_location = hiera('glexec_location', '/usr') + $glexec_permissions = hiera('glexec_permissions', '6111') $glite_env_set = hiera('glite_env_set', true) $glite_location = hiera('glite_location', '/usr') From 11a79f96934f5be5ab258ea29400cc770f1ec611 Mon Sep 17 00:00:00 2001 From: Luke Kreczko Date: Tue, 1 Oct 2013 14:17:35 +0100 Subject: [PATCH 10/14] Replacing 'include' with 'class' for local classes so parameters can be passed --- manifests/init.pp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 6193853..9b5138b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -23,7 +23,8 @@ case $::operatingsystem { RedHat, SLC, SL, Scientific : { require fetchcrl - include('glexecwn::repositories') + + class { 'glexecwn::repositories': emi_version => $emi_version, } class { 'glexecwn::install': emi_version => $emi_version, @@ -54,7 +55,9 @@ argus_port => $argus_port, user_white_list => $user_white_list, } - include('glexecwn::wninfo') + + class { 'glexecwn::wninfo': + } Class['glexecwn::repositories'] -> Class['glexecwn::install'] -> Class['glexecwn::config' ] From 178a1f9fb7341e77a5d43a3c94e6b12c452d8ff4 Mon Sep 17 00:00:00 2001 From: Luke Kreczko Date: Tue, 1 Oct 2013 15:40:38 +0100 Subject: [PATCH 11/14] cleaning up: removing 'supportedvos' parameter in install.pp as it was moved to config.pp --- manifests/init.pp | 2 +- manifests/install.pp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 9b5138b..0159a12 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -31,7 +31,6 @@ glexec_permissions => $glexec_permissions, install_dummydpm => $install_dummydpm, install_emi_wn => $install_emi_wn, - supported_vos => $supported_vos, } class { 'glexecwn::config': @@ -48,6 +47,7 @@ myproxy_server => $myproxy_server, site_name => $site_name, srm_path => $srm_path, + supported_vos => $supported_vos, } class { 'glexecwn::argus': diff --git a/manifests/install.pp b/manifests/install.pp index 4eaaa30..ee41b5a 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -2,7 +2,6 @@ # install the emi glexec enabled worker node # class glexecwn::install ( - $supported_vos = $glexecwn::params::supported_vos, $install_dummydpm = $glexecwn::params::install_dummydpm, $install_emi_wn = $glexecwn::params::install_emi_wn, $glexec_permissions = $glexecwn::params::glexec_permissions, From f537d539ceb4b946d5458fef1762f89854183c7c Mon Sep 17 00:00:00 2001 From: Luke Kreczko Date: Thu, 3 Oct 2013 13:39:44 +0100 Subject: [PATCH 12/14] enabling variable interpolation for gpgkey --- manifests/repositories.pp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifests/repositories.pp b/manifests/repositories.pp index ef61088..150d1f7 100644 --- a/manifests/repositories.pp +++ b/manifests/repositories.pp @@ -13,7 +13,7 @@ descr => 'EMI - $basearch - base', baseurl => "http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/sl${major_release}/\$basearch/base", gpgcheck => 1, - gpgkey => 'http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/RPM-GPG-KEY-emi', + gpgkey => "http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/RPM-GPG-KEY-emi", enabled => 1, priority => 40, } @@ -23,7 +23,7 @@ descr => 'EMI - $basearch - contribs', baseurl => "http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/sl${major_release}/\$basearch/contribs", gpgcheck => 1, - gpgkey => 'http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/RPM-GPG-KEY-emi', + gpgkey => "http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/RPM-GPG-KEY-emi", enabled => 1, priority => 40, } @@ -33,7 +33,7 @@ descr => 'EMI - $basearch - third-party', baseurl => "http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/sl${major_release}/\$basearch/third-party", gpgcheck => 1, - gpgkey => 'http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/RPM-GPG-KEY-emi', + gpgkey => "http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/RPM-GPG-KEY-emi", enabled => 1, priority => 40, } @@ -43,7 +43,7 @@ descr => 'EMI - $basearch - updates', baseurl => "http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/sl${major_release}/\$basearch/updates", gpgcheck => 1, - gpgkey => 'http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/RPM-GPG-KEY-emi', + gpgkey => "http://emisoft.web.cern.ch/emisoft/dist/EMI/${emi_version}/RPM-GPG-KEY-emi", enabled => 1, priority => 40, } From f6bf2b044fb4aba1e90a567f1753dc932c3d40b0 Mon Sep 17 00:00:00 2001 From: kreczko Date: Mon, 27 Oct 2014 14:31:03 +0000 Subject: [PATCH 13/14] updated eclipse project file --- .project | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.project b/.project index 06a5afd..f28ecd3 100644 --- a/.project +++ b/.project @@ -6,7 +6,7 @@ - org.cloudsmith.geppetto.pp.dsl.ui.modulefileBuilder + com.puppetlabs.geppetto.pp.dsl.ui.modulefileBuilder @@ -17,7 +17,7 @@ - org.cloudsmith.geppetto.pp.dsl.ui.puppetNature + com.puppetlabs.geppetto.pp.dsl.ui.puppetNature org.eclipse.xtext.ui.shared.xtextNature From 4303d5359b75bbc15af1040bfdda58f1425169ca Mon Sep 17 00:00:00 2001 From: kreczko Date: Mon, 27 Oct 2014 14:31:27 +0000 Subject: [PATCH 14/14] changed logging from syslog to explicit file --- templates/glexec.conf.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/glexec.conf.erb b/templates/glexec.conf.erb index d6e2526..7ec2866 100644 --- a/templates/glexec.conf.erb +++ b/templates/glexec.conf.erb @@ -20,4 +20,4 @@ lcas_log_file = /var/log/glexec/lcas_lcmaps.log lcas_debug_level = 1 lcas_log_level = 1 preserve_env_variables = no -log_destination = syslog +log_destination = file