[buildout]

parts = 
  condor
  boinc-client
  computerinfo-script
  bonjourgrid-client
  publish-connection-informations

extends = 
  ${template-condor:output}
  ${template-boinc:output}

eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true

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

[account-passwd]
recipe = slapos.cookbook:generate.password
storage-path = $${rootdirectory:etc}/.account_passwd
bytes = 8

[computerinfo-script]
recipe = slapos.recipe.template
url = ${computer-info:location}/${computer-info:filename}
output = $${bonjourgrid-client:work_dir}/machineinfo.worker.sh
mode = 0744

ip_address = $${slap-network-information:global-ipv6}

[bonjourgrid-client]
recipe = slapos.cookbook:bonjourgrid.client
client_script = ${bonjourgrid:location}/BonjourGridWorker.py
work_dir = $${basedirectory:bg_base}
install_dir = ${bonjourgrid:location}
boinc_script = $${basedirectory:bg_base}/runBoinc
condor_script = $${basedirectory:bg_base}/runCondor
wrapper = $${basedirectory:services}/bonjourGrid-Worker
log_file = $${basedirectory:log}/bonjourgrid-worker.log
pid_file = $${basedirectory:run}/bonjourgrid-worker.pid
python-bin = ${buildout:executable}
redis-url = $${slap-parameter:redis-ip}
redis-port = $${slap-parameter:redis-port}

#Boinc and Condor parameters
ipv6 = $${slap-network-information:global-ipv6}
email = $${slap-parameter:user-email}
condor_sbin = $${condor:sbin}
condor_bin = $${condor:bin}
boinc_wrapper = $${boinc-client:client-wrapper}
condor_wrapper = $${condor:wrapper-dir}/start_condor
boinc_cmd = $${boinc-client:cmd-bin}
boinc_rpc_port = $${boinc-client:rpc-port}
boinc_install_dir = $${boinc-client:install-dir}
condor_config = $${buildout:directory}/etc/condor_config
condor_config_local = $${condor:local-dir}/condor_config.local
boinc_passwd = $${boinc-client:passwd}
account_name = $${slap-parameter:full-name}
account_passwd = $${account-passwd:passwd}

[publish-connection-informations]
boinc-account-email = $${slap-parameter:user-email}
boinc-account-name = $${slap-parameter:full-name}
boinc-account-passwd = $${account-passwd:passwd}

[slap-parameter]
user-email = your.email@your.domain.com
full-name = Your Full Name
redis-ip = 
redis-port = 6379