diff --git a/.ci-scripts/test-library b/.ci-scripts/test-library index 6bb5bec..794381c 100755 --- a/.ci-scripts/test-library +++ b/.ci-scripts/test-library @@ -2,6 +2,10 @@ set -e # halt script on error +echo GITHUB_REPOSITORY: ${GITHUB_REPOSITORY} +echo GITHUB_BASE_REF: ${GITHUB_BASE_REF} +echo GITHUB_WORKSPACE: ${GITHUB_WORKSPACE} + # Retrieve last version of create-vanilla-SCDB from GitHub echo "Downloading create-vanilla-SCDB from GitHub..." rm -f /tmp/create-vanilla-SCDB.sh diff --git a/.ci-scripts/test-templates b/.ci-scripts/test-templates deleted file mode 100755 index ba2b8e2..0000000 --- a/.ci-scripts/test-templates +++ /dev/null @@ -1,438 +0,0 @@ -#!/bin/bash -# -# Create one big profile including all pan templates and try to compile it -# (optional) arguments: -# clean: runs git clean (and will remove changes), to be used on jenkins only -# -rm -Rf ./build_temp - -if [ "$1" == "clean" ]; then - git clean -fxd -fi - -mkdir build_temp - -tplfiles=`find . -type f -regex '.*\.tpl' |wc -l` -if [ $tplfiles -ne 0 ]; then - echo "[ERROR] found .tpl files, should be .pan only: $tplfiles" - exit 1 -fi - -# panc-annotations can have issues with multiple threads creating dirs -echo "Testing pan annotations" -find . -type d ! -regex '.*build_temp.*' | xargs -I '{}' mkdir -p 'build_temp/{}' -nrpanfiles=`find . -type f -regex '.*\.pan' | grep -v yumng | wc -l` -panfiles=`find . -type f -regex '.*\.pan' | grep -v yumng` -panc-annotations --output-dir build_temp $panfiles - -nrannofiles=`find build_temp -type f -regex '.*annotation\.xml'|wc -l` -if [ $nrpanfiles != $nrannofiles ]; then - echo "[ERROR]: number of annotation files is not the same as numnber of pan files." - exit 1 -else - echo "pan annotations ok" -fi - -cat > build_temp/test.pan < build_temp/rpms/package_default_versions.pan < build_temp/rpms/web_server.pan <> build_temp/test.pan -find . -type f ! -regex '^./pan/.*' ! -regex '^./build_temp/.*' -name *.pan | grep -v yumng | xargs sed -n "s/^declaration[ ]\+template[ ]\+\(.*\);/include '\1';/p" | sort >> build_temp/test.pan -find . -type f ! -regex '^./build_temp/.*' -name *.pan | grep -v yumng | xargs sed -n "s/^\(unique[ ]\+\)\?template[ ]\+\(.*\);/include '\2';/p" |sort >> build_temp/test.pan - -# fix for multiversion metaconfig -sed -i '/.*metaconfig\/\(elasticsearch\|logstash\|beats\|kibana\|slurm\)\/.*_[0-9].*/d' build_temp/test.pan -# none-versioned ganesha templates are v1 -sed -i "/.*metaconfig\/ganesha\/\(config\(_v1\)\?\|schema\)'/d" build_temp/test.pan -sed -i "/.*metaconfig\/ganesha\/fsal.*/d" build_temp/test.pan -# action.pan is included by the schema and can only be included after inputs.pan -sed -i "/.*metaconfig\/rsyslog\/actions.*/d" build_temp/test.pan - -# only spma yum -sed -i "/.*components\/spma\/\(apt\|ips\).*/d" build_temp/test.pan - -# Only test default schema version of ceph component -sed -i "/.*components\/ceph\/v[1-9][0-9]*\/.*/d" build_temp/test.pan - -# Only test default schema version of ssh component -sed -i "/.*components\/ssh\/schema-.*/d" build_temp/test.pan - -# try to compile it -output=`panc --output-dir build_temp --include-path .:build_temp build_temp/test.pan 2>&1` - -# use "$output" to preserve newlines in echo - -# if it fails, it's sort of ok when due to bind problems because there's no actual data -ec=$? - -if [ $ec -eq 0 ]; then - echo "$output" - echo "[OK] Pan compilation success." -else - echo "$output" | grep 'element does not exist' >& /dev/null - if [ $? -eq 0 ]; then - echo "$output" | grep 'bound to type' >& /dev/null - if [ $? -eq 0 ]; then - echo "$output" - echo "[OK] expected panc failure due to missing data." - ec=0 - fi - fi -fi - -if [ $ec -ne 0 ]; then - echo "$output" - echo "[ERROR] Pan compilation failed" -fi - -exit $ec diff --git a/README.md b/README.md index 3bddf67..4288bca 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ template-library-examples ========================= -Template examples for configuring a real site - -Examples are based on Quattor version 14.2.1 or later (YUM-based deployment) and use -generic OS templates (e.g. `sl6.x-x86_64`). - +This SCDB examples are mainly used for integration testing during the template library +developments. They don't apply to Aquilon which is the recommended Quattor version for +new users. diff --git a/clusters/ceph_cluster/profiles/ceph01.example.org.pan b/clusters/ceph_cluster/profiles/ceph01.example.org.pan deleted file mode 100644 index 7387af1..0000000 --- a/clusters/ceph_cluster/profiles/ceph01.example.org.pan +++ /dev/null @@ -1,8 +0,0 @@ -object template ceph01.example.org; - -include 'machine-types/ceph-server'; - -# -# software repositories (should be last) -# -include { PKG_REPOSITORY_CONFIG }; diff --git a/clusters/ceph_cluster/profiles/ceph02.example.org.pan b/clusters/ceph_cluster/profiles/ceph02.example.org.pan deleted file mode 100644 index b0e7a41..0000000 --- a/clusters/ceph_cluster/profiles/ceph02.example.org.pan +++ /dev/null @@ -1,8 +0,0 @@ -object template ceph02.example.org; - -include 'machine-types/ceph-server'; - -# -# software repositories (should be last) -# -include { PKG_REPOSITORY_CONFIG }; diff --git a/clusters/ceph_cluster/profiles/ceph03.example.org.pan b/clusters/ceph_cluster/profiles/ceph03.example.org.pan deleted file mode 100644 index 294d47c..0000000 --- a/clusters/ceph_cluster/profiles/ceph03.example.org.pan +++ /dev/null @@ -1,8 +0,0 @@ -object template ceph03.example.org; - -include 'machine-types/ceph-server'; - -# -# software repositories (should be last) -# -include { PKG_REPOSITORY_CONFIG }; diff --git a/clusters/ceph_cluster/site/ceph/cluster/params.pan b/clusters/ceph_cluster/site/ceph/cluster/params.pan deleted file mode 100644 index 3885dfb..0000000 --- a/clusters/ceph_cluster/site/ceph/cluster/params.pan +++ /dev/null @@ -1,15 +0,0 @@ -unique template site/ceph/cluster/params; - -final variable CEPH_DEPLOY_PUBKEYS = list( -); - -variable CEPH_NODES = list('ceph01.example.org', 'ceph02.example.org', 'ceph03.example.org'); -variable CEPH_CLUSTER_TEMPLATE = 'building'; - -variable MDS_FQDNS = list('ceph01.example.org', 'ceph02.example.org'); -variable DEPLOY_FQDNS = list(CEPH_NODES[0]); - -variable CEPH_FSID = '230b20a6-f0ea-4d4e-bdc5-b751005ef6d8'; -variable CEPH_NETWORK = '10.20.30.0/24'; -variable CEPH_CLUSTER_NETWORK = CEPH_NETWORK; - diff --git a/clusters/ceph_cluster/site/ceph/common/params.pan b/clusters/ceph_cluster/site/ceph/common/params.pan deleted file mode 100644 index 38de83b..0000000 --- a/clusters/ceph_cluster/site/ceph/common/params.pan +++ /dev/null @@ -1,5 +0,0 @@ -unique template site/ceph/common/params; - -final variable CEPH_VERSION = '9.2.0'; - -final variable CEPH_MON_HOSTS = list("ceph01.example.org", "ceph02.example.org", "ceph03.example.org"); diff --git a/clusters/ceph_cluster/site/filesystems/ceph.pan b/clusters/ceph_cluster/site/filesystems/ceph.pan deleted file mode 100644 index 7c3a873..0000000 --- a/clusters/ceph_cluster/site/filesystems/ceph.pan +++ /dev/null @@ -1,21 +0,0 @@ -unique template site/filesystems/ceph; - - -variable MAKE_SEPERATE_VAR_PART = true; -include 'site/filesystems/ceph-common'; - -prefix '/system/blockdevices'; -# Boot disk sda partitions -'partitions' = { - partitions_add( - 'sda', dict('sda1', 1*GB, - 'sda2', 10*GB, - 'sda3', DISK_SWAP_SIZE, - 'sda4', 1*MB, #biosboot - 'sda5', 30*GB, - 'sda6', -1)); - SELF['sda4']['flags'] = dict("bios_grub", true); - SELF; -}; - -include 'site/filesystems/ceph-basic'; 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..bbe49af --- /dev/null +++ b/clusters/grid/umd4/repository/config.pan @@ -0,0 +1,44 @@ +# 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); +'/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..f11cb54 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,30 @@ 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'}; -#'/software/repositories' = add_repositories(SITE_REPOSITORY_LIST,YUM_SITE_SNAPSHOT_NS); +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); '/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/opennebula/4.x/cluster.build.properties b/clusters/opennebula/4.x/cluster.build.properties deleted file mode 100644 index 303dce7..0000000 --- a/clusters/opennebula/4.x/cluster.build.properties +++ /dev/null @@ -1 +0,0 @@ -cluster.pan.includes=sites/example clusters/opennebula/4.x non-grid/basic os standard diff --git a/clusters/opennebula/4.x/profiles/hyp01.example.org.pan b/clusters/opennebula/4.x/profiles/hyp01.example.org.pan deleted file mode 100644 index c8aab98..0000000 --- a/clusters/opennebula/4.x/profiles/hyp01.example.org.pan +++ /dev/null @@ -1,9 +0,0 @@ -object template hyp01.example.org; - -# Include OpenNebula hypervisor -include 'site/one/node'; - -# -# software repositories (should be last) -# -include PKG_REPOSITORY_CONFIG; diff --git a/clusters/opennebula/4.x/profiles/one.example.org.pan b/clusters/opennebula/4.x/profiles/one.example.org.pan deleted file mode 100644 index 4e2bc8d..0000000 --- a/clusters/opennebula/4.x/profiles/one.example.org.pan +++ /dev/null @@ -1,9 +0,0 @@ -object template one.example.org; - -# Include OpenNebula server -include 'site/one/frontend'; - -# -# software repositories (should be last) -# -include PKG_REPOSITORY_CONFIG; diff --git a/clusters/opennebula/4.x/profiles/vm.example.org.pan b/clusters/opennebula/4.x/profiles/vm.example.org.pan deleted file mode 100644 index fd4053f..0000000 --- a/clusters/opennebula/4.x/profiles/vm.example.org.pan +++ /dev/null @@ -1,10 +0,0 @@ -object template vm.example.org; - -# AII opennebula VM -include 'site/one/onevm'; - -# -# software repositories (should be last) -# -include PKG_REPOSITORY_CONFIG; - diff --git a/clusters/opennebula/4.x/site/config-vm.pan b/clusters/opennebula/4.x/site/config-vm.pan deleted file mode 100644 index 3a57216..0000000 --- a/clusters/opennebula/4.x/site/config-vm.pan +++ /dev/null @@ -1,19 +0,0 @@ -unique template site/config-vm; - -# AII opennebula VM conf - -# Set network -prefix "/system/opennebula"; -"vnet" = dict( - "eth0", "example.os", -); - -# Set storage -"datastore" = dict( - "vda", "ceph.example", -); - -# set aii opennebula hooks -final variable OPENNEBULA_AII_FORCE = true; -final variable OPENNEBULA_AII_ONHOLD = false; - diff --git a/clusters/opennebula/4.x/site/databases.pan b/clusters/opennebula/4.x/site/databases.pan deleted file mode 100644 index 75405b3..0000000 --- a/clusters/opennebula/4.x/site/databases.pan +++ /dev/null @@ -1,18 +0,0 @@ -template site/databases; - -# Defines the mapping between the full hostname and the IP -# address. -final variable DB_IP = dict( - escape("one"),"192.168.0.24", - escape("hyp01"), "192.168.0.25", - escape("vm"), "192.168.0.26", -); - -# Defines the mapping between the full hostname and the -# physical machine. -# A different hardware template must be used for each machine -final variable DB_MACHINE = dict( - escape("one"),"hardware/machine/ibm/x3550/x_KDXXXX", - escape("hyp01"),"hardware/machine/ibm/hs21xm/blade_99HXXXX", - escape("vm"), "hardware/machine/one/example", -); diff --git a/clusters/opennebula/4.x/site/one/resources.pan b/clusters/opennebula/4.x/site/one/resources.pan deleted file mode 100644 index f958980..0000000 --- a/clusters/opennebula/4.x/site/one/resources.pan +++ /dev/null @@ -1,30 +0,0 @@ -unique template site/one/resources; - -# datastores templates -prefix "/software/components/opennebula/datastores/0"; -"name" = "ceph.example"; -"bridge_list" = list(FULL_HOSTNAME); # for now, do this from the headnode -"ceph_host" = CEPH_MON_HOSTS; -"ceph_secret" = CEPH_LIBVIRT_UUID; -"ceph_user" = "libvirt"; -"ceph_user_key" = CEPH_LIBVIRT_SECRET; -"datastore_capacity_check" = true; -"pool_name" = "one"; -"type" = "IMAGE_DS"; -"rbd_format" = 2; - -prefix "/software/components/opennebula/datastores/1"; -"name" = "nfs.example"; -"datastore_capacity_check" = true; -"ds_mad" = "fs"; -"tm_mad" = "shared"; -"type" = "IMAGE_DS"; - -# untouchables resources -prefix "/software/components/opennebula/untouchables"; -"datastores" = list('system'); - -# extra conf -prefix "/software/components/opennebula"; -"ssh_multiplex" = true; -"tm_system_ds" = "ssh"; diff --git a/clusters/opennebula/4.x/site/one/variables.pan b/clusters/opennebula/4.x/site/one/variables.pan deleted file mode 100644 index 2a6f154..0000000 --- a/clusters/opennebula/4.x/site/one/variables.pan +++ /dev/null @@ -1,14 +0,0 @@ -unique template site/one/variables; - -final variable ONEADMIN_PUBKEYS = list( -'ssh-dss AAAAB3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx== oneadmin@one.example.org', -); - - -# just generate one uuid per cluster -final variable CEPH_LIBVIRT_UUID = "8271aaaa-385d-44d7-yyyy-xxxxxxxxxxxx"; - -# set passwords -final variable OPENNEBULA_ONEADMIN = EXAMPLE_OPENNEBULA_ONEADMIN; -final variable OPENNEBULA_MYSQL_ADMIN = EXAMPLE_OPENNEBULA_MYSQL_ADMIN; -final variable OPENNEBULA_MYSQL_ONEADMIN = EXAMPLE_OPENNEBULA_MYSQL_ONEADMIN; diff --git a/clusters/opennebula/4.x/site/version_db.pan b/clusters/opennebula/4.x/site/version_db.pan deleted file mode 100644 index c671663..0000000 --- a/clusters/opennebula/4.x/site/version_db.pan +++ /dev/null @@ -1,7 +0,0 @@ -unique template site/version_db; - -final variable OS_VERSION = dict( - escape("one.example.org"), "c7x-x86_64", - escape("hyp01.example.org"), "c7x-x86_64", - escape("vm.example.org"), "c7x-x86_64", -); diff --git a/clusters/openstack/icehouse/cluster.build.properties b/clusters/openstack/icehouse/cluster.build.properties deleted file mode 100644 index 739f5e7..0000000 --- a/clusters/openstack/icehouse/cluster.build.properties +++ /dev/null @@ -1,2 +0,0 @@ -cluster.pan.includes=sites/example openstack/icehouse os quattor/23.9.0-rc1 standard -cluster.pan.dep.ignore="" diff --git a/clusters/openstack/icehouse/profiles/cloud-controller.example.org.pan b/clusters/openstack/icehouse/profiles/cloud-controller.example.org.pan deleted file mode 100644 index da9bed2..0000000 --- a/clusters/openstack/icehouse/profiles/cloud-controller.example.org.pan +++ /dev/null @@ -1,18 +0,0 @@ -@maintainer{ - name = Jerome Pansanel - email = jerome.pansanel@iphc.cnrs.fr -} - -@{ - Example template that shows the configuration of an OpenStack Cloud - Controller -} - -object template cloud-controller.example.org; - -include 'machine-types/openstack/cloud_controller'; - -# -# software repositories (should be last) -# -include PKG_REPOSITORY_CONFIG; diff --git a/clusters/openstack/icehouse/profiles/compute-node.example.org.pan b/clusters/openstack/icehouse/profiles/compute-node.example.org.pan deleted file mode 100644 index a08a7e8..0000000 --- a/clusters/openstack/icehouse/profiles/compute-node.example.org.pan +++ /dev/null @@ -1,57 +0,0 @@ -@maintainer{ - name = Jerome Pansanel - email = jerome.pansanel@iphc.cnrs.fr -} - -@{ - Example template that shows the configuration of an OpenStack Compute - node -} - -object template compute-node.example.org; - -variable MGMT_INTERFACE ?= 'eth0'; -variable DATA_INTERFACE ?= 'eth1'; -variable DATA_BRIDGE ?= 'br-' + DATA_INTERFACE; -variable BRIDGE_MAPPINGS ?= 'physnet1:' + DATA_BRIDGE; - -include 'machine-types/openstack/compute_node'; - -#---------------------------------------------------------------------------- -# Network configuration -#---------------------------------------------------------------------------- - -include 'components/network/config'; - -'/system/network/interfaces' = { - SELF[MGMT_INTERFACE] = dict( - 'device', MGMT_INTERFACE, - 'bootproto', 'dhcp', - 'onboot', true, - 'type', 'Ethernet', - ); - - SELF[DATA_BRIDGE] = dict( - 'device', DATA_BRIDGE, - 'type', 'OVSBridge', - 'bootproto', 'static', - 'ip', '10.0.0.2', - 'netmask', '255.255.255.0', - 'onboot', true, - ); - - SELF[DATA_INTERFACE] = dict( - 'device', DATA_INTERFACE, - 'type', 'OVSPort', - 'bootproto', 'none', - 'ovs_bridge', DATA_BRIDGE, - 'onboot', true, - ); - - SELF; -}; - -# -# software repositories (should be last) -# -include PKG_REPOSITORY_CONFIG; diff --git a/clusters/openstack/icehouse/profiles/network-node.example.org.pan b/clusters/openstack/icehouse/profiles/network-node.example.org.pan deleted file mode 100644 index 97e20a4..0000000 --- a/clusters/openstack/icehouse/profiles/network-node.example.org.pan +++ /dev/null @@ -1,68 +0,0 @@ -@maintainer{ -name = Jerome Pansanel -email = jerome.pansanel@iphc.cnrs.fr -} - -@{ -Example template that shows the configuration of an OpenStack Network -node -} - -object template network-node.example.org; - -variable MGMT_INTERFACE ?= 'eth0'; -variable PUBLIC_INTERFACE ?= 'eth1'; -variable DATA_INTERFACE ?= 'eth2'; -variable PUBLIC_BRIDGE ?= 'br-ex'; -variable DATA_BRIDGE ?= 'br-' + DATA_INTERFACE; -variable BRIDGE_MAPPINGS ?= 'physnet1:' + DATA_BRIDGE; - -include 'machine-types/openstack/network_node'; - -#---------------------------------------------------------------------------- -# Network configuration -#---------------------------------------------------------------------------- - -include 'components/network/config'; - -'/system/network/interfaces' = { - SELF[MGMT_INTERFACE] = dict( - 'device', MGMT_INTERFACE, - 'bootproto', 'dhcp', - 'onboot', true, - 'type', 'Ethernet', - ); - - SELF[PUBLIC_BRIDGE] = dict( - 'device', DATA_BRIDGE, - 'type', 'OVSBridge', - 'bootproto', 'static', - 'ip', '192.168.10.32', - 'netmask', '255.255.255.0', - 'onboot', true, - ); - - SELF[PUBLIC_INTERFACE] = dict( - 'device', PUBLIC_INTERFACE, - 'type', 'OVSPort', - 'bootproto', 'none', - 'ovs_bridge', PUBLIC_BRIDGE, - 'onboot', true, - ); - - SELF[DATA_BRIDGE] = dict( - 'device', DATA_BRIDGE, - 'type', 'OVSBridge', - 'bootproto', 'static', - 'ip', '10.0.0.1', - 'netmask', '255.255.255.0', - 'onboot', true, - ); - - SELF; -}; - -# -# software repositories (should be last) -# -include PKG_REPOSITORY_CONFIG; diff --git a/clusters/openstack/icehouse/repository/config.pan b/clusters/openstack/icehouse/repository/config.pan deleted file mode 100644 index 29df37e..0000000 --- a/clusters/openstack/icehouse/repository/config.pan +++ /dev/null @@ -1,50 +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'; - -# Local Repositories -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"); -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; - -# 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/openstack/icehouse/site/cluster_info.pan b/clusters/openstack/icehouse/site/cluster_info.pan deleted file mode 100644 index f8cb69b..0000000 --- a/clusters/openstack/icehouse/site/cluster_info.pan +++ /dev/null @@ -1,43 +0,0 @@ - -template site/cluster_info; - -# -# basic site information -# -"/system/cluster/name" = "Icehouse"; -"/system/cluster/type" = "batch"; -"/system/state" = "production"; -"/system/siterelease" = "SL6"; -"/system/rootmail" = "cloud.support@example.org"; - -# Use OS templates for generic major version -variable OS_FLAVOUR_ENABLED ?= true; - -# YUM Repository snapshots -variable YUM_SNAPSHOT_DATE ?= '20150223'; -variable AII_OSINSTALL_ROOT = '/yum/snapshots/'+YUM_SNAPSHOT_DATE; - -# Set to true if you want to deploy machines in these clusster with an -# AII server running Quattor 13.1.x. -# It is recommended to define this variable to true only during the installation -# phase and to reset it to false afterwards. -# You can also override the default value defined here in a specific profile. -variable AII_V2_INSTALL ?= false; - -# -# OS version definition -# -variable NODE_OS_VERSION_DB = "site/os/version_db"; -variable NODE_OS_VERSION_DEFAULT = "sl660-x86_64"; - - -# Default repository configuration template for the cluster -variable PKG_REPOSITORY_CONFIG ?= 'repository/config'; - - -# -# set root password on machines -# -include 'components/accounts/config'; -"/software/components/accounts/rootpwd" ?= "$1$57qRuCXe$NPngMkg4BrLBf5hfJzJh21"; -"/software/components/accounts/shadowpwd" = true; 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', + ), );