From 4df4be1f0544ee477954319e4290d440ce7f6b98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Thu, 26 Nov 2015 10:26:13 +0100 Subject: [PATCH 01/35] FIX: Github can not be used anymore for VM client installation --- .../bootstrap/EGI-Fedcloud-general-DIRAC.context.sh | 6 +++--- .../bootstrap/FranceGrilles-general-DIRAC-context.sh | 7 +++---- .../private/bootstrap/general-DIRAC-context.sh | 7 +++---- .../private/bootstrap/genome-DIRAC-context.sh | 8 +++----- .../private/bootstrap/genome-mountAWSvol-DIRAC-context.sh | 8 +++----- 5 files changed, 15 insertions(+), 21 deletions(-) diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh index e9181de2..8ce9886d 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh @@ -104,13 +104,13 @@ echo "9 $cloudDriver" >> /var/log/dirac-context-script.log 2>&1 # Installing DIRAC # cd /opt/dirac - wget --no-check-certificate -O dirac-install 'https://github.com/DIRACGrid/DIRAC/raw/integration/Core/scripts/dirac-install.py' >> /var/log/dirac-context-script.log 2>&1 + wget --no-check-certificate -O dirac-install 'http://dirac1.grid.cyfronet.pl:8088/repo/integration/DIRAC/Core/scripts/dirac-install.py' >> /var/log/dirac-context-script.log 2>&1 su dirac -c'python dirac-install -V "VMEGI"' >> /var/log/dirac-context-script.log 2>&1 - # FOR DEBUGGIN PURPOSES overwriting with last released in the local vmendez git folder: + # FOR DEBUGGIN PURPOSES overwriting with last released in the local vmendez folder: rm -rf VMDIRAC - wget --no-check-certificate -O vmdirac.zip 'https://github.com/vmendez/VMDIRAC/archive/master.zip' >> /var/log/dirac-context-script.log 2>&1 + wget --no-check-certificate -O vmdirac.zip 'http://dirac1.grid.cyfronet.pl:8088/repo/vmendez/master.zip' >> /var/log/dirac-context-script.log 2>&1 # checking if unzip installed if [ ! `which unzip` ] then diff --git a/WorkloadManagementSystem/private/bootstrap/FranceGrilles-general-DIRAC-context.sh b/WorkloadManagementSystem/private/bootstrap/FranceGrilles-general-DIRAC-context.sh index ec91a94c..bca5ec1e 100644 --- a/WorkloadManagementSystem/private/bootstrap/FranceGrilles-general-DIRAC-context.sh +++ b/WorkloadManagementSystem/private/bootstrap/FranceGrilles-general-DIRAC-context.sh @@ -62,16 +62,15 @@ echo "11 $cloudDriver" >> /var/log/dirac-context-script.log 2>&1 # # Installing DIRAC -# FOR DEBUGGIN PURPOSES installing debuggin github version instead of cvmfs repository released DIRAC: # cd /opt/dirac - wget --no-check-certificate -O dirac-install 'https://github.com/DIRACGrid/DIRAC/raw/integration/Core/scripts/dirac-install.py' >> /var/log/dirac-context-script.log 2>&1 + wget --no-check-certificate -O dirac-install 'https://yourreposerverhere-notGit/DIRACGrid/DIRAC/raw/integration/Core/scripts/dirac-install.py' >> /var/log/dirac-context-script.log 2>&1 su dirac -c'python dirac-install -V "VMFranceGrilles"' >> /var/log/dirac-context-script.log 2>&1 - # FOR DEBUGGIN PURPOSES overwriting with last released in the local vmendez git folder: + # FOR DEBUGGIN PURPOSES overwriting with last released in your folder: rm -rf VMDIRAC - wget --no-check-certificate -O vmdirac.zip 'https://github.com/vmendez/VMDIRAC/archive/master.zip' >> /var/log/dirac-context-script.log 2>&1 + wget --no-check-certificate -O vmdirac.zip 'https://yourreposerverhere-notGit/yourfolder/VMDIRAC/archive/master.zip' >> /var/log/dirac-context-script.log 2>&1 unzip vmdirac.zip >> /var/log/dirac-context-script.log 2>&1 mv VMDIRAC-master VMDIRAC chown -R dirac:dirac VMDIRAC diff --git a/WorkloadManagementSystem/private/bootstrap/general-DIRAC-context.sh b/WorkloadManagementSystem/private/bootstrap/general-DIRAC-context.sh index a6561f5e..7ea17964 100644 --- a/WorkloadManagementSystem/private/bootstrap/general-DIRAC-context.sh +++ b/WorkloadManagementSystem/private/bootstrap/general-DIRAC-context.sh @@ -86,16 +86,15 @@ echo "9 $cloudDriver" >> /var/log/dirac-context-script.log 2>&1 # # Installing DIRAC -# FOR DEBUGGIN PURPOSES installing debuggin github version instead of cvmfs repository released DIRAC: # cd /opt/dirac - wget --no-check-certificate -O dirac-install 'https://github.com/DIRACGrid/DIRAC/raw/integration/Core/scripts/dirac-install.py' >> /var/log/dirac-context-script.log 2>&1 + wget --no-check-certificate -O dirac-install 'http://dirac1.grid.cyfronet.pl:8088/repo/integration/DIRAC/Core/scripts/dirac-install.py' >> /var/log/dirac-context-script.log 2>&1 su dirac -c'python dirac-install -V "VMDIRAC"' >> /var/log/dirac-context-script.log 2>&1 - # FOR DEBUGGIN PURPOSES overwriting with last released in the local vmendez git folder: + # FOR DEBUGGIN PURPOSES overwriting with last released in the local vmendez folder: rm -rf VMDIRAC - wget --no-check-certificate -O vmdirac.zip 'https://github.com/vmendez/VMDIRAC/archive/master.zip' >> /var/log/dirac-context-script.log 2>&1 + wget --no-check-certificate -O vmdirac.zip 'http://dirac1.grid.cyfronet.pl:8088/repo/vmendez/master.zip' >> /var/log/dirac-context-script.log 2>&1 # checking if unzip installed if [ ! `which unzip` ] then diff --git a/WorkloadManagementSystem/private/bootstrap/genome-DIRAC-context.sh b/WorkloadManagementSystem/private/bootstrap/genome-DIRAC-context.sh index 6ddbf71f..7e0ee0b2 100644 --- a/WorkloadManagementSystem/private/bootstrap/genome-DIRAC-context.sh +++ b/WorkloadManagementSystem/private/bootstrap/genome-DIRAC-context.sh @@ -107,16 +107,14 @@ echo "9 $cloudDriver" >> /var/log/dirac-context-script.log 2>&1 # # Installing DIRAC -# FOR DEBUGGIN PURPOSES installing debuggin github version instead of cvmfs repository released DIRAC: # cd /opt/dirac - wget --no-check-certificate -O dirac-install 'https://github.com/DIRACGrid/DIRAC/raw/integration/Core/scripts/dirac-install.py' >> /var/log/dirac-context-script.log 2>&1 - + wget --no-check-certificate -O dirac-install 'http://dirac1.grid.cyfronet.pl:8088/repo/integration/DIRAC/Core/scripts/dirac-install.py' >> /var/log/dirac-context-script.log 2>&1 su dirac -c'python dirac-install -V "VMEGI"' >> /var/log/dirac-context-script.log 2>&1 - # FOR DEBUGGIN PURPOSES overwriting with last released in the local vmendez git folder: + # FOR DEBUGGIN PURPOSES overwriting with last released in the local vmendez folder: rm -rf VMDIRAC - wget --no-check-certificate -O vmdirac.zip 'https://github.com/vmendez/VMDIRAC/archive/master.zip' >> /var/log/dirac-context-script.log 2>&1 + wget --no-check-certificate -O vmdirac.zip 'http://dirac1.grid.cyfronet.pl:8088/repo/vmendez/master.zip' >> /var/log/dirac-context-script.log 2>&1 # checking if unzip installed if [ ! `which unzip` ] then diff --git a/WorkloadManagementSystem/private/bootstrap/genome-mountAWSvol-DIRAC-context.sh b/WorkloadManagementSystem/private/bootstrap/genome-mountAWSvol-DIRAC-context.sh index c289d6e8..09d60de0 100644 --- a/WorkloadManagementSystem/private/bootstrap/genome-mountAWSvol-DIRAC-context.sh +++ b/WorkloadManagementSystem/private/bootstrap/genome-mountAWSvol-DIRAC-context.sh @@ -121,16 +121,14 @@ rm -f /home/ubuntu/genome-opt.tgz >> /var/log/dirac-context-script.log 2>&1 # # Installing DIRAC -# FOR DEBUGGIN PURPOSES installing debuggin github version instead of cvmfs repository released DIRAC: # cd /opt/dirac - wget --no-check-certificate -O dirac-install 'https://github.com/DIRACGrid/DIRAC/raw/integration/Core/scripts/dirac-install.py' >> /var/log/dirac-context-script.log 2>&1 - + wget --no-check-certificate -O dirac-install 'http://dirac1.grid.cyfronet.pl:8088/repo/integration/DIRAC/Core/scripts/dirac-install.py' >> /var/log/dirac-context-script.log 2>&1 su dirac -c'python dirac-install -V "VMEGI"' >> /var/log/dirac-context-script.log 2>&1 - # FOR DEBUGGIN PURPOSES overwriting with last released in the local vmendez git folder: + # FOR DEBUGGIN PURPOSES overwriting with last released in the local vmendez folder: rm -rf VMDIRAC - wget --no-check-certificate -O vmdirac.zip 'https://github.com/vmendez/VMDIRAC/archive/master.zip' >> /var/log/dirac-context-script.log 2>&1 + wget --no-check-certificate -O vmdirac.zip 'http://dirac1.grid.cyfronet.pl:8088/repo/vmendez/master.zip' >> /var/log/dirac-context-script.log 2>&1 # checking if unzip installed if [ ! `which unzip` ] then From ce2ae4bdd0a831ca3ca3c0d69c881e34337ed8d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Thu, 26 Nov 2015 18:51:44 +0100 Subject: [PATCH 02/35] FIX: Consistent user data file management, multiple VO and deletion issues --- .../Service/VirtualMachineManagerHandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WorkloadManagementSystem/Service/VirtualMachineManagerHandler.py b/WorkloadManagementSystem/Service/VirtualMachineManagerHandler.py index c876133c..b37815b6 100644 --- a/WorkloadManagementSystem/Service/VirtualMachineManagerHandler.py +++ b/WorkloadManagementSystem/Service/VirtualMachineManagerHandler.py @@ -102,7 +102,7 @@ def haltInstances(vmList): continue imageName = imageName[ 'Value' ] - gLogger.info( 'Attemping to halt Stalled instance: %s, endpoint: %s imageName: %s' % (str(uniqueID),endpoint,imageName) ) + gLogger.info( 'Attemping to halt instance: %s, endpoint: %s imageName: %s' % (str(uniqueID),endpoint,imageName) ) if ( cloudDriver == 'occi-0.9' or cloudDriver == 'occi-0.8' or cloudDriver == 'rocci-1.1' ): oima = OcciImage( imageName, endpoint ) From c9b0414df7ba0602a98aed869ceae63bde4dc282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Fri, 4 Dec 2015 20:27:41 +0100 Subject: [PATCH 03/35] FIX: tmp in AWS SSD disk --- .../private/bootstrap/genome-mountAWSvol-DIRAC-context.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WorkloadManagementSystem/private/bootstrap/genome-mountAWSvol-DIRAC-context.sh b/WorkloadManagementSystem/private/bootstrap/genome-mountAWSvol-DIRAC-context.sh index 09d60de0..ec4022ee 100644 --- a/WorkloadManagementSystem/private/bootstrap/genome-mountAWSvol-DIRAC-context.sh +++ b/WorkloadManagementSystem/private/bootstrap/genome-mountAWSvol-DIRAC-context.sh @@ -101,6 +101,9 @@ chown dirac.dirac /mnt/dirac >> /var/log/dirac-context-script.log 2>&1 # here /opt/dirac and /opt/breakseq ad others are linked to /mnt rm -f /home/ubuntu/genome-opt.tgz >> /var/log/dirac-context-script.log 2>&1 +mkdir /mnt/tmp >> /var/log/dirac-context-script.log 2>&1 +rm -rf /tmp >> /var/log/dirac-context-script.log 2>&1 +ln -s /mnt/tmp /tmp >> /var/log/dirac-context-script.log 2>&1 # servercert/serverkey previouslly to this script copied # From e5f76d2db9c649b83c1d046b5767339855810ee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Mon, 14 Dec 2015 10:35:14 +0100 Subject: [PATCH 04/35] FIX: right and permisions --- .../private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh index 8ce9886d..8989e997 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh @@ -68,6 +68,7 @@ echo "9 $cloudDriver" >> /var/log/dirac-context-script.log 2>&1 # dirac user: /usr/sbin/useradd -m -s /bin/bash -d /opt/dirac dirac >> /var/log/dirac-context-script.log 2>&1 + chown -R dirac.dirac /opt/dirac # servercert/serverkey previouslly to this script copied # From 8731b8d2e2a53b182c04baffe8f12ea5b549ea4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Mon, 14 Dec 2015 11:32:25 +0100 Subject: [PATCH 05/35] FIX: consistency checking with unregistered VM --- WorkloadManagementSystem/DB/VirtualMachineDB.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/WorkloadManagementSystem/DB/VirtualMachineDB.py b/WorkloadManagementSystem/DB/VirtualMachineDB.py index 26ccc307..48b0c7c8 100755 --- a/WorkloadManagementSystem/DB/VirtualMachineDB.py +++ b/WorkloadManagementSystem/DB/VirtualMachineDB.py @@ -342,19 +342,16 @@ def getUniqueID( self, instanceID ): """ tableName, _validStates, idName = self.__getTypeTuple( 'Instance' ) - print instanceID - print "instanceID" - sqlQuery = "SELECT UniqueID FROM `%s` WHERE %s = %s" % ( tableName, idName, instanceID ) uniqueID = self._query( sqlQuery ) - print "uniqueID" - print uniqueID - if not uniqueID[ 'OK' ]: return uniqueID uniqueID = uniqueID[ 'Value' ] + if not uniqueID: + return S_ERROR( 'Unregistered VM, uniqueID not found' ) + return S_OK( uniqueID[ 0 ][ 0 ] ) def getInstanceID( self, uniqueID ): From 798ffe2c047091c1e914935c7214e07ca7b3252f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Mon, 14 Dec 2015 11:35:40 +0100 Subject: [PATCH 06/35] FIX: consistency checking with unregistered VM --- WorkloadManagementSystem/DB/VirtualMachineDB.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WorkloadManagementSystem/DB/VirtualMachineDB.py b/WorkloadManagementSystem/DB/VirtualMachineDB.py index 48b0c7c8..8869f49d 100755 --- a/WorkloadManagementSystem/DB/VirtualMachineDB.py +++ b/WorkloadManagementSystem/DB/VirtualMachineDB.py @@ -350,7 +350,7 @@ def getUniqueID( self, instanceID ): uniqueID = uniqueID[ 'Value' ] if not uniqueID: - return S_ERROR( 'Unregistered VM, uniqueID not found' ) + return S_ERROR( 'Unregistered VM, uniqueID not found for instanceID %s' % (instanceID) ) return S_OK( uniqueID[ 0 ][ 0 ] ) From 842346fedf93871a1964e6e200b93fddce828ddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Mon, 14 Dec 2015 11:38:43 +0100 Subject: [PATCH 07/35] FIX: consistency checking with unregistered VM --- WorkloadManagementSystem/DB/VirtualMachineDB.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WorkloadManagementSystem/DB/VirtualMachineDB.py b/WorkloadManagementSystem/DB/VirtualMachineDB.py index 8869f49d..e539dccf 100755 --- a/WorkloadManagementSystem/DB/VirtualMachineDB.py +++ b/WorkloadManagementSystem/DB/VirtualMachineDB.py @@ -350,7 +350,7 @@ def getUniqueID( self, instanceID ): uniqueID = uniqueID[ 'Value' ] if not uniqueID: - return S_ERROR( 'Unregistered VM, uniqueID not found for instanceID %s' % (instanceID) ) + return S_ERROR( ' Unregistered VM, uniqueID not found for instanceID %s' % (instanceID) ) return S_OK( uniqueID[ 0 ][ 0 ] ) From ff1ad29dee330d10825fc526cd813176ead3d71d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Tue, 29 Dec 2015 20:05:52 +0100 Subject: [PATCH 08/35] FIX: allosing nouse privateKey in aws --- WorkloadManagementSystem/Client/AmazonInstance.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/WorkloadManagementSystem/Client/AmazonInstance.py b/WorkloadManagementSystem/Client/AmazonInstance.py index e3cca914..dcf2d23f 100644 --- a/WorkloadManagementSystem/Client/AmazonInstance.py +++ b/WorkloadManagementSystem/Client/AmazonInstance.py @@ -169,14 +169,25 @@ def create_VMInstance( self, runningPodRequirements ): instanceType ) ) try: if contextMethod == 'cloudinit': - reservation = self.__vmImage.run( min_count = 1, + if ( keyName == None or keyName == 'nouse' ): + reservation = self.__vmImage.run( min_count = 1, + max_count = 1, + user_data = userdata, + instance_type = instanceType ) + else: + reservation = self.__vmImage.run( min_count = 1, max_count = 1, user_data = userdata, key_name= keyName, instance_type = instanceType ) else: #adhoc instance - reservation = self.__vmImage.run( min_count = numImages, + if ( keyName == None or keyName == 'nouse' ): + reservation = self.__vmImage.run( min_count = numImages, + max_count = 1, + instance_type = instanceType ) + else: + reservation = self.__vmImage.run( min_count = numImages, max_count = 1, key_name= keyName, instance_type = instanceType ) From 2533f421bcd6246d295725f05357e0e89c98233e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Thu, 31 Mar 2016 12:27:01 +0200 Subject: [PATCH 09/35] NEW: enmr cvmfs context setup file --- .../private/bootstrap/cvmfs-enmr-context.sh | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh diff --git a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh new file mode 100644 index 00000000..1eda8204 --- /dev/null +++ b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# +# cvmfs configuration for lhcb repository: +# to be run as root on the VM +# +# + +if [ $# -ne 1 ] +then + echo "cvmfs-LHCb-context.sh " +fi + + +mkdir /home/cache >> /var/log/cvmfs-context-script.log 2>&1 +chown cvmfs:cvmfs /home/cache >> /var/log/cvmfs-context-script.log 2>&1 + + cat</etc/cvmfs/default.local +CVMFS_CACHE_BASE=/home/cache +CVMFS_REPOSITORIES=enmr.eu +CVMFS_HTTP_PROXY=$1 +EOF + + cat</etc/cvmfs/domain.d/gridpp.ac.uk.conf +CVMFS_SERVER_URL="http://cvmfs-egi.gridpp.rl.ac.uk:8000/cvmfs/@org@.gridpp.ac.uk;http://cvmfs01.nikhef.nl/cvmfs/@org@.gridpp.ac.uk" +CVMFS_PUBLIC_KEY=/etc/cvmfs/keys/gridpp.ac.uk.pub +EOF + +# cat </etc/cvmfs/config.d/lhcb.cern.ch.local +#CVMFS_QUOTA_LIMIT=5500 +#CVMFS_QUOTA_THRESHOLD=5000 +#EOF + +# reaload configuration to activate new setup: +/sbin/service cvmfs reload >> /var/log/cvmfs-context-script.log 2>&1 +cvmfs_config showconfig >> /var/log/cvmfs-context-script.log 2>&1 + +exit 0 From 8557e17baa9085f455ce860356549e584dc83ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Thu, 31 Mar 2016 12:54:16 +0200 Subject: [PATCH 10/35] NEW: enmr cvmfs context setup file --- .../private/bootstrap/cvmfs-enmr-context.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh index 1eda8204..2f710aef 100644 --- a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh +++ b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh @@ -7,7 +7,7 @@ if [ $# -ne 1 ] then - echo "cvmfs-LHCb-context.sh " + echo "cvmfs-enmr-context.sh " fi @@ -17,6 +17,7 @@ chown cvmfs:cvmfs /home/cache >> /var/log/cvmfs-context-script.log 2>&1 cat</etc/cvmfs/default.local CVMFS_CACHE_BASE=/home/cache CVMFS_REPOSITORIES=enmr.eu +CVMFS_QUOTA_LIMIT=4000 CVMFS_HTTP_PROXY=$1 EOF From 8a3a9dc87115fc9074fe0b117b922d9668e1b320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Fri, 1 Apr 2016 23:43:13 +0200 Subject: [PATCH 11/35] NEW: enmr cvmfs context setup file --- .../private/bootstrap/cvmfs-enmr-context.sh | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh index 2f710aef..5f5a9373 100644 --- a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh +++ b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh @@ -10,29 +10,47 @@ then echo "cvmfs-enmr-context.sh " fi +rpm --import https://cvmrepo.web.cern.ch/cvmrepo/yum/RPM-GPG-KEY-CernVM +yum -y install https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm +yum -y update +yum -y install cvmfs cvmfs-config-default + -mkdir /home/cache >> /var/log/cvmfs-context-script.log 2>&1 -chown cvmfs:cvmfs /home/cache >> /var/log/cvmfs-context-script.log 2>&1 cat</etc/cvmfs/default.local +CVMFS_SERVER_URL="http://cvmfs-egi.gridpp.rl.ac.uk:8000/cvmfs/@fqrn@;http://klei.nikhef.nl:8000/cvmfs/@fqrn@;http://cvmfsrepo.lcg.triumf.ca:8000/cvmfs/@fqrn@;http://cvmfsrep.grid.sinica.edu.tw:8000/cvmfs/@fqrn@" +CVMFS_KEYS_DIR=/etc/cvmfs/keys/egi.eu +CVMFS_USE_GEOAPI=ye CVMFS_CACHE_BASE=/home/cache CVMFS_REPOSITORIES=enmr.eu CVMFS_QUOTA_LIMIT=4000 -CVMFS_HTTP_PROXY=$1 +CVMFS_HTTP_PROXY="$1" EOF - cat</etc/cvmfs/domain.d/gridpp.ac.uk.conf -CVMFS_SERVER_URL="http://cvmfs-egi.gridpp.rl.ac.uk:8000/cvmfs/@org@.gridpp.ac.uk;http://cvmfs01.nikhef.nl/cvmfs/@org@.gridpp.ac.uk" -CVMFS_PUBLIC_KEY=/etc/cvmfs/keys/gridpp.ac.uk.pub +#alternative setup +#CVMFS_SERVER_URL="http://cvmfs-egi.gridpp.rl.ac.uk:8000/cvmfs/@org@.gridpp.ac.uk;http://cvmfs01.nikhef.nl/cvmfs/@org@.gridpp.ac.uk" +#CVMFS_PUBLIC_KEY=/etc/cvmfs/keys/gridpp.ac.uk.pub + + cat</etc/fuse.conf +user_allow_other EOF -# cat </etc/cvmfs/config.d/lhcb.cern.ch.local -#CVMFS_QUOTA_LIMIT=5500 -#CVMFS_QUOTA_THRESHOLD=5000 -#EOF + cat</etc/cvmfs/keys/gridpp.ac.uk.pub +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp7C4KDvOIEVJepuAHjxE +EES1sDdohz0hiU6uvSqxVYjKVR4Y4/0I/D/zLijQI+MHR7859RN0/6fsZ3b3At3l +UbvNfqq6DN1zVjjd0xagC6SMBhSfj/iQKQSsG8MXSyiNmM8YalVHJSPqoova6CPE +EgLEjnHKTNEogTNjKBwbP2ELPLkfVoNoxxrXPSox7aln8JdgyZzZlBwm98gnFa1v +JTVAl0HQnUJ6cjMwO31wIGVMdvZ+P962t+2bPGfOCm6Ly6BusXcLoIIeez5SBerB +aHz//NSTZDbHVNPEqpoo1AQVVOo4XJmqo64jBa3G4Dr0zSda1bkZMVhsyUtjhfEB +DwIDAQAB +-----END PUBLIC KEY----- +EOF # reaload configuration to activate new setup: -/sbin/service cvmfs reload >> /var/log/cvmfs-context-script.log 2>&1 +cvmfs_config reload >> /var/log/cvmfs-context-script.log 2>&1 cvmfs_config showconfig >> /var/log/cvmfs-context-script.log 2>&1 +service autofs start >> /var/log/cvmfs-context-script.log 2>&1 +chkconfig autofs on >> /var/log/cvmfs-context-script.log 2>&1 exit 0 From e3afdf942250c3b6b10dc7cb0f160f30675195a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Fri, 1 Apr 2016 23:45:56 +0200 Subject: [PATCH 12/35] NEW: enmr cvmfs context setup file --- WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh index 5f5a9373..2a12d533 100644 --- a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh +++ b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh @@ -20,7 +20,6 @@ yum -y install cvmfs cvmfs-config-default cat</etc/cvmfs/default.local CVMFS_SERVER_URL="http://cvmfs-egi.gridpp.rl.ac.uk:8000/cvmfs/@fqrn@;http://klei.nikhef.nl:8000/cvmfs/@fqrn@;http://cvmfsrepo.lcg.triumf.ca:8000/cvmfs/@fqrn@;http://cvmfsrep.grid.sinica.edu.tw:8000/cvmfs/@fqrn@" CVMFS_KEYS_DIR=/etc/cvmfs/keys/egi.eu -CVMFS_USE_GEOAPI=ye CVMFS_CACHE_BASE=/home/cache CVMFS_REPOSITORIES=enmr.eu CVMFS_QUOTA_LIMIT=4000 From 3e9fbca38055598b9b656ace5c592acb8cf389a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Sat, 2 Apr 2016 00:29:58 +0200 Subject: [PATCH 13/35] NEW: enmr cvmfs context setup file --- .../private/bootstrap/cvmfs-enmr-context.sh | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh index 2a12d533..7be6f17a 100644 --- a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh +++ b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh @@ -10,30 +10,27 @@ then echo "cvmfs-enmr-context.sh " fi -rpm --import https://cvmrepo.web.cern.ch/cvmrepo/yum/RPM-GPG-KEY-CernVM -yum -y install https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm -yum -y update -yum -y install cvmfs cvmfs-config-default +rpm --import https://cvmrepo.web.cern.ch/cvmrepo/yum/RPM-GPG-KEY-CernVM >> /var/log/cvmfs-context-script.log 2>&1 +yum -y install https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm >> /var/log/cvmfs-context-script.log 2>&1 +#yum -y update >> /var/log/cvmfs-context-script.log 2>&1 +yum -y install cvmfs cvmfs-config-default >> /var/log/cvmfs-context-script.log 2>&1 cat</etc/cvmfs/default.local CVMFS_SERVER_URL="http://cvmfs-egi.gridpp.rl.ac.uk:8000/cvmfs/@fqrn@;http://klei.nikhef.nl:8000/cvmfs/@fqrn@;http://cvmfsrepo.lcg.triumf.ca:8000/cvmfs/@fqrn@;http://cvmfsrep.grid.sinica.edu.tw:8000/cvmfs/@fqrn@" CVMFS_KEYS_DIR=/etc/cvmfs/keys/egi.eu +#alternative setup +#CVMFS_SERVER_URL="http://cvmfs-egi.gridpp.rl.ac.uk:8000/cvmfs/@org@.gridpp.ac.uk;http://cvmfs01.nikhef.nl/cvmfs/@org@.gridpp.ac.uk" +#CVMFS_PUBLIC_KEY=/etc/cvmfs/keys/gridpp.ac.uk.pub CVMFS_CACHE_BASE=/home/cache CVMFS_REPOSITORIES=enmr.eu CVMFS_QUOTA_LIMIT=4000 CVMFS_HTTP_PROXY="$1" EOF -#alternative setup -#CVMFS_SERVER_URL="http://cvmfs-egi.gridpp.rl.ac.uk:8000/cvmfs/@org@.gridpp.ac.uk;http://cvmfs01.nikhef.nl/cvmfs/@org@.gridpp.ac.uk" -#CVMFS_PUBLIC_KEY=/etc/cvmfs/keys/gridpp.ac.uk.pub - - cat</etc/fuse.conf -user_allow_other -EOF +#alternative setup needs this: cat</etc/cvmfs/keys/gridpp.ac.uk.pub -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp7C4KDvOIEVJepuAHjxE @@ -44,6 +41,10 @@ JTVAl0HQnUJ6cjMwO31wIGVMdvZ+P962t+2bPGfOCm6Ly6BusXcLoIIeez5SBerB aHz//NSTZDbHVNPEqpoo1AQVVOo4XJmqo64jBa3G4Dr0zSda1bkZMVhsyUtjhfEB DwIDAQAB -----END PUBLIC KEY----- +EOF + + cat</etc/fuse.conf +user_allow_other EOF # reaload configuration to activate new setup: @@ -51,5 +52,6 @@ cvmfs_config reload >> /var/log/cvmfs-context-script.log 2>&1 cvmfs_config showconfig >> /var/log/cvmfs-context-script.log 2>&1 service autofs start >> /var/log/cvmfs-context-script.log 2>&1 chkconfig autofs on >> /var/log/cvmfs-context-script.log 2>&1 +cvmfs_config showconfig >> /var/log/cvmfs-context-script.log 2>&1 exit 0 From 034458931e81ef92e89d651bbcde517b789aacf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Sat, 2 Apr 2016 00:37:47 +0200 Subject: [PATCH 14/35] NEW: enmr cvmfs context setup file --- .../private/bootstrap/cvmfs-enmr-context.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh index 7be6f17a..b221756d 100644 --- a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh +++ b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh @@ -52,6 +52,6 @@ cvmfs_config reload >> /var/log/cvmfs-context-script.log 2>&1 cvmfs_config showconfig >> /var/log/cvmfs-context-script.log 2>&1 service autofs start >> /var/log/cvmfs-context-script.log 2>&1 chkconfig autofs on >> /var/log/cvmfs-context-script.log 2>&1 -cvmfs_config showconfig >> /var/log/cvmfs-context-script.log 2>&1 +cvmfs_config chksetup >> /var/log/cvmfs-context-script.log 2>&1 exit 0 From 33f7e594db4cbdff7dbb4a9469e708422a574c55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Thu, 14 Apr 2016 13:13:54 +0200 Subject: [PATCH 15/35] NEW: enmr cvmfs context setup file --- .../private/bootstrap/cvmfs-enmr-context.sh | 40 +++++++++++-------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh index b221756d..6050b460 100644 --- a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh +++ b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh @@ -12,7 +12,8 @@ fi rpm --import https://cvmrepo.web.cern.ch/cvmrepo/yum/RPM-GPG-KEY-CernVM >> /var/log/cvmfs-context-script.log 2>&1 yum -y install https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm >> /var/log/cvmfs-context-script.log 2>&1 -#yum -y update >> /var/log/cvmfs-context-script.log 2>&1 +yum -y update >> /var/log/cvmfs-context-script.log 2>&1 +echo "install cvmfs and cvmfs-config-default" >> /var/log/cvmfs-context-script.log 2>&1 yum -y install cvmfs cvmfs-config-default >> /var/log/cvmfs-context-script.log 2>&1 @@ -20,28 +21,29 @@ yum -y install cvmfs cvmfs-config-default >> /var/log/cvmfs-context-script.log 2 cat</etc/cvmfs/default.local CVMFS_SERVER_URL="http://cvmfs-egi.gridpp.rl.ac.uk:8000/cvmfs/@fqrn@;http://klei.nikhef.nl:8000/cvmfs/@fqrn@;http://cvmfsrepo.lcg.triumf.ca:8000/cvmfs/@fqrn@;http://cvmfsrep.grid.sinica.edu.tw:8000/cvmfs/@fqrn@" CVMFS_KEYS_DIR=/etc/cvmfs/keys/egi.eu -#alternative setup -#CVMFS_SERVER_URL="http://cvmfs-egi.gridpp.rl.ac.uk:8000/cvmfs/@org@.gridpp.ac.uk;http://cvmfs01.nikhef.nl/cvmfs/@org@.gridpp.ac.uk" -#CVMFS_PUBLIC_KEY=/etc/cvmfs/keys/gridpp.ac.uk.pub CVMFS_CACHE_BASE=/home/cache -CVMFS_REPOSITORIES=enmr.eu +CVMFS_REPOSITORIES=wenmr.egi.eu CVMFS_QUOTA_LIMIT=4000 CVMFS_HTTP_PROXY="$1" EOF +#alternative setup +#CVMFS_SERVER_URL="http://cvmfs-egi.gridpp.rl.ac.uk:8000/cvmfs/@org@.gridpp.ac.uk;http://cvmfs01.nikhef.nl/cvmfs/@org@.gridpp.ac.uk" +#CVMFS_PUBLIC_KEY=/etc/cvmfs/keys/gridpp.ac.uk.pub + #alternative setup needs this: - cat</etc/cvmfs/keys/gridpp.ac.uk.pub ------BEGIN PUBLIC KEY----- -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp7C4KDvOIEVJepuAHjxE -EES1sDdohz0hiU6uvSqxVYjKVR4Y4/0I/D/zLijQI+MHR7859RN0/6fsZ3b3At3l -UbvNfqq6DN1zVjjd0xagC6SMBhSfj/iQKQSsG8MXSyiNmM8YalVHJSPqoova6CPE -EgLEjnHKTNEogTNjKBwbP2ELPLkfVoNoxxrXPSox7aln8JdgyZzZlBwm98gnFa1v -JTVAl0HQnUJ6cjMwO31wIGVMdvZ+P962t+2bPGfOCm6Ly6BusXcLoIIeez5SBerB -aHz//NSTZDbHVNPEqpoo1AQVVOo4XJmqo64jBa3G4Dr0zSda1bkZMVhsyUtjhfEB -DwIDAQAB ------END PUBLIC KEY----- -EOF +# cat</etc/cvmfs/keys/gridpp.ac.uk.pub +#-----BEGIN PUBLIC KEY----- +#MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp7C4KDvOIEVJepuAHjxE +#EES1sDdohz0hiU6uvSqxVYjKVR4Y4/0I/D/zLijQI+MHR7859RN0/6fsZ3b3At3l +#UbvNfqq6DN1zVjjd0xagC6SMBhSfj/iQKQSsG8MXSyiNmM8YalVHJSPqoova6CPE +#EgLEjnHKTNEogTNjKBwbP2ELPLkfVoNoxxrXPSox7aln8JdgyZzZlBwm98gnFa1v +#JTVAl0HQnUJ6cjMwO31wIGVMdvZ+P962t+2bPGfOCm6Ly6BusXcLoIIeez5SBerB +#aHz//NSTZDbHVNPEqpoo1AQVVOo4XJmqo64jBa3G4Dr0zSda1bkZMVhsyUtjhfEB +#DwIDAQAB +#-----END PUBLIC KEY----- +#EOF cat</etc/fuse.conf user_allow_other @@ -52,6 +54,10 @@ cvmfs_config reload >> /var/log/cvmfs-context-script.log 2>&1 cvmfs_config showconfig >> /var/log/cvmfs-context-script.log 2>&1 service autofs start >> /var/log/cvmfs-context-script.log 2>&1 chkconfig autofs on >> /var/log/cvmfs-context-script.log 2>&1 -cvmfs_config chksetup >> /var/log/cvmfs-context-script.log 2>&1 +# just for testing: +#cvmfs_config chksetup >> /var/log/cvmfs-context-script.log 2>&1 +mkdir -p /cvmfs/wenmr.egi.eu +mount -t cvmfs wenmr.egi.eu /cvmfs/wenmr.egi.eu + exit 0 From 4fb64cad055eb4090b7c06ffbb795319a81b9ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Tue, 10 May 2016 10:57:34 +0200 Subject: [PATCH 16/35] NEW: enmr cvmfs context setup file --- .../private/bootstrap/cvmfs-enmr-context.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh index 6050b460..b3ef6a6d 100644 --- a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh +++ b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh @@ -57,7 +57,7 @@ chkconfig autofs on >> /var/log/cvmfs-context-script.log 2>&1 # just for testing: #cvmfs_config chksetup >> /var/log/cvmfs-context-script.log 2>&1 mkdir -p /cvmfs/wenmr.egi.eu -mount -t cvmfs wenmr.egi.eu /cvmfs/wenmr.egi.eu +mount -t cvmfs wenmr.egi.eu /cvmfs/wenmr.egi.eu >> /var/log/cvmfs-context-script.log 2>&1 exit 0 From 1728a40513b216eadddfa3ba99bf813adc2fa4a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Tue, 10 May 2016 11:06:24 +0200 Subject: [PATCH 17/35] NEW: enmr cvmfs context setup file --- WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh index b3ef6a6d..89e75f04 100644 --- a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh +++ b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh @@ -10,6 +10,7 @@ then echo "cvmfs-enmr-context.sh " fi +echo "received cvmfs_http_proxy parameter $1" >> /var/log/cvmfs-context-script.log 2>&1 rpm --import https://cvmrepo.web.cern.ch/cvmrepo/yum/RPM-GPG-KEY-CernVM >> /var/log/cvmfs-context-script.log 2>&1 yum -y install https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm >> /var/log/cvmfs-context-script.log 2>&1 yum -y update >> /var/log/cvmfs-context-script.log 2>&1 From da9bb0314530c201806ac944aa4b3c97d69b0d36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Tue, 10 May 2016 15:16:26 +0200 Subject: [PATCH 18/35] NEW: enmr cvmfs context setup file --- WorkloadManagementSystem/Client/BuildCloudinitScript.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WorkloadManagementSystem/Client/BuildCloudinitScript.py b/WorkloadManagementSystem/Client/BuildCloudinitScript.py index d31cc979..ac54d850 100644 --- a/WorkloadManagementSystem/Client/BuildCloudinitScript.py +++ b/WorkloadManagementSystem/Client/BuildCloudinitScript.py @@ -112,7 +112,7 @@ def __buildCloudinitScript( self, file.write('vmRunLogAgentURL=%s\n' % (vmRunLogAgentURL)) file.write('vmCvmfsContextURL=%s\n' % (vmCvmfsContextURL)) file.write('vmDiracContextURL=%s\n' % (vmDiracContextURL)) - file.write('cvmfs_http_proxy=%s\n' % (cvmfs_http_proxy)) + file.write('cvmfs_http_proxy=\"%s\"\n' % (cvmfs_http_proxy)) file.write('siteName=%s\n' % (siteName)) file.write('cloudDriver=%s\n' % (cloudDriver)) file.write('vmStopPolicy=%s\n' % (vmStopPolicy)) From eff94e752f02b36738a466b5f9421671912abdd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Mon, 16 May 2016 21:01:29 +0200 Subject: [PATCH 19/35] NEW: EISCAT software stack context --- .../EGI-Fedcloud-eiscat-DIRAC.context.sh | 267 ++++++++++++++++++ 1 file changed, 267 insertions(+) create mode 100644 WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh new file mode 100644 index 00000000..9c660b8a --- /dev/null +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh @@ -0,0 +1,267 @@ +#!/bin/bash +# +# dirac contextualization script +# To be run as root on VM +# + + +get_packaging_system() { + YUM_CMD=$(which yum) + APT_GET_CMD=$(which apt-get) + + if [ ! -z $YUM_CMD ] + then + echo "RedHat based" + PACKAGE_MANAGER="yum" + elif [ ! -z $APT_GET_CMD ] + then + echo "Debian based" + PACKAGE_MANAGER="apt-get" + else + echo "Package manager not implemented." + fi +} + +install_unzip() { + get_packaging_system + [ ! -z $PACKAGE_MANAGER ] && $PACKAGE_MANAGER -y update + [ ! -z $PACKAGE_MANAGER ] && $PACKAGE_MANAGER -y install unzip +} + +install_easy_install() { + get_packaging_system + [ ! -z $PACKAGE_MANAGER ] && $PACKAGE_MANAGER -y install python-setuptools +} + +install_eiscat_software_stack() { + #ubuntu based + sudo apt-add-repository -y ppa:octave/stable + sudo apt-get -y update + sudo apt-get -y install octave + cd /usr/local/bin + wget http://www.eiscat.se/raw/rtg/remtg.tgz + tar xzvf remtg.tgz + export export PATH=$PATH:/usr/local/bin/remtg + cd $OLDPWD +} + + echo "Starting dirac-context-script.sh" > /var/log/dirac-context-script.log 2>&1 + + +if [ $# -ne 9 ] +then + echo "ERROR: Given $# parameters" >> /var/log/dirac-context-script.log 2>&1 + echo " Given parameters: $@" >> /var/log/dirac-context-script.log 2>&1 + echo " Required parameters: general-DIRAC-context.sh '' '' '' '' '' '' '' '' ''" >> /var/log/dirac-context-script.log 2>&1 + exit 1 +fi + +siteName=${1} +vmStopPolicy=${2} +putCertPath=${3} +putKeyPath=${4} +localVmRunJobAgent=${5} +localVmRunVmMonitorAgent=${6} +localVmRunVmUpdaterAgent=${7} +localVmRunLogAgent=${8} +cloudDriver=${9} + +echo "Running dirac-contex.sh '' '' '' '' '' '' '' '' ''" >> /var/log/dirac-context-script.log 2>&1 +echo "1 $siteName" >> /var/log/dirac-context-script.log 2>&1 +echo "2 $vmStopPolicy" >> /var/log/dirac-context-script.log 2>&1 +echo "3 $putCertPath" >> /var/log/dirac-context-script.log 2>&1 +echo "4 $putKeyPath" >> /var/log/dirac-context-script.log 2>&1 +echo "5 $localVmRunJobAgent" >> /var/log/dirac-context-script.log 2>&1 +echo "6 $localVmRunVmMonitorAgent" >> /var/log/dirac-context-script.log 2>&1 +echo "7 $localVmRunVmUpdaterAgent" >> /var/log/dirac-context-script.log 2>&1 +echo "8 $localVmRunLogAgent" >> /var/log/dirac-context-script.log 2>&1 +echo "9 $cloudDriver" >> /var/log/dirac-context-script.log 2>&1 + +# dirac user: + /usr/sbin/useradd -m -s /bin/bash -d /opt/dirac dirac >> /var/log/dirac-context-script.log 2>&1 + chown -R dirac.dirac /opt/dirac + +# servercert/serverkey previouslly to this script copied +# + cd /opt/dirac + su dirac -c'mkdir -p etc/grid-security' >> /var/log/dirac-context-script.log 2>&1 + chmod -R 755 etc >> /var/log/dirac-context-script.log 2>&1 + mv ${putCertPath} etc/grid-security/servercert.pem >> /var/log/dirac-context-script.log 2>&1 + mv ${putKeyPath} etc/grid-security/serverkey.pem >> /var/log/dirac-context-script.log 2>&1 + + sleep 1 + + # If there is no key, is because the cert is a user proxy + if [ ! -s etc/grid-security/serverkey.pem ] + then + isproxy="Y" + diracuid=`id -u dirac` + proxyname=`echo "x509up_u${diracuid}"` + echo "User proxy: ${proxyname}" >> /var/log/dirac-context-script.log 2>&1 + mv etc/grid-security/servercert.pem /tmp/${proxyname} + chmod 600 /tmp/${proxyname} + cp /tmp/${proxyname} /tmp/x509up_u0 + chown dirac.dirac /tmp/${proxyname} + ls -l /tmp/${proxyname} >> /var/log/dirac-context-script.log 2>&1 + else + isproxy="N" + chmod 444 etc/grid-security/servercert.pem >> /var/log/dirac-context-script.log 2>&1 + chmod 400 etc/grid-security/serverkey.pem >> /var/log/dirac-context-script.log 2>&1 + fi + + + chown -R dirac:dirac etc >> /var/log/dirac-context-script.log 2>&1 + +# +# Installing EISCAT software stack +# +install_eiscat_software_stack >> /var/log/dirac-context-script.log 2>&1 + +# +# Installing DIRAC +# + cd /opt/dirac + wget --no-check-certificate -O dirac-install 'http://dirac1.grid.cyfronet.pl:8088/repo/integration/DIRAC/Core/scripts/dirac-install.py' >> /var/log/dirac-context-script.log 2>&1 + + su dirac -c'python dirac-install -V "VMEGI"' >> /var/log/dirac-context-script.log 2>&1 + + # FOR DEBUGGIN PURPOSES overwriting with last released in the local vmendez folder: + rm -rf VMDIRAC + wget --no-check-certificate -O vmdirac.zip 'http://dirac1.grid.cyfronet.pl:8088/repo/vmendez/master.zip' >> /var/log/dirac-context-script.log 2>&1 + # checking if unzip installed + if [ ! `which unzip` ] + then + install_unzip + fi + unzip vmdirac.zip >> /var/log/dirac-context-script.log 2>&1 + mv VMDIRAC-master VMDIRAC + chown -R dirac:dirac VMDIRAC + cd VMDIRAC + for i in `find . -name "*pyo"` + do + chown root:root $i + done + cd /opt/dirac + + source bashrc >> /var/log/dirac-context-script.log 2>&1 + env >> /var/log/dirac-context-script.log 2>&1 + chmod ugo+w /var/log/dirac-context-script.log + + # to the runsvdir stuff: + export PATH + export LD_LIBRARY_PATH + platform=`dirac-platform` + # for the VM Monitor + # checking if easy_install installed + if [ ! `which easy_install` ] + then + echo "easy_install not installed. Installing">> /var/log/dirac-context-script.log 2>&1 + install_easy_install + fi + echo "Installing easy_install simplejson for the VM Monitor" >> /var/log/dirac-context-script.log 2>&1 + `which python` `which easy_install` simplejson >> /var/log/dirac-context-script.log 2>&1 + # getting RunningPodRequirements + requirements='' + while read keyval + do + requirements=`echo "$requirements -o /LocalSite/$keyval"` + done > /var/log/dirac-context-script.log 2>&1 + # options H: SkipCAChecks, dd: debug level 2 + # options only for debuging D: SkipCADownload + else + #hostcert credentials (compatibility previous v6r14) + su dirac -c"source bashrc;dirac-configure -UHddd $requirements -o /LocalSite/CloudDriver=$cloudDriver -o /LocalSite/Site=$siteName -o /LocalSite/VMStopPolicy=$vmStopPolicy -o /LocalSite/CE=CE-nouse defaults-VMEGI.cfg" >> /var/log/dirac-context-script.log 2>&1 + # options H: SkipCAChecks, dd: debug level 2, U: UseServerCertificateCredentials + # options only for debuging D: SkipCADownload + # after configuration with UseServerCertificate = yes for the configuration with CS + #  we have to change to allow user proxy delegation for agents: + su dirac -c'sed "s/UseServerCertificate = yes/#UseServerCertificate = yes/" etc/dirac.cfg > dirac.cfg.aux' + fi + if [ `ls /opt/dirac/etc/grid-security/certificates | wc -l` -ne 0 ] + then + echo "certificates download in dirac-configure at retry: $retry" >> /var/log/dirac-context-script.log 2>&1 + break + fi + echo "certificates was not download in dirac-configure at retry: $retry" >> /var/log/dirac-context-script.log 2>&1 + done + su dirac -c'cp etc/dirac.cfg dirac.cfg.postconfigure' + su dirac -c'mv dirac.cfg.aux etc/dirac.cfg' + echo "etc/dirac.cfg content previous to agents run: " >> /var/log/dirac-context-script.log 2>&1 + cat etc/dirac.cfg >> /var/log/dirac-context-script.log 2>&1 + echo >> /var/log/dirac-context-script.log 2>&1 + + +# start the agents: VirtualMachineMonitor, JobAgent, VirtualMachineConfigUpdater + + cd /opt/dirac + if [ ${localVmRunJobAgent} != 'nouse' ] + then + mkdir -p startup/WorkloadManagement_JobAgent/log >> /var/log/dirac-context-script.log 2>&1 + mv ${localVmRunJobAgent} startup/WorkloadManagement_JobAgent/run >> /var/log/dirac-context-script.log 2>&1 + cp ${localVmRunLogAgent} startup/WorkloadManagement_JobAgent/log/run >> /var/log/dirac-context-script.log 2>&1 + chmod 755 startup/WorkloadManagement_JobAgent/log/run + chmod 755 startup/WorkloadManagement_JobAgent/run + + echo "rights and permissions to control and work JobAgent dirs" >> /var/log/dirac-context-script.log 2>&1 + mkdir -p /opt/dirac/control/WorkloadManagement/JobAgent >> /var/log/dirac-context-script.log 2>&1 + mkdir -p /opt/dirac/work/WorkloadManagement/JobAgent >> /var/log/dirac-context-script.log 2>&1 + chmod 775 /opt/dirac/control/WorkloadManagement/JobAgent >> /var/log/dirac-context-script.log 2>&1 + chmod 775 /opt/dirac/work/WorkloadManagement/JobAgent >> /var/log/dirac-context-script.log 2>&1 + chown root:dirac /opt/dirac/work/WorkloadManagement/JobAgent >> /var/log/dirac-context-script.log 2>&1 + chown root:dirac /opt/dirac/control/WorkloadManagement/JobAgent >> /var/log/dirac-context-script.log 2>&1 + echo "/opt/dirac/control/WorkloadManagement content" >> /var/log/dirac-context-script.log 2>&1 + ls -l /opt/dirac/control/WorkloadManagement >> /var/log/dirac-context-script.log 2>&1 + echo "/opt/dirac/work/WorkloadManagement content" >> /var/log/dirac-context-script.log 2>&1 + ls -l /opt/dirac/work/WorkloadManagement >> /var/log/dirac-context-script.log 2>&1 + echo >> /var/log/dirac-context-script.log 2>&1 + fi + + if [ ${localVmRunVmUpdaterAgent} != 'nouse' ] + then + mkdir -p startup/WorkloadManagement_VirtualMachineConfigUpdater/log >> /var/log/dirac-context-script.log 2>&1 + mv ${localVmRunVmUpdaterAgent} startup/WorkloadManagement_VirtualMachineConfigUpdater/run >> /var/log/dirac-context-script.log 2>&1 + cp ${localVmRunLogAgent} startup/WorkloadManagement_VirtualMachineConfigUpdater/log/run >> /var/log/dirac-context-script.log 2>&1 + chmod 755 startup/WorkloadManagement_VirtualMachineConfigUpdater/log/run + chmod 755 startup/WorkloadManagement_VirtualMachineConfigUpdater/run + fi + + mkdir -p startup/WorkloadManagement_VirtualMachineMonitorAgent/log >> /var/log/dirac-context-script.log 2>&1 + mv ${localVmRunVmMonitorAgent} startup/WorkloadManagement_VirtualMachineMonitorAgent/run >> /var/log/dirac-context-script.log 2>&1 + mv ${localVmRunLogAgent} startup/WorkloadManagement_VirtualMachineMonitorAgent/log/run >> /var/log/dirac-context-script.log 2>&1 + chmod 755 startup/WorkloadManagement_VirtualMachineMonitorAgent/log/run + chmod 755 startup/WorkloadManagement_VirtualMachineMonitorAgent/run + + echo "runsvdir startup, have a look to DIRAC JobAgent, VirtualMachineMonitorAgent and VirtualMachineConfigUpdater logs" >> /var/log/dirac-context-script.log 2>&1 + runsvdir -P /opt/dirac/startup 'log: DIRAC runsv' & + +# +# END installing DIRAC +# + +# avoiding ssh conection refused: +# echo "After DIRAC install:" >> /var/log/dirac-context-script.log 2>&1 +# ls -l /etc/ssh >> /var/log/dirac-context-script.log 2>&1 +# chmod 600 /etc/ssh/* >> /var/log/dirac-context-script.log 2>&1 +# chmod go+r /etc/ssh/ssh_config /etc/ssh/ssh_host_dsa_key.pub /etc/ssh/ssh_host_key.pub /etc/ssh/ssh_host_rsa_key.pub >> /var/log/dirac-context-script.log 2>&1 +# echo "After restoring rights:" >> /var/log/dirac-context-script.log 2>&1 +# ls -l /etc/ssh >> /var/log/dirac-context-script.log 2>&1 + + # + # STOPING DIRAC AGENTS: + # +# cd /opt/dirac +# killall runsvdir +# runsvctrl d startup/* +# killall runsv + + echo "END dirac-context-script.sh" >> /var/log/dirac-context-script.log 2>&1 + +exit $RETVAL From 932ae9559812bd555e03e552244d5fd95702ffbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Tue, 17 May 2016 12:31:00 +0200 Subject: [PATCH 20/35] NEW: EISCAT software stack context --- .../private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh index 9c660b8a..620e6549 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh @@ -41,7 +41,7 @@ install_eiscat_software_stack() { cd /usr/local/bin wget http://www.eiscat.se/raw/rtg/remtg.tgz tar xzvf remtg.tgz - export export PATH=$PATH:/usr/local/bin/remtg + export export PATH=/usr/local/bin/remtg:$PATH cd $OLDPWD } From c5588d2abce27b6fd3f68855b044785162afe186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Tue, 17 May 2016 16:01:19 +0200 Subject: [PATCH 21/35] NEW: EISCAT software stack context --- .../private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh index 620e6549..c89f3181 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh @@ -41,6 +41,7 @@ install_eiscat_software_stack() { cd /usr/local/bin wget http://www.eiscat.se/raw/rtg/remtg.tgz tar xzvf remtg.tgz + chmod -R root:root remtg export export PATH=/usr/local/bin/remtg:$PATH cd $OLDPWD } From 4d2ac030d6e5e68756c8a1299ad8693c40709ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Tue, 17 May 2016 16:32:19 +0200 Subject: [PATCH 22/35] NEW: EISCAT software stack context --- .../private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh index c89f3181..fcdf2079 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh @@ -41,7 +41,7 @@ install_eiscat_software_stack() { cd /usr/local/bin wget http://www.eiscat.se/raw/rtg/remtg.tgz tar xzvf remtg.tgz - chmod -R root:root remtg + chmod -R dirac:dirac remtg export export PATH=/usr/local/bin/remtg:$PATH cd $OLDPWD } From 912a1239eb547ef1759d1232e04d4d0a43cf86ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Tue, 17 May 2016 16:48:59 +0200 Subject: [PATCH 23/35] NEW: EISCAT software stack context --- .../private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh index fcdf2079..0c6183b9 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh @@ -41,7 +41,7 @@ install_eiscat_software_stack() { cd /usr/local/bin wget http://www.eiscat.se/raw/rtg/remtg.tgz tar xzvf remtg.tgz - chmod -R dirac:dirac remtg + chown -R dirac:dirac remtg export export PATH=/usr/local/bin/remtg:$PATH cd $OLDPWD } From 5aadf4af55b646d11002aaedfa9156c46a0b15ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Tue, 17 May 2016 20:04:41 +0200 Subject: [PATCH 24/35] NEW: EISCAT software stack context --- .../private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh index 0c6183b9..f36a3a89 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh @@ -39,7 +39,9 @@ install_eiscat_software_stack() { sudo apt-get -y update sudo apt-get -y install octave cd /usr/local/bin - wget http://www.eiscat.se/raw/rtg/remtg.tgz + wget http://dirac1.grid.cyfronet.pl:8088/repo/remtg.tgz + #eiscat CVS + #wget http://www.eiscat.se/raw/rtg/remtg.tgz tar xzvf remtg.tgz chown -R dirac:dirac remtg export export PATH=/usr/local/bin/remtg:$PATH From 1af36ac30df0a1800e682e04124d54cf2222d1a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Thu, 26 May 2016 12:48:32 +0200 Subject: [PATCH 25/35] NEW: ENMR cvfms vo software stack context --- WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh index 89e75f04..e37a25af 100644 --- a/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh +++ b/WorkloadManagementSystem/private/bootstrap/cvmfs-enmr-context.sh @@ -59,6 +59,7 @@ chkconfig autofs on >> /var/log/cvmfs-context-script.log 2>&1 #cvmfs_config chksetup >> /var/log/cvmfs-context-script.log 2>&1 mkdir -p /cvmfs/wenmr.egi.eu mount -t cvmfs wenmr.egi.eu /cvmfs/wenmr.egi.eu >> /var/log/cvmfs-context-script.log 2>&1 +export VO_ENMR_EU_SW_DIR=/cvmfs/wenmr.egi.eu exit 0 From 03f70bf7415b95b9d5e35138a3c8a72de34a1119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Thu, 26 May 2016 17:13:35 +0200 Subject: [PATCH 26/35] tunning default min average load --- WorkloadManagementSystem/Agent/VirtualMachineMonitorAgent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WorkloadManagementSystem/Agent/VirtualMachineMonitorAgent.py b/WorkloadManagementSystem/Agent/VirtualMachineMonitorAgent.py index 324b9c1f..d7ddac30 100644 --- a/WorkloadManagementSystem/Agent/VirtualMachineMonitorAgent.py +++ b/WorkloadManagementSystem/Agent/VirtualMachineMonitorAgent.py @@ -122,7 +122,7 @@ def __getCSConfig( self ): return S_ERROR( "/LocalSite/VirtualMachineName is not defined" ) #Variables coming from the vm imgPath = "/Resources/VirtualMachines/RunningPods/%s" % self.runningPod - for csOption, csDefault, varName in ( ( "MinWorkingLoad", 0.01, "vmMinWorkingLoad" ), + for csOption, csDefault, varName in ( ( "MinWorkingLoad", 0.03, "vmMinWorkingLoad" ), ( "LoadAverageTimespan", 60, "vmLoadAvgTimespan" ), ( "HaltPeriod", 600, "haltPeriod" ), ( "HaltBeforeMargin", 300, "haltBeforeMargin" ), From 215b732af14af5ab5ee11d24a9e98bdd6aeeaf17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Fri, 27 May 2016 16:03:12 +0200 Subject: [PATCH 27/35] cloud context to Tag matching --- .../bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh | 11 +++++++++++ .../bootstrap/EGI-Fedcloud-general-DIRAC.context.sh | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh index f36a3a89..57fae939 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh @@ -197,6 +197,17 @@ install_eiscat_software_stack >> /var/log/dirac-context-script.log 2>&1 done su dirac -c'cp etc/dirac.cfg dirac.cfg.postconfigure' su dirac -c'mv dirac.cfg.aux etc/dirac.cfg' + # Allways job whole node (grid multi core Tag compatibility + su dirac -c'echo "Resources" >> etc/dirac.cfg' + su dirac -c'echo "{" >> etc/dirac.cfg' + su dirac -c'echo " Computing" >> etc/dirac.cfg' + su dirac -c'echo " {" >> etc/dirac.cfg' + su dirac -c'echo " CEDefaults" >> etc/dirac.cfg' + su dirac -c'echo " {" >> etc/dirac.cfg' + su dirac -c'echo " Tag = WholeNode" >> etc/dirac.cfg' + su dirac -c'echo " }" >> etc/dirac.cfg' + su dirac -c'echo " }" >> etc/dirac.cfg' + su dirac -c'echo "}" >> etc/dirac.cfg' echo "etc/dirac.cfg content previous to agents run: " >> /var/log/dirac-context-script.log 2>&1 cat etc/dirac.cfg >> /var/log/dirac-context-script.log 2>&1 echo >> /var/log/dirac-context-script.log 2>&1 diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh index 8989e997..963c1c9b 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh @@ -178,6 +178,17 @@ echo "9 $cloudDriver" >> /var/log/dirac-context-script.log 2>&1 done su dirac -c'cp etc/dirac.cfg dirac.cfg.postconfigure' su dirac -c'mv dirac.cfg.aux etc/dirac.cfg' + # Allways job whole node (grid multi core Tag compatibility + su dirac -c'echo "Resources" >> etc/dirac.cfg' + su dirac -c'echo "{" >> etc/dirac.cfg' + su dirac -c'echo " Computing" >> etc/dirac.cfg' + su dirac -c'echo " {" >> etc/dirac.cfg' + su dirac -c'echo " CEDefaults" >> etc/dirac.cfg' + su dirac -c'echo " {" >> etc/dirac.cfg' + su dirac -c'echo " Tag = WholeNode" >> etc/dirac.cfg' + su dirac -c'echo " }" >> etc/dirac.cfg' + su dirac -c'echo " }" >> etc/dirac.cfg' + su dirac -c'echo "}" >> etc/dirac.cfg' echo "etc/dirac.cfg content previous to agents run: " >> /var/log/dirac-context-script.log 2>&1 cat etc/dirac.cfg >> /var/log/dirac-context-script.log 2>&1 echo >> /var/log/dirac-context-script.log 2>&1 From 443dcda7b649380e1dd7596bf0227a286889c4b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Sun, 29 May 2016 20:02:38 +0200 Subject: [PATCH 28/35] merging --- .../EGI-Fedcloud-general-DIRAC.context.sh | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh index 963c1c9b..1c019808 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh @@ -147,8 +147,13 @@ echo "9 $cloudDriver" >> /var/log/dirac-context-script.log 2>&1 # getting RunningPodRequirements requirements='' while read keyval - do - requirements=`echo "$requirements -o /LocalSite/$keyval"` + do + if [ `echo $keyval | grep '^Tag' ` ] + then + # Tag is going to another section + continue + fi + requirements=`echo "$requirements -o /LocalSite/$keyval"` done > /var/log/dirac-context-script.log 2>&1 done su dirac -c'cp etc/dirac.cfg dirac.cfg.postconfigure' su dirac -c'mv dirac.cfg.aux etc/dirac.cfg' - # Allways job whole node (grid multi core Tag compatibility - su dirac -c'echo "Resources" >> etc/dirac.cfg' - su dirac -c'echo "{" >> etc/dirac.cfg' - su dirac -c'echo " Computing" >> etc/dirac.cfg' - su dirac -c'echo " {" >> etc/dirac.cfg' - su dirac -c'echo " CEDefaults" >> etc/dirac.cfg' - su dirac -c'echo " {" >> etc/dirac.cfg' - su dirac -c'echo " Tag = WholeNode" >> etc/dirac.cfg' - su dirac -c'echo " }" >> etc/dirac.cfg' - su dirac -c'echo " }" >> etc/dirac.cfg' - su dirac -c'echo "}" >> etc/dirac.cfg' + if [ `cat /root/LocalSiteRequirements | grep '^Tag' ` ] + then + # Tag is going to Resource Computing CE section + su dirac -c'echo "Resources" >> etc/dirac.cfg' + su dirac -c'echo "{" >> etc/dirac.cfg' + su dirac -c'echo " Computing" >> etc/dirac.cfg' + su dirac -c'echo " {" >> etc/dirac.cfg' + su dirac -c'echo " CEDefaults" >> etc/dirac.cfg' + su dirac -c'echo " {" >> etc/dirac.cfg' + su dirac -c'echo " Tag = WholeNode" >> etc/dirac.cfg' + su dirac -c'echo " }" >> etc/dirac.cfg' + su dirac -c'echo " }" >> etc/dirac.cfg' + su dirac -c'echo "}" >> etc/dirac.cfg' + fi echo "etc/dirac.cfg content previous to agents run: " >> /var/log/dirac-context-script.log 2>&1 cat etc/dirac.cfg >> /var/log/dirac-context-script.log 2>&1 echo >> /var/log/dirac-context-script.log 2>&1 From 7be558dbe775841a6262c9acf7c3e19d95152c7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Sun, 29 May 2016 20:08:06 +0200 Subject: [PATCH 29/35] Tag LocalSite is going to Resources/Computing/CE section --- .../EGI-Fedcloud-eiscat-DIRAC.context.sh | 35 ++++++++++++------- .../EGI-Fedcloud-general-DIRAC.context.sh | 31 ++++++++-------- 2 files changed, 40 insertions(+), 26 deletions(-) diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh index 57fae939..29aac586 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh @@ -167,7 +167,12 @@ install_eiscat_software_stack >> /var/log/dirac-context-script.log 2>&1 requirements='' while read keyval do - requirements=`echo "$requirements -o /LocalSite/$keyval"` + if [ `echo $keyval | grep '^Tag' ` ] + then + # Tag is going to another section + continue + fi + requirements=`echo "$requirements -o /LocalSite/$keyval"` done > /var/log/dirac-context-script.log 2>&1 done su dirac -c'cp etc/dirac.cfg dirac.cfg.postconfigure' su dirac -c'mv dirac.cfg.aux etc/dirac.cfg' - # Allways job whole node (grid multi core Tag compatibility - su dirac -c'echo "Resources" >> etc/dirac.cfg' - su dirac -c'echo "{" >> etc/dirac.cfg' - su dirac -c'echo " Computing" >> etc/dirac.cfg' - su dirac -c'echo " {" >> etc/dirac.cfg' - su dirac -c'echo " CEDefaults" >> etc/dirac.cfg' - su dirac -c'echo " {" >> etc/dirac.cfg' - su dirac -c'echo " Tag = WholeNode" >> etc/dirac.cfg' - su dirac -c'echo " }" >> etc/dirac.cfg' - su dirac -c'echo " }" >> etc/dirac.cfg' - su dirac -c'echo "}" >> etc/dirac.cfg' + while read keyval + do + if [ `echo $keyval | grep '^Tag' ` ] + then + # Tag is going to Resource Computing CE section + su dirac -c'echo "Resources" >> etc/dirac.cfg' + su dirac -c'echo "{" >> etc/dirac.cfg' + su dirac -c'echo " Computing" >> etc/dirac.cfg' + su dirac -c'echo " {" >> etc/dirac.cfg' + su dirac -c'echo " CEDefaults" >> etc/dirac.cfg' + su dirac -c'echo " {" >> etc/dirac.cfg' + su dirac -c'echo " ${keyval}" >> etc/dirac.cfg' + su dirac -c'echo " }" >> etc/dirac.cfg' + su dirac -c'echo " }" >> etc/dirac.cfg' + su dirac -c'echo "}" >> etc/dirac.cfg' + fi + done > /var/log/dirac-context-script.log 2>&1 cat etc/dirac.cfg >> /var/log/dirac-context-script.log 2>&1 echo >> /var/log/dirac-context-script.log 2>&1 diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh index 1c019808..956c05ba 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh @@ -183,20 +183,23 @@ echo "9 $cloudDriver" >> /var/log/dirac-context-script.log 2>&1 done su dirac -c'cp etc/dirac.cfg dirac.cfg.postconfigure' su dirac -c'mv dirac.cfg.aux etc/dirac.cfg' - if [ `cat /root/LocalSiteRequirements | grep '^Tag' ` ] - then - # Tag is going to Resource Computing CE section - su dirac -c'echo "Resources" >> etc/dirac.cfg' - su dirac -c'echo "{" >> etc/dirac.cfg' - su dirac -c'echo " Computing" >> etc/dirac.cfg' - su dirac -c'echo " {" >> etc/dirac.cfg' - su dirac -c'echo " CEDefaults" >> etc/dirac.cfg' - su dirac -c'echo " {" >> etc/dirac.cfg' - su dirac -c'echo " Tag = WholeNode" >> etc/dirac.cfg' - su dirac -c'echo " }" >> etc/dirac.cfg' - su dirac -c'echo " }" >> etc/dirac.cfg' - su dirac -c'echo "}" >> etc/dirac.cfg' - fi + while read keyval + do + if [ `echo $keyval | grep '^Tag' ` ] + then + # Tag is going to Resource Computing CE section + su dirac -c'echo "Resources" >> etc/dirac.cfg' + su dirac -c'echo "{" >> etc/dirac.cfg' + su dirac -c'echo " Computing" >> etc/dirac.cfg' + su dirac -c'echo " {" >> etc/dirac.cfg' + su dirac -c'echo " CEDefaults" >> etc/dirac.cfg' + su dirac -c'echo " {" >> etc/dirac.cfg' + su dirac -c'echo " ${keyval}" >> etc/dirac.cfg' + su dirac -c'echo " }" >> etc/dirac.cfg' + su dirac -c'echo " }" >> etc/dirac.cfg' + su dirac -c'echo "}" >> etc/dirac.cfg' + fi + done > /var/log/dirac-context-script.log 2>&1 cat etc/dirac.cfg >> /var/log/dirac-context-script.log 2>&1 echo >> /var/log/dirac-context-script.log 2>&1 From 6ee5b32df278f8d50d9beb844d4214b644665f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Sun, 29 May 2016 20:36:58 +0200 Subject: [PATCH 30/35] merging --- .../private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh | 3 ++- .../private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh index 29aac586..cf346169 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh @@ -213,7 +213,8 @@ install_eiscat_software_stack >> /var/log/dirac-context-script.log 2>&1 su dirac -c'echo " {" >> etc/dirac.cfg' su dirac -c'echo " CEDefaults" >> etc/dirac.cfg' su dirac -c'echo " {" >> etc/dirac.cfg' - su dirac -c'echo " ${keyval}" >> etc/dirac.cfg' + su dirac -c'echo -n " " >> etc/dirac.cfg' + su dirac -c'echo $keyval >> etc/dirac.cfg' su dirac -c'echo " }" >> etc/dirac.cfg' su dirac -c'echo " }" >> etc/dirac.cfg' su dirac -c'echo "}" >> etc/dirac.cfg' diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh index 956c05ba..cc54b881 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh @@ -194,7 +194,8 @@ echo "9 $cloudDriver" >> /var/log/dirac-context-script.log 2>&1 su dirac -c'echo " {" >> etc/dirac.cfg' su dirac -c'echo " CEDefaults" >> etc/dirac.cfg' su dirac -c'echo " {" >> etc/dirac.cfg' - su dirac -c'echo " ${keyval}" >> etc/dirac.cfg' + su dirac -c'echo -n " " >> etc/dirac.cfg' + su dirac -c'echo $keyval >> etc/dirac.cfg' su dirac -c'echo " }" >> etc/dirac.cfg' su dirac -c'echo " }" >> etc/dirac.cfg' su dirac -c'echo "}" >> etc/dirac.cfg' From 065d633b0c2da797c80cb03fb561fb30fbad467b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Sun, 29 May 2016 21:38:00 +0200 Subject: [PATCH 31/35] Tag LocalSite is going to Resources/Computing/CE section --- .../EGI-Fedcloud-eiscat-DIRAC.context.sh | 40 ++++++++-------- .../EGI-Fedcloud-general-DIRAC.context.sh | 48 +++++++++---------- 2 files changed, 42 insertions(+), 46 deletions(-) diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh index cf346169..b5a277a3 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh @@ -165,14 +165,15 @@ install_eiscat_software_stack >> /var/log/dirac-context-script.log 2>&1 `which python` `which easy_install` simplejson >> /var/log/dirac-context-script.log 2>&1 # getting RunningPodRequirements requirements='' + tagval='' while read keyval do if [ `echo $keyval | grep '^Tag' ` ] then - # Tag is going to another section - continue + tagval=$keyval + else + requirements=`echo "$requirements -o /LocalSite/$keyval"` fi - requirements=`echo "$requirements -o /LocalSite/$keyval"` done > /var/log/dirac-context-script.log 2>&1 done su dirac -c'cp etc/dirac.cfg dirac.cfg.postconfigure' su dirac -c'mv dirac.cfg.aux etc/dirac.cfg' - while read keyval - do - if [ `echo $keyval | grep '^Tag' ` ] - then - # Tag is going to Resource Computing CE section - su dirac -c'echo "Resources" >> etc/dirac.cfg' - su dirac -c'echo "{" >> etc/dirac.cfg' - su dirac -c'echo " Computing" >> etc/dirac.cfg' - su dirac -c'echo " {" >> etc/dirac.cfg' - su dirac -c'echo " CEDefaults" >> etc/dirac.cfg' - su dirac -c'echo " {" >> etc/dirac.cfg' - su dirac -c'echo -n " " >> etc/dirac.cfg' - su dirac -c'echo $keyval >> etc/dirac.cfg' - su dirac -c'echo " }" >> etc/dirac.cfg' - su dirac -c'echo " }" >> etc/dirac.cfg' - su dirac -c'echo "}" >> etc/dirac.cfg' - fi - done > etc/dirac.cfg' + su dirac -c'echo "{" >> etc/dirac.cfg' + su dirac -c'echo " Computing" >> etc/dirac.cfg' + su dirac -c'echo " {" >> etc/dirac.cfg' + su dirac -c'echo " CEDefaults" >> etc/dirac.cfg' + su dirac -c'echo " {" >> etc/dirac.cfg' + su dirac -c'echo -n " " >> etc/dirac.cfg' + su dirac -c'echo "$tagval" >> etc/dirac.cfg' + su dirac -c'echo " }" >> etc/dirac.cfg' + su dirac -c'echo " }" >> etc/dirac.cfg' + su dirac -c'echo "}" >> etc/dirac.cfg' + fi echo "etc/dirac.cfg content previous to agents run: " >> /var/log/dirac-context-script.log 2>&1 cat etc/dirac.cfg >> /var/log/dirac-context-script.log 2>&1 echo >> /var/log/dirac-context-script.log 2>&1 diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh index cc54b881..cf860d7e 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh @@ -146,14 +146,15 @@ echo "9 $cloudDriver" >> /var/log/dirac-context-script.log 2>&1 `which python` `which easy_install` simplejson >> /var/log/dirac-context-script.log 2>&1 # getting RunningPodRequirements requirements='' + tagval='' while read keyval - do - if [ `echo $keyval | grep '^Tag' ` ] - then - # Tag is going to another section - continue - fi - requirements=`echo "$requirements -o /LocalSite/$keyval"` + do + if [ `echo $keyval | grep '^Tag' ` ] + then + tagval=$keyval + else + requirements=`echo "$requirements -o /LocalSite/$keyval"` + fi done > /var/log/dirac-context-script.log 2>&1 done su dirac -c'cp etc/dirac.cfg dirac.cfg.postconfigure' su dirac -c'mv dirac.cfg.aux etc/dirac.cfg' - while read keyval - do - if [ `echo $keyval | grep '^Tag' ` ] - then - # Tag is going to Resource Computing CE section - su dirac -c'echo "Resources" >> etc/dirac.cfg' - su dirac -c'echo "{" >> etc/dirac.cfg' - su dirac -c'echo " Computing" >> etc/dirac.cfg' - su dirac -c'echo " {" >> etc/dirac.cfg' - su dirac -c'echo " CEDefaults" >> etc/dirac.cfg' - su dirac -c'echo " {" >> etc/dirac.cfg' - su dirac -c'echo -n " " >> etc/dirac.cfg' - su dirac -c'echo $keyval >> etc/dirac.cfg' - su dirac -c'echo " }" >> etc/dirac.cfg' - su dirac -c'echo " }" >> etc/dirac.cfg' - su dirac -c'echo "}" >> etc/dirac.cfg' - fi - done > etc/dirac.cfg' + su dirac -c'echo "{" >> etc/dirac.cfg' + su dirac -c'echo " Computing" >> etc/dirac.cfg' + su dirac -c'echo " {" >> etc/dirac.cfg' + su dirac -c'echo " CEDefaults" >> etc/dirac.cfg' + su dirac -c'echo " {" >> etc/dirac.cfg' + su dirac -c'echo -n " " >> etc/dirac.cfg' + su dirac -c'echo "$tagval" >> etc/dirac.cfg' + su dirac -c'echo " }" >> etc/dirac.cfg' + su dirac -c'echo " }" >> etc/dirac.cfg' + su dirac -c'echo "}" >> etc/dirac.cfg' + fi echo "etc/dirac.cfg content previous to agents run: " >> /var/log/dirac-context-script.log 2>&1 cat etc/dirac.cfg >> /var/log/dirac-context-script.log 2>&1 echo >> /var/log/dirac-context-script.log 2>&1 From 336669b8b9dbee271671e06acfcf09e06d0475d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Sun, 29 May 2016 21:45:56 +0200 Subject: [PATCH 32/35] Tag LocalSite is going to Resources/Computing/CE section --- .../private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh | 2 +- .../private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh index b5a277a3..af691e5b 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh @@ -203,7 +203,7 @@ install_eiscat_software_stack >> /var/log/dirac-context-script.log 2>&1 done su dirac -c'cp etc/dirac.cfg dirac.cfg.postconfigure' su dirac -c'mv dirac.cfg.aux etc/dirac.cfg' - if [ -n "$tagval" ]; then + if [ -n "$tagval" ] then # Tag is going to Resource Computing CE section su dirac -c'echo "Resources" >> etc/dirac.cfg' diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh index cf860d7e..7a04789f 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh @@ -184,7 +184,7 @@ echo "9 $cloudDriver" >> /var/log/dirac-context-script.log 2>&1 done su dirac -c'cp etc/dirac.cfg dirac.cfg.postconfigure' su dirac -c'mv dirac.cfg.aux etc/dirac.cfg' - if [ -n "$tagval" ]; then + if [ -n "$tagval" ] then # Tag is going to Resource Computing CE section su dirac -c'echo "Resources" >> etc/dirac.cfg' From 2e56022ae7c62d7e8802bd4c803d4a0a7cedf8fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Sun, 29 May 2016 22:38:57 +0200 Subject: [PATCH 33/35] Tag LocalSite is going to Resources/Computing/CE section --- .../bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh | 10 +++++----- .../bootstrap/EGI-Fedcloud-general-DIRAC.context.sh | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh index af691e5b..2315c703 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh @@ -165,12 +165,12 @@ install_eiscat_software_stack >> /var/log/dirac-context-script.log 2>&1 `which python` `which easy_install` simplejson >> /var/log/dirac-context-script.log 2>&1 # getting RunningPodRequirements requirements='' - tagval='' + export TAGVAL='' while read keyval - do + do if [ `echo $keyval | grep '^Tag' ` ] then - tagval=$keyval + export TAGVAL=$keyval else requirements=`echo "$requirements -o /LocalSite/$keyval"` fi @@ -203,7 +203,7 @@ install_eiscat_software_stack >> /var/log/dirac-context-script.log 2>&1 done su dirac -c'cp etc/dirac.cfg dirac.cfg.postconfigure' su dirac -c'mv dirac.cfg.aux etc/dirac.cfg' - if [ -n "$tagval" ] + if [ -n "$TAGVAL" ] then # Tag is going to Resource Computing CE section su dirac -c'echo "Resources" >> etc/dirac.cfg' @@ -213,7 +213,7 @@ install_eiscat_software_stack >> /var/log/dirac-context-script.log 2>&1 su dirac -c'echo " CEDefaults" >> etc/dirac.cfg' su dirac -c'echo " {" >> etc/dirac.cfg' su dirac -c'echo -n " " >> etc/dirac.cfg' - su dirac -c'echo "$tagval" >> etc/dirac.cfg' + su dirac -c'echo "$TAGVAL" >> etc/dirac.cfg' su dirac -c'echo " }" >> etc/dirac.cfg' su dirac -c'echo " }" >> etc/dirac.cfg' su dirac -c'echo "}" >> etc/dirac.cfg' diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh index 7a04789f..30db3bcd 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-general-DIRAC.context.sh @@ -146,12 +146,12 @@ echo "9 $cloudDriver" >> /var/log/dirac-context-script.log 2>&1 `which python` `which easy_install` simplejson >> /var/log/dirac-context-script.log 2>&1 # getting RunningPodRequirements requirements='' - tagval='' + export TAGVAL='' while read keyval do if [ `echo $keyval | grep '^Tag' ` ] then - tagval=$keyval + export TAGVAL=$keyval else requirements=`echo "$requirements -o /LocalSite/$keyval"` fi @@ -184,7 +184,7 @@ echo "9 $cloudDriver" >> /var/log/dirac-context-script.log 2>&1 done su dirac -c'cp etc/dirac.cfg dirac.cfg.postconfigure' su dirac -c'mv dirac.cfg.aux etc/dirac.cfg' - if [ -n "$tagval" ] + if [ -n "$TAGVAL" ] then # Tag is going to Resource Computing CE section su dirac -c'echo "Resources" >> etc/dirac.cfg' @@ -194,7 +194,7 @@ echo "9 $cloudDriver" >> /var/log/dirac-context-script.log 2>&1 su dirac -c'echo " CEDefaults" >> etc/dirac.cfg' su dirac -c'echo " {" >> etc/dirac.cfg' su dirac -c'echo -n " " >> etc/dirac.cfg' - su dirac -c'echo "$tagval" >> etc/dirac.cfg' + su dirac -c'echo "$TAGVAL" >> etc/dirac.cfg' su dirac -c'echo " }" >> etc/dirac.cfg' su dirac -c'echo " }" >> etc/dirac.cfg' su dirac -c'echo "}" >> etc/dirac.cfg' From 718dda7f963cd45c05190e7cbd90606a1b8dacae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Mon, 13 Jun 2016 15:45:55 +0200 Subject: [PATCH 34/35] addin RequiredTag for jobAgent to fit v6r15p2 --- .../EGI-Fedcloud-eiscat-DIRAC.context.sh | 10 ++++++---- .../EGI-Fedcloud-general-DIRAC.context.sh | 20 +++---------------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh index 2315c703..0e0aeabd 100644 --- a/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh +++ b/WorkloadManagementSystem/private/bootstrap/EGI-Fedcloud-eiscat-DIRAC.context.sh @@ -165,16 +165,18 @@ install_eiscat_software_stack >> /var/log/dirac-context-script.log 2>&1 `which python` `which easy_install` simplejson >> /var/log/dirac-context-script.log 2>&1 # getting RunningPodRequirements requirements='' - export TAGVAL='' while read keyval do if [ `echo $keyval | grep '^Tag' ` ] then - export TAGVAL=$keyval - else - requirements=`echo "$requirements -o /LocalSite/$keyval"` + tagval=`echo $keyval|cut -f2 -d"="` + requirements=`echo "$requirements -o /Resources/Computing/CEDefaults/Tag=$tagval"` + requirements=`echo "$requirements -o /AgentJobRequirements/RequiredTag=$tagval"` + else + requirements=`echo "$requirements -o /LocalSite/$keyval"` fi done > /var/log/dirac-context-script.log 2>&1 `which python` `which easy_install` simplejson >> /var/log/dirac-context-script.log 2>&1 # getting RunningPodRequirements requirements='' - export TAGVAL='' while read keyval do if [ `echo $keyval | grep '^Tag' ` ] then - export TAGVAL=$keyval + tagval=`echo $keyval|cut -f2 -d"="` + requirements=`echo "$requirements -o /Resources/Computing/CEDefaults/Tag=$tagval"` + requirements=`echo "$requirements -o /AgentJobRequirements/RequiredTag=$tagval"` else requirements=`echo "$requirements -o /LocalSite/$keyval"` fi @@ -184,21 +185,6 @@ echo "9 $cloudDriver" >> /var/log/dirac-context-script.log 2>&1 done su dirac -c'cp etc/dirac.cfg dirac.cfg.postconfigure' su dirac -c'mv dirac.cfg.aux etc/dirac.cfg' - if [ -n "$TAGVAL" ] - then - # Tag is going to Resource Computing CE section - su dirac -c'echo "Resources" >> etc/dirac.cfg' - su dirac -c'echo "{" >> etc/dirac.cfg' - su dirac -c'echo " Computing" >> etc/dirac.cfg' - su dirac -c'echo " {" >> etc/dirac.cfg' - su dirac -c'echo " CEDefaults" >> etc/dirac.cfg' - su dirac -c'echo " {" >> etc/dirac.cfg' - su dirac -c'echo -n " " >> etc/dirac.cfg' - su dirac -c'echo "$TAGVAL" >> etc/dirac.cfg' - su dirac -c'echo " }" >> etc/dirac.cfg' - su dirac -c'echo " }" >> etc/dirac.cfg' - su dirac -c'echo "}" >> etc/dirac.cfg' - fi echo "etc/dirac.cfg content previous to agents run: " >> /var/log/dirac-context-script.log 2>&1 cat etc/dirac.cfg >> /var/log/dirac-context-script.log 2>&1 echo >> /var/log/dirac-context-script.log 2>&1 From 093be5134a4e596e8b8b365674ece47cadbde551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20M=C3=A9ndez?= Date: Mon, 13 Jun 2016 16:04:41 +0200 Subject: [PATCH 35/35] new Tag for multicore, gpus.. integrated with DIRAC v6r15p2 --- release.notes | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/release.notes b/release.notes index d306f7cb..dad39984 100644 --- a/release.notes +++ b/release.notes @@ -1,3 +1,8 @@ +[rel-v1r5] +NEW: New Tag logic, tested with v6r15p2 +NEW: cvmfs for enrmr VO (non CERN LHC repos) +Minor bugfixes + [rel-v1r4] NEW: A image can have different bootImageName and Flavor depending in the cloud endpoint NEW: Try to halt a VM when declared Stalled, if success then go Halt status