From 0b00dfecc32cd60694103e904cf8117a65e0e56f Mon Sep 17 00:00:00 2001 From: Michel Jouvin Date: Thu, 7 Nov 2024 13:53:39 +0100 Subject: [PATCH] Update grid-related examples - Use umd-4 rather than umd-3 - Use EL7 as the OS - Remove obsolete machine type (LFC, WMS) - Remove obsolete features --- clusters/grid/umd3/cluster.build.properties | 2 - .../grid/umd3/profiles/cream.example.org.pan | 18 ------ .../grid/umd3/profiles/lfc.example.org.pan | 16 ------ .../grid/umd3/profiles/wmslb.example.org.pan | 19 ------- clusters/grid/umd3/repository/config.pan | 55 ------------------- clusters/grid/umd4/cluster.build.properties | 2 + .../profiles/apel.example.org.tpl.disabled | 0 .../profiles/argus.example.org.pan | 0 .../profiles/bdii.example.org.pan | 0 ...nagios3-server.example.org.tpl.NOT_WORKING | 0 .../profiles/px.example.org.tpl.disabled | 0 .../profiles/se-dpm-disk.example.org.pan | 2 - .../profiles/se-dpm-disk2.example.org.pan | 2 - .../profiles/se-dpm-server.example.org.pan | 15 +++-- .../profiles/topbdii.example.org.pan | 0 .../profiles/ui.example.org.pan | 0 .../profiles/wn.example.org.pan | 0 .../profiles/wn2.example.org.pan | 0 .../profiles/wn3.example.org.pan | 0 clusters/grid/umd4/repository/config.pan | 45 +++++++++++++++ .../grid/{umd3 => umd4}/site/cluster_info.pan | 4 +- .../site/wn-cloning-cluster-config.pan | 0 clusters/misc/nagios/repository/config.pan | 44 +++++---------- .../openstack/icehouse/repository/config.pan | 30 ++++------ .../site/config/example_nodes_properties.pan | 21 ------- .../example/site/config/nodes_properties.pan | 18 ------ sites/example/site/glite/dpm_config.pan | 51 +++++++++-------- sites/example/site/global_variables.pan | 4 +- sites/example/site/os/errata-defaults.pan | 20 ------- sites/example/site/os/version_db.pan | 42 +++++++------- sites/example/site/wn-cloning-config.pan | 17 ------ sites/example/vo/site/cms.pan | 13 +++-- 32 files changed, 139 insertions(+), 301 deletions(-) delete mode 100644 clusters/grid/umd3/cluster.build.properties delete mode 100644 clusters/grid/umd3/profiles/cream.example.org.pan delete mode 100644 clusters/grid/umd3/profiles/lfc.example.org.pan delete mode 100644 clusters/grid/umd3/profiles/wmslb.example.org.pan delete mode 100644 clusters/grid/umd3/repository/config.pan create mode 100644 clusters/grid/umd4/cluster.build.properties rename clusters/grid/{umd3 => umd4}/profiles/apel.example.org.tpl.disabled (100%) rename clusters/grid/{umd3 => umd4}/profiles/argus.example.org.pan (100%) rename clusters/grid/{umd3 => umd4}/profiles/bdii.example.org.pan (100%) rename clusters/grid/{umd3 => umd4}/profiles/nagios3-server.example.org.tpl.NOT_WORKING (100%) rename clusters/grid/{umd3 => umd4}/profiles/px.example.org.tpl.disabled (100%) rename clusters/grid/{umd3 => umd4}/profiles/se-dpm-disk.example.org.pan (99%) rename clusters/grid/{umd3 => umd4}/profiles/se-dpm-disk2.example.org.pan (99%) rename clusters/grid/{umd3 => umd4}/profiles/se-dpm-server.example.org.pan (71%) rename clusters/grid/{umd3 => umd4}/profiles/topbdii.example.org.pan (100%) rename clusters/grid/{umd3 => umd4}/profiles/ui.example.org.pan (100%) rename clusters/grid/{umd3 => umd4}/profiles/wn.example.org.pan (100%) rename clusters/grid/{umd3 => umd4}/profiles/wn2.example.org.pan (100%) rename clusters/grid/{umd3 => umd4}/profiles/wn3.example.org.pan (100%) create mode 100644 clusters/grid/umd4/repository/config.pan rename clusters/grid/{umd3 => umd4}/site/cluster_info.pan (91%) rename clusters/grid/{umd3 => umd4}/site/wn-cloning-cluster-config.pan (100%) delete mode 100644 sites/example/site/config/example_nodes_properties.pan delete mode 100644 sites/example/site/config/nodes_properties.pan delete mode 100644 sites/example/site/os/errata-defaults.pan delete mode 100644 sites/example/site/wn-cloning-config.pan diff --git a/clusters/grid/umd3/cluster.build.properties b/clusters/grid/umd3/cluster.build.properties deleted file mode 100644 index 88f099a..0000000 --- a/clusters/grid/umd3/cluster.build.properties +++ /dev/null @@ -1,2 +0,0 @@ -cluster.pan.includes=sites/example grid/umd-3 os quattor/23.9.0-rc1 standard -cluster.pan.dep.ignore="" diff --git a/clusters/grid/umd3/profiles/cream.example.org.pan b/clusters/grid/umd3/profiles/cream.example.org.pan deleted file mode 100644 index c83d04a..0000000 --- a/clusters/grid/umd3/profiles/cream.example.org.pan +++ /dev/null @@ -1,18 +0,0 @@ -object template cream.example.org; - -include 'pan/units'; -variable DISK_GLITE_SCRATCH_SIZE ?= -1; -variable DISK_GLITE_SCRATCH_LOGVOL = 'sandboxes'; -# Be sure to reflect mount point in CREAM_SANDBOX_DIRS in gLite parameters -variable DISK_GLITE_SCRATCH_MOUNTPOINT = '/sandboxes'; -variable DISK_GLITE_VAR_SIZE ?= 20*GB; - -variable CREAM_MYSQL_ADMINPWD ?= 'MyClrTextPwd'; -variable CREAM_DB_PASSWORD ?= 'MyClrTextPwd'; - -include 'machine-types/grid/ce'; - -# -# software repositories (should be last) -# -include PKG_REPOSITORY_CONFIG; diff --git a/clusters/grid/umd3/profiles/lfc.example.org.pan b/clusters/grid/umd3/profiles/lfc.example.org.pan deleted file mode 100644 index 9c48f83..0000000 --- a/clusters/grid/umd3/profiles/lfc.example.org.pan +++ /dev/null @@ -1,16 +0,0 @@ - -object template lfc.example.org; - -variable LFC_CENTRAL = true; -variable LFC_CONFIG_SITE = "site/glite/lfc_config"; -variable LFC_CENTRAL_VOS = list('lal'); -variable LFC_LOCAL_VOS = list('alice'); -variable VOS = merge(LFC_CENTRAL_VOS, LFC_LOCAL_VOS); - - -include 'machine-types/grid/lfc'; - -# -# software repositories (should be last) -# -include PKG_REPOSITORY_CONFIG; diff --git a/clusters/grid/umd3/profiles/wmslb.example.org.pan b/clusters/grid/umd3/profiles/wmslb.example.org.pan deleted file mode 100644 index 1cbd7b6..0000000 --- a/clusters/grid/umd3/profiles/wmslb.example.org.pan +++ /dev/null @@ -1,19 +0,0 @@ - -object template wmslb.example.org; - -# Control if WMS is drained -#variable WMS_DRAINED ?= true; -variable WMS_WM_BDII_FILTER_MAX_VOS ?= 35; - -# Define VO list specific to WMS/LB -variable NODE_VO_CONFIG ?= "site/wmslb/vos"; - -variable WMS_CONFIG_SITE = "site/wmslb/config"; - -include 'machine-types/grid/wmslb'; - -# -# software repositories (should be last) -# -include PKG_REPOSITORY_CONFIG; - diff --git a/clusters/grid/umd3/repository/config.pan b/clusters/grid/umd3/repository/config.pan deleted file mode 100644 index 6f0ce9a..0000000 --- a/clusters/grid/umd3/repository/config.pan +++ /dev/null @@ -1,55 +0,0 @@ -# NOTE: This template should be the LAST thing included in a -# machine profile. If you include packages after this template -# then they will not be "resolved" and SPMA will not function -# correctly. - -unique template repository/config; - -include {'pan/functions'}; - -include { 'repository/snapshot/snapshot_variables' }; - -# Repositories related to base OS and quattor client (should be first) -include {'repository/config/os'}; - -# Quattor repositories -include { 'repository/config/quattor' }; - -# Local Repositories -variable YUM_SITE_SNAPSHOT_NS ?= YUM_SNAPSHOT_NS; -variable SITE_REPOSITORY_LIST ?= list(); -variable SITE_REPOSITORY_CONFIG ?= nlist(); -variable DEBUG = debug('OS_REPOSITORY_LIST = ' + to_string(OS_REPOSITORY_LIST) + "\n" + - 'SITE_REPOSITORY_LIST = ' + to_string(SITE_REPOSITORY_LIST) + "\n" + - 'SITE_REPOSITORY_CONFIG = ' + to_string(SITE_REPOSITORY_CONFIG) + "\n"); -include {'quattor/functions/repository'}; -#'/software/repositories' = add_repositories(SITE_REPOSITORY_LIST,YUM_SITE_SNAPSHOT_NS); -'/software/repositories' = add_repositories(SITE_REPOSITORY_LIST); -'/software/repositories' = repository_config(SITE_REPOSITORY_CONFIG); - -# Repositories related to grid middleware -# Only if it can be found in the loadpath (else this is a machine not running gLite -include { if_exists('repository/config/grid') }; - -# Repositories related to Nagios -variable REPOSITORY_CONFIG_NAGIOS ?= null; -variable REPOSITORY_CONFIG_NAGIOS_INCLUDE = { - if (exists(REPOSITORY_CONFIG_NAGIOS) && is_defined(REPOSITORY_CONFIG_NAGIOS)) { - return(REPOSITORY_CONFIG_NAGIOS); - } else { - return(null); - }; -}; -include { REPOSITORY_CONFIG_NAGIOS_INCLUDE }; - -# Register repository changes with yum based spma -'/software/components/spma/register_change' = { - if (is_defined(QUATTOR_RELEASE) && (QUATTOR_RELEASE >= '13.2')) { - append('/software/repositories'); - } else { - SELF; - }; -}; - -# Cleanup repository information -include { 'components/spma/repository_cleanup' }; diff --git a/clusters/grid/umd4/cluster.build.properties b/clusters/grid/umd4/cluster.build.properties new file mode 100644 index 0000000..33bfdba --- /dev/null +++ b/clusters/grid/umd4/cluster.build.properties @@ -0,0 +1,2 @@ +cluster.pan.includes=sites/example grid/umd-4 os quattor/23.9.0-rc1 standard +cluster.pan.dep.ignore="" diff --git a/clusters/grid/umd3/profiles/apel.example.org.tpl.disabled b/clusters/grid/umd4/profiles/apel.example.org.tpl.disabled similarity index 100% rename from clusters/grid/umd3/profiles/apel.example.org.tpl.disabled rename to clusters/grid/umd4/profiles/apel.example.org.tpl.disabled diff --git a/clusters/grid/umd3/profiles/argus.example.org.pan b/clusters/grid/umd4/profiles/argus.example.org.pan similarity index 100% rename from clusters/grid/umd3/profiles/argus.example.org.pan rename to clusters/grid/umd4/profiles/argus.example.org.pan diff --git a/clusters/grid/umd3/profiles/bdii.example.org.pan b/clusters/grid/umd4/profiles/bdii.example.org.pan similarity index 100% rename from clusters/grid/umd3/profiles/bdii.example.org.pan rename to clusters/grid/umd4/profiles/bdii.example.org.pan diff --git a/clusters/grid/umd3/profiles/nagios3-server.example.org.tpl.NOT_WORKING b/clusters/grid/umd4/profiles/nagios3-server.example.org.tpl.NOT_WORKING similarity index 100% rename from clusters/grid/umd3/profiles/nagios3-server.example.org.tpl.NOT_WORKING rename to clusters/grid/umd4/profiles/nagios3-server.example.org.tpl.NOT_WORKING diff --git a/clusters/grid/umd3/profiles/px.example.org.tpl.disabled b/clusters/grid/umd4/profiles/px.example.org.tpl.disabled similarity index 100% rename from clusters/grid/umd3/profiles/px.example.org.tpl.disabled rename to clusters/grid/umd4/profiles/px.example.org.tpl.disabled diff --git a/clusters/grid/umd3/profiles/se-dpm-disk.example.org.pan b/clusters/grid/umd4/profiles/se-dpm-disk.example.org.pan similarity index 99% rename from clusters/grid/umd3/profiles/se-dpm-disk.example.org.pan rename to clusters/grid/umd4/profiles/se-dpm-disk.example.org.pan index 000d0e9..50e187d 100644 --- a/clusters/grid/umd3/profiles/se-dpm-disk.example.org.pan +++ b/clusters/grid/umd4/profiles/se-dpm-disk.example.org.pan @@ -15,5 +15,3 @@ include 'machine-types/example/se_dpm'; # software repositories # include PKG_REPOSITORY_CONFIG; - - diff --git a/clusters/grid/umd3/profiles/se-dpm-disk2.example.org.pan b/clusters/grid/umd4/profiles/se-dpm-disk2.example.org.pan similarity index 99% rename from clusters/grid/umd3/profiles/se-dpm-disk2.example.org.pan rename to clusters/grid/umd4/profiles/se-dpm-disk2.example.org.pan index f296fbf..e20d8b3 100644 --- a/clusters/grid/umd3/profiles/se-dpm-disk2.example.org.pan +++ b/clusters/grid/umd4/profiles/se-dpm-disk2.example.org.pan @@ -15,5 +15,3 @@ include 'machine-types/example/se_dpm'; # software repositories # include PKG_REPOSITORY_CONFIG; - - diff --git a/clusters/grid/umd3/profiles/se-dpm-server.example.org.pan b/clusters/grid/umd4/profiles/se-dpm-server.example.org.pan similarity index 71% rename from clusters/grid/umd3/profiles/se-dpm-server.example.org.pan rename to clusters/grid/umd4/profiles/se-dpm-server.example.org.pan index 348c7df..83781f8 100644 --- a/clusters/grid/umd3/profiles/se-dpm-server.example.org.pan +++ b/clusters/grid/umd4/profiles/se-dpm-server.example.org.pan @@ -15,17 +15,16 @@ include 'machine-types/example/se_dpm'; #"/software/components/accounts/rootpwd" = "$1$gMlULQt/$SEHi2bFOtlEwv/qMj4ZBP0"; # Tune MySQL parameters (recommended) -'/software/components/mysql/servers/' = { - SELF[FULL_HOSTNAME]['options'] = nlist( - 'innodb_buffer_pool_size','2048M', - 'innodb_additional_mem_pool_size','256M', - ); - SELF; +include 'components/mysql/config'; +'/software/components/mysql/servers' = { + SELF[FULL_HOSTNAME]['options'] = dict( + 'innodb_buffer_pool_size', '2048M', + 'innodb_additional_mem_pool_size', '256M', + ); + SELF; }; # # software repositories # include PKG_REPOSITORY_CONFIG; - - diff --git a/clusters/grid/umd3/profiles/topbdii.example.org.pan b/clusters/grid/umd4/profiles/topbdii.example.org.pan similarity index 100% rename from clusters/grid/umd3/profiles/topbdii.example.org.pan rename to clusters/grid/umd4/profiles/topbdii.example.org.pan diff --git a/clusters/grid/umd3/profiles/ui.example.org.pan b/clusters/grid/umd4/profiles/ui.example.org.pan similarity index 100% rename from clusters/grid/umd3/profiles/ui.example.org.pan rename to clusters/grid/umd4/profiles/ui.example.org.pan diff --git a/clusters/grid/umd3/profiles/wn.example.org.pan b/clusters/grid/umd4/profiles/wn.example.org.pan similarity index 100% rename from clusters/grid/umd3/profiles/wn.example.org.pan rename to clusters/grid/umd4/profiles/wn.example.org.pan diff --git a/clusters/grid/umd3/profiles/wn2.example.org.pan b/clusters/grid/umd4/profiles/wn2.example.org.pan similarity index 100% rename from clusters/grid/umd3/profiles/wn2.example.org.pan rename to clusters/grid/umd4/profiles/wn2.example.org.pan diff --git a/clusters/grid/umd3/profiles/wn3.example.org.pan b/clusters/grid/umd4/profiles/wn3.example.org.pan similarity index 100% rename from clusters/grid/umd3/profiles/wn3.example.org.pan rename to clusters/grid/umd4/profiles/wn3.example.org.pan diff --git a/clusters/grid/umd4/repository/config.pan b/clusters/grid/umd4/repository/config.pan new file mode 100644 index 0000000..0d350a5 --- /dev/null +++ b/clusters/grid/umd4/repository/config.pan @@ -0,0 +1,45 @@ +# NOTE: This template should be the LAST thing included in a +# machine profile. If you include packages after this template +# then they will not be "resolved" and SPMA will not function +# correctly. + +unique template repository/config; + +include'pan/functions'; + +include 'repository/snapshot/snapshot_variables'; + +# Repositories related to base OS and quattor client (should be first) +include'repository/config/os'; + +# Quattor repositories +include 'repository/config/quattor'; + +# Local Repositories +variable YUM_SITE_SNAPSHOT_NS ?= YUM_SNAPSHOT_NS; +variable SITE_REPOSITORY_LIST ?= list(); +variable SITE_REPOSITORY_CONFIG ?= dict(); +variable DEBUG = debug( + 'OS_REPOSITORY_LIST = ' + to_string(OS_REPOSITORY_LIST) + "\n" + + 'SITE_REPOSITORY_LIST = ' + to_string(SITE_REPOSITORY_LIST) + "\n" + + 'SITE_REPOSITORY_CONFIG = ' + to_string(SITE_REPOSITORY_CONFIG) + "\n" +); +include'quattor/functions/repository'; +#'/software/repositories' = add_repositories(SITE_REPOSITORY_LIST,YUM_SITE_SNAPSHOT_NS); +'/software/repositories' = add_repositories(SITE_REPOSITORY_LIST); +'/software/repositories' = repository_config(SITE_REPOSITORY_CONFIG); + +# Repositories related to grid middleware +# Only if it can be found in the loadpath (else this is a machine not +# running the grid middleware) +include if_exists('repository/config/grid'); + +# Repositories related to Nagios +include if (is_defined(REPOSITORY_CONFIG_NAGIOS)) if_exists(REPOSITORY_CONFIG_NAGIOS); + +# Register repository changes with yum based spma +include 'components/spma/config'; +'/software/components/spma/register_change' = append('/software/repositories'); + +# Cleanup repository information +include 'components/spma/repository_cleanup'; diff --git a/clusters/grid/umd3/site/cluster_info.pan b/clusters/grid/umd4/site/cluster_info.pan similarity index 91% rename from clusters/grid/umd3/site/cluster_info.pan rename to clusters/grid/umd4/site/cluster_info.pan index ad026ba..a1ecbb0 100644 --- a/clusters/grid/umd3/site/cluster_info.pan +++ b/clusters/grid/umd4/site/cluster_info.pan @@ -15,7 +15,7 @@ variable OS_FLAVOUR_ENABLED ?= true; # YUM Repository snapshots variable YUM_SNAPSHOT_DATE ?= '20140304'; -variable AII_OSINSTALL_ROOT = '/yum/snapshots/'+YUM_SNAPSHOT_DATE; +variable AII_OSINSTALL_ROOT = '/yum/snapshots/' + YUM_SNAPSHOT_DATE; # Set to true to enable MPI support variable ENABLE_MPI ?= false; @@ -41,6 +41,6 @@ variable PKG_REPOSITORY_CONFIG ?= 'repository/config'; # # set root password on machines # -include { 'components/accounts/config' }; +include 'components/accounts/config'; "/software/components/accounts/rootpwd" ?= "$1$57qRuCXe$NPngMkg4BrLBf5hfJzJh21"; "/software/components/accounts/shadowpwd" = true; diff --git a/clusters/grid/umd3/site/wn-cloning-cluster-config.pan b/clusters/grid/umd4/site/wn-cloning-cluster-config.pan similarity index 100% rename from clusters/grid/umd3/site/wn-cloning-cluster-config.pan rename to clusters/grid/umd4/site/wn-cloning-cluster-config.pan diff --git a/clusters/misc/nagios/repository/config.pan b/clusters/misc/nagios/repository/config.pan index ee67eb1..5c5343e 100644 --- a/clusters/misc/nagios/repository/config.pan +++ b/clusters/misc/nagios/repository/config.pan @@ -1,6 +1,6 @@ unique template repository/config; -include {'pan/functions'}; +include 'pan/functions'; # NOTE: This template should be the LAST thing included in a # machine profile. If you include packages after this template @@ -8,47 +8,31 @@ include {'pan/functions'}; # correctly. # Repositories related to base OS and quattor client (should be first) -include {'repository/config/os'}; +include 'repository/config/os'; # Quattor repository -include { 'repository/config/quattor' }; +include 'repository/config/quattor'; # Local Repositories variable YUM_SITE_SNAPSHOT_NS ?= YUM_SNAPSHOT_NS; variable SITE_REPOSITORY_LIST ?= list(); -variable SITE_REPOSITORY_CONFIG ?= nlist(); -variable DEBUG = debug('OS_REPOSITORY_LIST = ' + to_string(OS_REPOSITORY_LIST) + "\n" + - 'SITE_REPOSITORY_LIST = ' + to_string(SITE_REPOSITORY_LIST) + "\n" + - 'SITE_REPOSITORY_CONFIG = ' + to_string(SITE_REPOSITORY_CONFIG) + "\n"); -include {'quattor/functions/repository'}; +variable SITE_REPOSITORY_CONFIG ?= dict(); +variable DEBUG = debug( + 'OS_REPOSITORY_LIST = ' + to_string(OS_REPOSITORY_LIST) + "\n" + + 'SITE_REPOSITORY_LIST = ' + to_string(SITE_REPOSITORY_LIST) + "\n" + + 'SITE_REPOSITORY_CONFIG = ' + to_string(SITE_REPOSITORY_CONFIG) + "\n" +); +include'quattor/functions/repository'}; #'/software/repositories' = add_repositories(SITE_REPOSITORY_LIST,YUM_SITE_SNAPSHOT_NS); '/software/repositories' = add_repositories(SITE_REPOSITORY_LIST); '/software/repositories' = repository_config(SITE_REPOSITORY_CONFIG); -# Repositories related to grid middleware -# Only if it can be found in the loadpath (else this is a machine not -# running gLite like a non UI LAL server) -include { if_exists('repository/config/grid') }; - # Repositories related to Nagios -variable REPOSITORY_CONFIG_NAGIOS ?= null; -variable REPOSITORY_CONFIG_NAGIOS_INCLUDE = { - if (exists(REPOSITORY_CONFIG_NAGIOS) && is_defined(REPOSITORY_CONFIG_NAGIOS)) { - return(REPOSITORY_CONFIG_NAGIOS); - } else { - return(null); - }; -}; -include { REPOSITORY_CONFIG_NAGIOS_INCLUDE }; +include if (is_defined(REPOSITORY_CONFIG_NAGIOS)) if_exists(REPOSITORY_CONFIG_NAGIOS); # Register repository changes with yum based spma -'/software/components/spma/register_change' = { - if (is_defined(QUATTOR_RELEASE) && (QUATTOR_RELEASE >= '13.2')) { - append('/software/repositories'); - } else { - SELF; - }; -}; +include 'components/spma/config'; +'/software/components/spma/register_change' = append('/software/repositories'); # Cleanup repository information -include { 'components/spma/repository_cleanup' }; +include 'components/spma/repository_cleanup'; diff --git a/clusters/openstack/icehouse/repository/config.pan b/clusters/openstack/icehouse/repository/config.pan index 29df37e..db37f2d 100644 --- a/clusters/openstack/icehouse/repository/config.pan +++ b/clusters/openstack/icehouse/repository/config.pan @@ -17,34 +17,24 @@ variable YUM_SITE_SNAPSHOT_NS ?= YUM_SNAPSHOT_NS; variable SITE_REPOSITORY_LIST ?= list(); variable SITE_REPOSITORY_CONFIG ?= dict(); variable QUATTOR_REPOSITORY_LIST ?= list('snapshot/' + REPOSITORY_SNAPSHOT + '/Quattor-' + QUATTOR_RELEASE); -variable DEBUG = debug('OS_REPOSITORY_LIST = ' + to_string(OS_REPOSITORY_LIST) + "\n" + - 'QUATTOR_REPOSITORY_LIST = ' + to_string(QUATTOR_REPOSITORY_LIST) + "\n" + - 'SITE_REPOSITORY_LIST = ' + to_string(SITE_REPOSITORY_LIST) + "\n" + - 'SITE_REPOSITORY_CONFIG = ' + to_string(SITE_REPOSITORY_CONFIG) + "\n"); +variable DEBUG = debug( + 'OS_REPOSITORY_LIST = ' + to_string(OS_REPOSITORY_LIST) + "\n" + + 'QUATTOR_REPOSITORY_LIST = ' + to_string(QUATTOR_REPOSITORY_LIST) + "\n" + + 'SITE_REPOSITORY_LIST = ' + to_string(SITE_REPOSITORY_LIST) + "\n" + + 'SITE_REPOSITORY_CONFIG = ' + to_string(SITE_REPOSITORY_CONFIG) + "\n" +); include 'quattor/functions/repository'; '/software/repositories' = add_repositories(QUATTOR_REPOSITORY_LIST); '/software/repositories' = add_repositories(SITE_REPOSITORY_LIST); '/software/repositories' = repository_config(SITE_REPOSITORY_CONFIG); # Repositories related to Nagios -variable REPOSITORY_CONFIG_NAGIOS ?= null; -variable REPOSITORY_CONFIG_NAGIOS_INCLUDE = { - if (exists(REPOSITORY_CONFIG_NAGIOS) && is_defined(REPOSITORY_CONFIG_NAGIOS)) { - REPOSITORY_CONFIG_NAGIOS; - } else { - null; - }; -}; -include REPOSITORY_CONFIG_NAGIOS_INCLUDE; +include if (is_defined(REPOSITORY_CONFIG_NAGIOS)) if_exists(REPOSITORY_CONFIG_NAGIOS); # Register repository changes with yum based spma -'/software/components/spma/register_change' = { - if (is_defined(QUATTOR_RELEASE) && (QUATTOR_RELEASE >= '13.2')) { - append('/software/repositories'); - } else { - SELF; - }; -}; +include 'components/spma/config'; +'/software/components/spma/register_change' = append('/software/repositories'); # Cleanup repository information +include 'components/spma/config'; include 'components/spma/repository_cleanup'; diff --git a/sites/example/site/config/example_nodes_properties.pan b/sites/example/site/config/example_nodes_properties.pan deleted file mode 100644 index 3d4630b..0000000 --- a/sites/example/site/config/example_nodes_properties.pan +++ /dev/null @@ -1,21 +0,0 @@ -structure template config/example_nodes_properties; - -"example" ?= nlist( - - -escape("node06.org.fr"), nlist("type","MON", "monitoring","yes", "os", "sl460-x86_64", "ip","255.255.255.21" , "hardware","virtual_machine_6"), -escape("node16.org.fr"), nlist("type","CE-MPI", "monitoring","yes", "os","sl450-x86_64", "ip","255.255.255.43" , "hardware","virtual_machine_1"), -escape("node21.org.fr"), nlist("type","VOBOX", "monitoring","yes", "os", "sl460-x86_64", "ip","255.255.255.48" , "hardware","virtual_machine_5"), -escape("node25.org.fr"), nlist("type","OTHER", "monitoring","yes", "os","sl450-x86_64", "ip","255.255.255.84" , "hardware","virtual_machine_2"), -escape("node52.org.fr"), nlist("type","AII", "monitoring","yes", "os","sl460-x86_64", "ip","255.255.255.182" , "hardware","virtual_machine_4"), -escape("node59.org.fr"), nlist("type","NAGIOS", "monitoring","yes", "os","sl460-x86_64", "ip","255.255.255.189" , "hardware","virtual_machine_3"), -### -#escape("node15.org.fr"), nlist("type","LEMON", "monitoring","no", "os", "sl460-i386", "ip","255.255.255.42" , "hardware","virtual_machine_9"), -escape("node01.org.fr"), nlist("type","VOBOX", "monitoring","yes", "os","sl460-x86_64", "ip","255.255.255.16" , "hardware","virtual_machine_10"), -escape("node14.org.fr"), nlist("type","LFC", "monitoring","yes", "os","sl460-x86_64", "ip","255.255.255.41" , "hardware","virtual_machine_11"), -escape("gate01.org.fr"), nlist("type","OTHER", "monitoring","yes", "os","sl460-x86_64", "ip","255.255.255.1" , "hardware","virtual_machine_12"), -escape("node07.org.fr"), nlist("type","CE", "monitoring","yes", "os", "sl440-i386", "ip","255.255.255.22" , "hardware","pro_hardware_machine_141_10_ibm_e326m_CE_node07"), -escape("node27.org.fr"), nlist("type","WMS", "monitoring","yes", "os", "sl460-i386", "ip","255.255.255.101" , "hardware","pro_hardware_machine_141_10_ibm_e326m_WMS_node27"), -escape("node04.org.fr"), nlist("type","WMS", "monitoring","yes", "os", "sl460-i386", "ip","255.255.255.19" , "hardware","pro_hardware_machine_141_10_ibm_e326m_41"), - -); diff --git a/sites/example/site/config/nodes_properties.pan b/sites/example/site/config/nodes_properties.pan deleted file mode 100644 index 42187eb..0000000 --- a/sites/example/site/config/nodes_properties.pan +++ /dev/null @@ -1,18 +0,0 @@ -template config/nodes_properties; - -variable SITES ?= list('example'); - -#variable NEW_NODES_PROPS ?= { -variable NODES_PROPS = { - nodes_add = nlist(); - nodes_props = nlist(); - allsites = SITES; - ok = first(allsites,k,v); - while (ok) { - nodes_add = merge(create("config/"+v+"_nodes_properties"),nodes_props); - nodes_props = merge(nodes_add[v],nodes_props); - ok = next(allsites,k,v); -}; - nodes_props; -}; - diff --git a/sites/example/site/glite/dpm_config.pan b/sites/example/site/glite/dpm_config.pan index 3ac4f4d..ce14e8b 100644 --- a/sites/example/site/glite/dpm_config.pan +++ b/sites/example/site/glite/dpm_config.pan @@ -4,55 +4,62 @@ template site/glite/dpm_config; +# DPM vrsion to use by default +variable DPM_VERSION ?= '1.8.10'; + # Just for convenience, this variable is not used by standard templates variable DPM_HEAD_NODE ?= 'se-dpm-server.example.org'; # A 40 character hexadecimal string variable DMLITE_TOKEN_PASSWORD ?= '1234567890123456789012345678901234567890'; -variable DPM_DB_PARAMS ?= nlist( +variable DPM_DB_PARAMS ?= dict( "password", "YourPrefClearPwd", "adminuser", "root", "adminpwd", "YourPrefClearPwd", ); -variable DPM_XROOTD_SHARED_KEY='DXjgDTkK55fnyFr8gW1RcYv0pV7vkcWmZyHr9f4aoc8='; -variable DPM_XROOT_PARAMS ?= nlist( - "exportedVOs", list("atlas","lhcb","vo.lal.in2p3.fr"), - "accessRules", list(nlist('path', '/', - 'authenticated', list('delete','write','write-once'), - 'unauthenticated', list('read'), - )), +variable DPM_XROOTD_SHARED_KEY = 'DXjgDTkK55fnyFr8gW1RcYv0pV7vkcWmZyHr9f4aoc8='; +variable DPM_XROOT_PARAMS ?= dict( + "exportedVOs", list("atlas", "lhcb", "vo.lal.in2p3.fr"), + "accessRules", list(dict( + 'path', '/', + 'authenticated', list('delete', 'write', 'write-once'), + 'unauthenticated', list('read'), + )), "MonALISAHost", "aliendb2.cern.ch", ); # Xrootd federation paramaters -variable XROOTD_FEDERATION_PARAMS = nlist('atlas', nlist('fedredir','atlas-xrd-fr.cern.ch'), - 'cms', nlist('fedredir','xrootd.ba.infn.it'), - ); +variable XROOTD_FEDERATION_PARAMS = dict( + 'atlas', dict('fedredir', 'atlas-xrd-fr.cern.ch'), + 'cms', dict('fedredir', 'xrootd.ba.infn.it'), +); #variable XROOTD_FEDERATION_LIST = list('atlas','cms'); variable XROOTD_FEDERATION_LIST = 'atlas'; #variable DPM_ACCESS_PROTOCOLS = list('gsiftp','rfio','https','xroot'); -variable DPM_ACCESS_PROTOCOLS = list('gsiftp','rfio','xroot'); +variable DPM_ACCESS_PROTOCOLS = list('gsiftp', 'rfio', 'xroot'); -variable DPM_HOSTS = nlist( +variable DPM_HOSTS = dict( "dpm", list(DPM_HEAD_NODE), "dpns", list(DPM_HEAD_NODE), "copyd", list(DPM_HEAD_NODE), "srmv1", list(DPM_HEAD_NODE), "srmv22", list(DPM_HEAD_NODE), - "disk", list(DPM_HEAD_NODE, - 'se-dpm-disk.example.org', - 'se-dpm-disk2.example.org', - ), + "disk", list( + DPM_HEAD_NODE, + 'se-dpm-disk.example.org', + 'se-dpm-disk2.example.org', + ), ); -variable DPM_SERVICE_PARAMS = nlist( - "dpm", nlist("allowCoreDump", true, - "fastThreads", 30, - "requestMaxAge", '90d', - ), +variable DPM_SERVICE_PARAMS = dict( + "dpm", dict( + "allowCoreDump", true, + "fastThreads", 30, + "requestMaxAge", '90d', + ), ); diff --git a/sites/example/site/global_variables.pan b/sites/example/site/global_variables.pan index 0875ed7..eae51ce 100644 --- a/sites/example/site/global_variables.pan +++ b/sites/example/site/global_variables.pan @@ -19,8 +19,8 @@ include 'pan/functions'; final variable DEFAULT_DOMAIN = "example.org"; final variable HOSTNAME = hostname_from_object(); -final variable DOMAIN = domain_from_object(DEFAULT_DOMAIN); -final variable FULL_HOSTNAME = full_hostname_from_object(DEFAULT_DOMAIN); +final variable DOMAIN = domain_from_object(); +final variable FULL_HOSTNAME = OBJECT; # Define the nameservers to use for the site. final variable NAMESERVERS = list("134.158.120.3"); diff --git a/sites/example/site/os/errata-defaults.pan b/sites/example/site/os/errata-defaults.pan deleted file mode 100644 index 6f194a9..0000000 --- a/sites/example/site/os/errata-defaults.pan +++ /dev/null @@ -1,20 +0,0 @@ -# Define standard errata to use for each OS version - -unique template site/os/errata-defaults; - -variable PKG_OS_ERRATA_FIX_TEMPLATE_SUFFIX ?= '-fix'; - -variable OS_ERRATA_TEMPLATE ?= nlist( - 'sl440-i386', 'rpms/errata/20090904', - 'sl440-x86_64', 'rpms/errata/20090904', - 'sl450-x86_64', 'rpms/errata/20090826', - 'sl460-i386', 'rpms/errata/20090826', - 'sl460-x86_64', 'rpms/errata/20090826', - 'sl470-i386', 'rpms/errata/20090909', - 'sl470-x86_64', 'rpms/errata/20090909', - 'sl510-x86_64', 'rpms/errata', - 'sl520-x86_64', 'rpms/errata/20090826', - 'sl530-x86_64', 'rpms/errata/20090826', - 'sl550-x86_64', 'rpms/errata/20130329', -); - diff --git a/sites/example/site/os/version_db.pan b/sites/example/site/os/version_db.pan index 3cd798a..4c7ae1f 100644 --- a/sites/example/site/os/version_db.pan +++ b/sites/example/site/os/version_db.pan @@ -13,33 +13,33 @@ unique template site/os/version_db; # site-wide definition of the variable (in this template). variable YUM_OS_DISTRIBUTION = { - # Default per OS version - SELF['el7'] = 'centos71'; + # Default per OS version + SELF['el7'] = 'centos71'; - # Explicit value per host name - SELF['ui.example.org'] = 'centos7'; + # Explicit value per host name + SELF['ui.example.org'] = 'centos7'; - SELF; + SELF; }; variable OS_VERSION = dict( - escape("cream.example.org"), "sl640-x86_64", - escape("dcache-head.example.org"), "sl640-i386", - escape("dcache-pool.example.org"), "sl640-i386", - escape("hydra.example.org"), "sl640-x86_64", - escape("lfc.example.org"), "sl640-x86_64", - escape("mon.example.org"), "sl640-x86_64", - escape("ui.example.org"), "el7x-x86_64", - escape("wmslb.example.org"), "sl640-x86_64", - escape("wn2.example.org"), "sl640-x86_64", - escape("xen-guest.example.org"), "sl640-x86_64", - escape("xen-host.example.org"), "sl640-x86_64", - - escape("nagios-server.example.org"), "sl550-x86_64", - escape("nagios-master.example.org"), "sl550-x86_64", - escape("nagios-slave-A.example.org"), "sl550-x86_64", - escape("nagios-slave-B.example.org"), "sl550-x86_64", + escape("cream.example.org"), "el7x-x86_64", + escape("dcache-head.example.org"), "el7x-i386", + escape("dcache-pool.example.org"), "el7x-i386", + escape("hydra.example.org"), "el7x-x86_64", + escape("lfc.example.org"), "el7x-x86_64", + escape("mon.example.org"), "el7x-x86_64", + escape("ui.example.org"), "el7x-x86_64", + escape("wmslb.example.org"), "el7x-x86_64", + escape("wn2.example.org"), "el7x-x86_64", + escape("xen-guest.example.org"), "el7x-x86_64", + escape("xen-host.example.org"), "el7x-x86_64", + + escape("nagios-server.example.org"), "el7x-x86_64", + escape("nagios-master.example.org"), "el7x-x86_64", + escape("nagios-slave-A.example.org"), "el7x-x86_64", + escape("nagios-slave-B.example.org"), "el7x-x86_64", ); diff --git a/sites/example/site/wn-cloning-config.pan b/sites/example/site/wn-cloning-config.pan deleted file mode 100644 index febae8c..0000000 --- a/sites/example/site/wn-cloning-config.pan +++ /dev/null @@ -1,17 +0,0 @@ -template site/wn-cloning-config; - -# Include cluster-specific configuration of profile cloning, if -# available. -variable PROFILE_CLONING_CLUSTER_CONFIG ?= 'site/wn-cloning-cluster-config'; -variable PROFILE_CLONING_CLUSTER_CONFIG_INCLUDE ?= if_exists(PROFILE_CLONING_CLUSTER_CONFIG); -variable PROFILE_CLONING_CLUSTER_CONFIG_INCLUDE ?= debug('Cluster-specific configuration ('+PROFILE_CLONING_CLUSTER_CONFIG+') for profile cloning not found'); -include { PROFILE_CLONING_CLUSTER_CONFIG_INCLUDE }; - -variable PROFILE_CLONING_ENABLED ?= false; -variable PROFILE_CLONING_ELIGIBLE_NODES ?= 'wn.*\.example\.org'; - - -# Eligible nodes where profile cloning must be disabled -variable PROFILE_CLONING_DISABLED ?= nlist( -); - diff --git a/sites/example/vo/site/cms.pan b/sites/example/vo/site/cms.pan index 87900cc..9057185 100644 --- a/sites/example/vo/site/cms.pan +++ b/sites/example/vo/site/cms.pan @@ -2,10 +2,11 @@ structure template vo/site/cms; # Disable some roles not used at T2s "voms_mappings" ?= list( - nlist('fqan', '/cms/Role=t1production', - 'enabled', false, - ), - nlist('fqan', '/cms/Role=hit1production', - 'enabled', false, - ), + dict( + 'description', 'production', + 'fqan', '/cms/Role=t1production', + 'enabled', false, + 'suffix', 'p', + 'suffix2', 'p', + ), );