slaprunner: Define instance software type in parameters if not defined yet
[slapos.git] / software / slaprunner / instance-runner-import.cfg.in
1 [buildout]
2 extends = template-runner.cfg
3           ${pbsready-import:output}
4
5 parts +=
6   nginx_conf
7   nginx-launcher
8   certificate-authority
9   ca-nginx
10   ca-shellinabox
11   gunicorn-launcher
12   gunicorn-graceful
13   sshkeys-dropbear-runner
14   dropbear-server-add-authorized-key
15   sshkeys-authority
16   slaprunner-promise
17   dropbear-promise
18   runtestsuite
19   shellinabox-promise
20   shellinabox
21   symlinks
22   slapos-cfg
23   slapos-repo-config
24   cron-entry-prepare-software
25   deploy-instance-parameters
26   instance-software-type
27 # have to repeat the next one, as it's not inherited from pbsready-import
28   import-on-notification
29 ## Monitoring part
30 ###Parts to add for monitoring
31   cron
32   certificate-authority
33   cron-entry-monitor
34   cron-entry-rss
35   deploy-index
36   deploy-settings-cgi
37   deploy-status-cgi
38   deploy-status-history-cgi
39   setup-static-files
40   certificate-authority
41   zero-parameters
42   public-symlink
43   cgi-httpd-wrapper
44   cgi-httpd-graceful-wrapper
45   monitor-promise
46   monitor-instance-log-access
47 ## Monitor for runner
48   monitor-current-log-access
49   monitor-backup-log-access
50 ## Monitor for import runner
51   monitor-latest-restored-backup
52
53 [importer]
54 recipe = slapos.recipe.template:jinja2
55 template = ${template-runner-import-script:location}/${template-runner-import-script:filename}
56 rendered = $${directory:bin}/$${slap-parameter:namebase}-importer
57 # backward compatibility for resilient stack
58 wrapper = $${:rendered}
59 mode = 700
60 context =
61   key backend_url slaprunner:access-url
62   section directory directory
63   raw  shell_binary ${dash:location}/bin/dash
64   raw  rsync_binary ${rsync:location}/bin/rsync
65   raw  curl_binary ${curl:location}/bin/curl
66
67 [slap-parameter]
68 auto-deploy-instance = false
69 auto-deploy = true
70
71 [resilient-publish-connection-parameter]
72 monitor-url = $${monitor-parameters:url}
73
74 [monitor-backup-log-access]
75 < = monitor-directory-access
76 source = $${directory:logrotate-backup}
77
78 [monitor-latest-restored-backup]
79 recipe = slapos.recipe.template:jinja2
80 command = if [ -f $${directory:etc}/.resilient-timestamp ]; then echo "$(date -d @$(cat $${directory:etc}/.resilient-timestamp) +%c)"; else echo "No backup timestamp found"; fi
81 rendered = $${monitor-directory:monitoring-cgi}/latest-restored-backup
82 template = ${template-wrapper:output}
83 mode = 744
84 context =
85   key content :command