Skip to content

Commit

Permalink
Merge pull request #12 from oxford-physics/master
Browse files Browse the repository at this point in the history
Changes for seperate scheduler configuartion
  • Loading branch information
kreczko committed Mar 24, 2014
2 parents 9a3945c + f12b575 commit 82973cd
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
5 changes: 3 additions & 2 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@
$is_worker = false,
$machine_owner = 'physics',
$managers = [],
$number_of_cpus = 8,
$number_of_cpus = undef,
# pool_password can also be served from central file location using hiera
$pool_password = "puppet:///modules/${module_name}/pool_password",
$pool_home = '/pool',
$uid_domain = 'example.com',
$use_accounting_groups = false,
# specify the networks with write access i.e. ["10.132.0.*"]
Expand Down Expand Up @@ -164,7 +165,7 @@
require => Package['condor'],
}

file { ['/pool', '/pool/condor', '/etc/condor/persistent']:
file { ["${pool_home}", "${pool_home}/condor", "/etc/condor/persistent"]:
ensure => directory,
owner => 'condor',
}
Expand Down
4 changes: 3 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@
$is_worker = false,
$machine_owner = 'physics',
$managers = [],
$number_of_cpus = 8,
$number_of_cpus = undef,
$pool_home = '/pool',
$pool_password = "puppet:///modules/${module_name}/pool_password",
$uid_domain = 'example.com',
$use_accounting_groups = false,
Expand All @@ -127,6 +128,7 @@
machine_owner => $machine_owner,
managers => $managers,
number_of_cpus => $number_of_cpus,
pool_home => $pool_home,
pool_password => $pool_password,
uid_domain => $uid_domain,
use_accounting_groups => $use_accounting_groups,
Expand Down
14 changes: 9 additions & 5 deletions templates/10_security.config.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ CES = <%= @computing_elements.flatten.join(', ') %>
WNS = <%= @worker_nodes.flatten.join(', ') %>

USERS = *@$(UID_DOMAIN)
HOSTALLOW_NEGOTIATOR = $(COLLECTOR_HOST)
HOSTALLOW_ADMINISTRATOR = $(COLLECTOR_HOST)
HOSTALLOW_NEGOTIATOR_SCHEDD = $(COLLECTOR_HOST)

ALLOW_READ = */*.$(UID_DOMAIN)
ALLOW_WRITE = $(CMS), $(CES), $(WNS)
#debugging
#ALLOW_READ = $(USERS)/*.$(UID_DOMAIN), tomcat/*.$(UID_DOMAIN), ldap/*.$(UID_DOMAIN)
Expand All @@ -25,17 +29,17 @@ ALLOW_WRITE = $(CMS), $(CES), $(WNS)
#NEGOTIATOR.ALLOW_WRITE = $(CES), $(CMS)

#if the CE has a private NIC, it needs to be included here as well
#COLLECTOR.ALLOW_ADVERTISE_MASTER = $(CES), $(CMS), $(WNS)
#COLLECTOR.ALLOW_ADVERTISE_SCHEDD = $(CES)
#COLLECTOR.ALLOW_ADVERTISE_STARTD = $(WNS)
COLLECTOR.ALLOW_ADVERTISE_MASTER = $(CES), $(CMS), $(WNS)
COLLECTOR.ALLOW_ADVERTISE_SCHEDD = $(CES)
COLLECTOR.ALLOW_ADVERTISE_STARTD = $(WNS)

#SCHEDD.ALLOW_WRITE = $(USERS)
SCHEDD.ALLOW_WRITE = $(USERS)

#SHADOW.ALLOW_WRITE = $(WNS), $(CES)

#ALLOW_DAEMON = condor_pool@$(UID_DOMAIN), condor@$(UID_DOMAIN), $(FULL_HOSTNAME)
#ALLOW_ADMINISTRATOR = root@$(UID_DOMAIN)/$(IP_ADDRESS), $(CMS)
#ALLOW_CONFIG = root@$(FULL_HOSTNAME)
ALLOW_CONFIG = root@$(FULL_HOSTNAME)

# Don't allow nobody to run jobs
SCHEDD.DENY_WRITE = nobody@$(UID_DOMAIN)
Expand Down
3 changes: 2 additions & 1 deletion templates/11_fairshares.config.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ GROUP_AUTOREGROUP = True

# groups
<% keys = @accounting_groups.keys.sort -%>

GROUP_NAMES = \
<% (1..keys.length.to_i-1).each do |i| -%>
<% (0..keys.length.to_i-1).each do |i| -%>
<% key = keys[i] -%>
<% if i == keys.length.to_i-1 -%>
group_<%= key %>
Expand Down
8 changes: 6 additions & 2 deletions templates/20_workernode.config.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
MachineOwner = <%= @machine_owner %>
StartJobs = True
## NUM_CPUS based on heira (if defined), otherwise on facter
<% if @number_of_cpus -%>
NUM_CPUS = <%= @number_of_cpus %>

<% else -%>
NUM_CPUS = <%= @processorcount %>
<% end -%>
# custom attribute for easier splitting into queues
# with ARC CE (using condor_requirements=" && custom_attribute"
<%= @custom_attribute %> = True
Expand Down Expand Up @@ -62,7 +66,7 @@ UPDATE_INTERVAL = $RANDOM_INTEGER(230, 370)
MASTER_UPDATE_INTERVAL = $RANDOM_INTEGER(230, 370)

## Location of scratch directories
EXECUTE = /pool/condor
EXECUTE = <%= @pool_home %>/condor

## Make sure jobs have independent PID namespaces
USE_PID_NAMESPACES = true
Expand Down

0 comments on commit 82973cd

Please sign in to comment.