[buildout]
parts =
  condor
  publish-connection-informations

eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
#Enable download
newest = false
offline = false

# Create all needed directories
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/
var = $${buildout:directory}/var/
condor = $${buildout:directory}/condor/
job = $${buildout:directory}/jobs/
bin = $${buildout:directory}/bin/
sbin = $${buildout:directory}/sbin/
srv = $${buildout:directory}/srv/

[basedirectory]
recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log/
run = $${rootdirectory:var}/run/
backup = $${rootdirectory:srv}/backup/
promises = $${rootdirectory:etc}/promise/
condor = $${rootdirectory:etc}/condor/

[wrapperdirectory]
recipe = slapos.cookbook:mkdirectory
wrapper = $${basedirectory:run}/condor

[condor]
recipe = slapos.cookbook:condor
#Change default wrapper dir to /etc/condor/
wrapper-dir = $${basedirectory:condor}
ip = $${slap-network-information:global-ipv6}
package = ${condor:location}
rootdirectory = $${buildout:directory}
local-dir = $${rootdirectory:condor}
job-dir = $${rootdirectory:job}
java-bin = ${java:location}/bin
bin = $${wrapperdirectory:wrapper}/bin/
sbin = $${wrapperdirectory:wrapper}/sbin/
dash = ${dash:location}/bin/dash

environment = 
  LD_LIBRARY_PATH=${libexpat:location}/lib:${kerberos:location}/lib:${openldap:location}/lib:${zlib:location}/lib
  PATH=${perl:location}/bin:${java:location}/bin:${kerberos:location}/bin:${openldap:location}/bin:%(PATH)s
  HOME=$${rootdirectory:condor}
  HOSTNAME=$${slap-parameter:condor_host}

#Condor user parameter
condor_host = $${slap-parameter:condor_host}
collector_name = $${slap-parameter:condor_collector_name}
#Condor machine role: worker=submit,execute manager=manager,submit
machine-role = worker
disk-space = $${slap-parameter:condor_diskspace}
allowed-write = $${slap-parameter:condor_allowed-write}
admin-email = 

# Publish all instance parameters (url of instance)
[publish-connection-informations]
recipe = slapos.cookbook:publish
condor_ipv6_address = $${condor:ip}
condor_instance_type = worker
condor_host = $${condor:condor_host}

[slap-parameter]
# Default values if not specified
condor_host = [$${slap-network-information:global-ipv6}]
condor_collector_name = SLAPOS-CONDOR-POOL
condor_diskspace = 5
condor_allowed-write = $${:condor_host}