Skip to content

Instantly share code, notes, and snippets.

@berghaus
berghaus / LocalComputingElement.py
Last active August 29, 2015 14:08
Allow DIRAC to handle large lists of jobs by breaking the list into manageable chunks.
def _getJobStatus( self, jobIDList ):
""" Get the status information for the given list of jobs
"""
resultDict = {}
jobDict = {}
#for job in jobIDList:
stdout = ''
stderr = ''
from DIRAC.Core.Utilities.List import breakListIntoChunks
@berghaus
berghaus / consistency_check.sh
Last active August 29, 2015 13:59
Bash script to check for consistency between instances registered in nova, managed by cloud scheduler, and advertising to HTCondor.
#!/bin/bash
#
# Check whether servers booted on gridpp-imperial match between nova, cloud scheduler, and condor
# lists any inconsistencies.
#
LOG_FILE=/var/log/cloud_cleanup.log
E_BADARGS=85
if [ ! -n "$1" ]
@berghaus
berghaus / puppet.conf-atlas
Created November 20, 2013 23:49
Puppet agent configuration for ATLAS batch nodes
[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet
# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet
# Where SSL certificates are kept.
@berghaus
berghaus / belle_csnode.pp
Created October 24, 2013 23:18
Cloud scheduler VM contextualization for Belle2 experiment using the atlasgce_module's belle branch.
class {'gce_node':
head => 'to.be.contextualized.by.cloud.scheduler',
role => 'csnode',
use_cvmfs => true,
condor_use_gsi => true,
condor_slots => 32,
use_xrootd => false,
cvmfs_domain_servers => "http://cvmfs-stratum1-kit.gridka.de/cvmfs/belle;http://cvmfs-stratum-one.cern.ch/opt/belle",
use_apf => false,
condor_vmtype => 'cernvm-batch-node-2.7.2-x86_64',
@berghaus
berghaus / csnode_config.pp
Last active December 24, 2015 03:09
Cloud Scheduler puppet manifest.
class { 'gce_node':
head => 'to.be.contextualized.by.cloud.scheduler',
role => 'csnode',
use_cvmfs => true,
condor_pool_password => undef,
condor_use_gsi => true,
condor_slots => $processorcount,
use_xrootd => false,
condor_vmtype => 'cernvm-batch-node-2.7.2-x86_64',
condor_homedir => '/scratch',