instance-runner-export.cfg.in 3.54 KB
Newer Older
1
[buildout]
2 3
extends = {{ template_runner_path }}
          {{ pbsready_export_template_path }}
4 5

parts +=
6 7 8 9
  nginx_conf
  nginx-launcher
  certificate-authority
  ca-nginx
10
  logrotate-entry-nginx
11 12
  gunicorn-launcher
  gunicorn-graceful
13
  publish-connection-information
14
  slaprunner-promise
15
  apache-httpd-promise
16
  logrotate-entry-apache-httpd
17
  slaprunner-supervisord-wrapper
18 19 20
  runner-sshd-add-authorized-key
  runner-sshd-graceful
  runner-sshd-promise
21 22
  runner-sshkeys-authority
  runner-sshkeys-sshd
23
  runtestsuite
24
  symlinks
25 26
  shellinabox
  slapos-cfg
27
  cron-entry-prepare-software
28
  deploy-instance-parameters
29 30
  instance-software
  instance-software-type
31
  minishell-cwd
32
  bash-profile
33
  supervisord-wrapper
34
  supervisord-promise
35
  logrotate-entry-supervisord
36
  logrotate-entry-slapgrid
37
  httpd-graceful-wrapper
38 39
## Monitoring part
## Monitor for runner
40
  monitor-base
41
  monitor-check-resilient-feed-file
42
  monitor-check-webrunner-internal-instance
43

44 45 46 47
[proxy-free-port]
recipe = slapos.cookbook:free_port
minimum = 49980
maximum = 49989
48
ip = ${slap-network-information:local-ipv4}
49 50 51 52 53

[runner-free-port]
recipe = slapos.cookbook:free_port
minimum = 50005
maximum = 50014
54
ip = ${slap-network-information:global-ipv6}
55 56

[slaprunner]
57 58
proxy_port = ${proxy-free-port:port}
runner_port = ${runner-free-port:port}
59 60 61 62 63

[supervisord-free-port]
recipe = slapos.cookbook:free_port
minimum = 39986
maximum = 39995
64
ip = ${slaprunner:ipv4}
65 66

[supervisord]
67
port = ${supervisord-free-port:port}
68

69
[exporter]
70
recipe = slapos.recipe.template:jinja2
71 72
template = {{ exporter_script_path }}
rendered = ${directory:bin}/${slap-parameter:namebase}-exporter
73
# backward compatibility for resilient stack
74
wrapper = ${:rendered}
75 76
mode = 700
context =
77 78
  import sys sys
  import easy_install zc.buildout.easy_install
79
  section directory directory
80
  raw  backup_wait_time {{ backup_wait_time }}
81 82 83
  raw  output_log_file ${directory:log}/resilient.log
  raw  shell_binary {{ bash_executable_location }}
  raw  rsync_binary {{ rsync_executable_location }}
84

85 86 87 88
[monitor-httpd-free-port]
recipe = slapos.cookbook:free_port
minimum = 8437
maximum = 8446
89
ip = ${slap-network-information:global-ipv6}
90

91
# XXX Redefine Monitor parameters for runner-export
92
[monitor-instance-parameter]
93
monitor-httpd-port = ${monitor-httpd-free-port:port}
94 95 96 97 98 99 100 101 102 103 104 105 106
{% if slapparameter_dict.get('name', '') -%}
monitor-title = {{ slapparameter_dict['name'] }}
{% endif -%}
cors-domains = {{ slapparameter_dict.get('monitor-cors-domains', 'monitor.app.officejs.com') }}
{% if slapparameter_dict.get('monitor-username', '') -%}
username = {{ slapparameter_dict['monitor-username'] }}
{% endif -%}
{% if slapparameter_dict.get('monitor-password', '') -%}
password = {{ slapparameter_dict['monitor-password'] }}
{% endif -%}
{% if slapparameter_dict.get('monitor-url-list', '') -%}
monitor-url-list = {{ slapparameter_dict['monitor-url-list'] }}
{% endif -%}
107
instance-configuration =
108
  httpdcors cors-domain ${slaprunner-httpd-cors:location} ${httpd-graceful-wrapper:output}
109
configuration-file-path = ${buildout:directory}/knowledge0.cfg
110 111

# Extends publish section with resilient parameters
112
[publish-connection-information]
113 114 115 116
<= resilient-publish-connection-parameter

[monitor-check-resilient-feed-file]
recipe = slapos.recipe.template:jinja2
117 118
template = {{ monitor_check_resilient_feed_template_path }}
rendered = ${monitor-directory:reports}/check-create-resilient-feed-files
119 120 121
mode = 700
context =
  key input_feed_directory directory:notifier-feeds
122
  key monitor_feed_directory monitor-directory:public
123
  raw base_url http://[${notifier:host}]:${notifier:port}/get/
124
  raw python_executable ${buildout:executable}