[buildout]
extends = template-runner.cfg
          ${pbsready-export:output}

parts +=
  nginx_conf
  nginx-launcher
  certificate-authority
  ca-nginx
  ca-shellinabox
  gunicorn-launcher
  gunicorn-graceful
  sshkeys-dropbear-runner
  dropbear-server-add-authorized-key
  sshkeys-authority
  publish-connection-informations
  slaprunner-promise
  slaprunner-frontend-promise
  dropbear-promise
  runtestsuite
  shellinabox-promise
  symlinks
  shellinabox
  slapos-cfg
  slapos-repo-config
  cron-entry-backup
  cron-entry-prepare-software
  deploy-instance-parameters
  minishell-cwd
## Monitoring part
###Parts to add for monitoring
  cron
  certificate-authority
  cron-entry-monitor
  cron-entry-rss
  deploy-index
  deploy-settings-cgi
  deploy-status-cgi
  deploy-status-history-cgi
  setup-static-files
  certificate-authority
  zero-parameters
  public-symlink
  cgi-httpd-wrapper
  cgi-httpd-graceful-wrapper
  monitor-promise
  monitor-instance-log-access
## Monitor for runner
  monitor-current-log-access
  monitor-check-resilient-feed-file


[exporter]
recipe = slapos.recipe.template:jinja2
template = ${template-runner-export-script:location}/${template-runner-export-script:filename}
rendered = $${directory:bin}/$${slap-parameter:namebase}-exporter
# backward compatibility for resilient stack
wrapper = $${:rendered}
mode = 700
context =
  section directory directory
  raw  shell_binary ${dash:location}/bin/dash
  raw  rsync_binary ${rsync:location}/bin/rsync

[monitor-promise]
url = $${monitor-frontend:config-url}/$${deploy-index-template:filename}

# Extends publish section with resilient parameters
[publish-connection-informations]
<= resilient-publish-connection-parameter

[monitor-check-resilient-feed-file]
recipe = slapos.recipe.template:jinja2
template = ${template-monitor-check-resilient-feed:location}/${template-monitor-check-resilient-feed:filename}
rendered = $${monitor-directory:monitor-custom-scripts}/check-create-resilient-feed-files.py
mode = 700
context =
  key input_feed_directory directory:notifier-feeds
  key monitor_feed_directory monitor-directory:public-cgi
  raw base_url http://[$${notifier:host}]:$${notifier:port}/get/
  raw python_executable ${buildout:executable}
