slaprunner: display latest restored back-up date in monitor stack
[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 # have to repeat the next one, as it's not inherited from pbsready-import
27   import-on-notification
28 ## Monitoring part
29 ###Parts to add for monitoring
30   certificate-authority
31   cron-entry-monitor
32   cron-entry-rss
33   deploy-index
34   deploy-settings-cgi
35   deploy-status-cgi
36   setup-static-files
37   certificate-authority
38   zero-parameters
39   public-symlink
40   cgi-httpd-wrapper
41   cgi-httpd-graceful-wrapper
42   monitor-promise
43   monitor-instance-log-access
44 ## Monitor for runner
45   monitor-current-log-access
46   monitor-backup-log-access
47 ## Monitor for import runner
48   monitor-latest-restored-backup
49
50 [importer]
51 recipe = slapos.recipe.template:jinja2
52 template = ${template-runner-import-script:location}/${template-runner-import-script:filename}
53 rendered = $${directory:bin}/$${slap-parameter:namebase}-importer
54 # backward compatibility for resilient stack
55 wrapper = $${:rendered}
56 mode = 700
57 context =
58   key backend_url slaprunner:access-url
59   section directory directory
60   raw  shell_binary ${dash:location}/bin/dash
61   raw  rsync_binary ${rsync:location}/bin/rsync
62   raw  curl_binary ${curl:location}/bin/curl
63
64 [slap-parameter]
65 auto-deploy-instance = false
66
67 [resilient-publish-connection-parameter]
68 monitor-url = $${monitor-parameters:url}
69
70 [monitor-backup-log-access]
71 < = monitor-directory-access
72 source = $${directory:logrotate-backup}
73
74 [monitor-latest-restored-backup]
75 recipe = slapos.recipe.template:jinja2
76 command = if [ -f $${directory:etc}/.resilient-timestamp ]; then echo "$(date -d @$(cat $${directory:etc}/.resilient-timestamp) +%c)"; else echo "No backup timestamp found"; fi
77 rendered = $${monitor-directory:monitoring-cgi}/latest-restored-backup
78 template = ${template-wrapper:output}
79 mode = 744
80 context =
81   key content :command