Commit 48b6c27c authored by Łukasz Nowak's avatar Łukasz Nowak

software/grafana: Switch to monitor-promise-base

parent dddedb4f
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 7fb6806b139b3a8d0054308397be1dd9 md5sum = 461d515da03de5e422e6f75189d09184
[influxdb-config-file] [influxdb-config-file]
filename = influxdb-config-file.cfg.in filename = influxdb-config-file.cfg.in
......
...@@ -3,6 +3,8 @@ parts = ...@@ -3,6 +3,8 @@ parts =
promises promises
publish-connection-parameter publish-connection-parameter
extends = {{ monitor_template }}
eggs-directory = {{ buildout['eggs-directory'] }} eggs-directory = {{ buildout['eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }} develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
offline = true offline = true
...@@ -33,7 +35,6 @@ etc = ${:home}/etc ...@@ -33,7 +35,6 @@ etc = ${:home}/etc
var = ${:home}/var var = ${:home}/var
srv = ${:home}/srv srv = ${:home}/srv
service = ${:etc}/service service = ${:etc}/service
promise = ${:etc}/promise
influxdb-data-dir = ${:srv}/influxdb influxdb-data-dir = ${:srv}/influxdb
grafana-dir = ${:srv}/grafana grafana-dir = ${:srv}/grafana
grafana-data-dir = ${:grafana-dir}/data grafana-data-dir = ${:grafana-dir}/data
...@@ -70,8 +71,9 @@ mode = 0644 ...@@ -70,8 +71,9 @@ mode = 0644
extensions = jinja2.ext.do extensions = jinja2.ext.do
[check-port-listening-promise] [check-port-listening-promise]
recipe = slapos.cookbook:check_port_listening <= monitor-base-promise
path = ${directory:promise}/${:_buildout_section_name_} module = check_port_listening
name = ${:_buildout_section_name_}.py
...@@ -110,14 +112,15 @@ username = influxdb ...@@ -110,14 +112,15 @@ username = influxdb
[influxdb-listen-promise] [influxdb-listen-promise]
<= check-port-listening-promise <= check-port-listening-promise
hostname = ${influxdb:ipv6} config-hostname = ${influxdb:ipv6}
port = ${influxdb:http-port} config-port = ${influxdb:http-port}
[influxdb-password-promise] [influxdb-password-promise]
recipe = slapos.cookbook:wrapper <= monitor-base-promise
command-line = module = check_command_execute
name = ${:_buildout_section_name_}.py
config-command =
{{ influx_bin }} -username ${influxdb:auth-username} -password ${influxdb:auth-password} -socket ${influxdb:unix-socket} -execute "CREATE USER ${influxdb:auth-username} WITH PASSWORD '${influxdb:auth-password}' WITH ALL PRIVILEGES" {{ influx_bin }} -username ${influxdb:auth-username} -password ${influxdb:auth-password} -socket ${influxdb:unix-socket} -execute "CREATE USER ${influxdb:auth-username} WITH PASSWORD '${influxdb:auth-password}' WITH ALL PRIVILEGES"
wrapper-path = ${directory:promise}/${:_buildout_section_name_}
...@@ -160,8 +163,8 @@ context = ...@@ -160,8 +163,8 @@ context =
[grafana-listen-promise] [grafana-listen-promise]
<= check-port-listening-promise <= check-port-listening-promise
hostname= ${grafana:ipv6} config-hostname= ${grafana:ipv6}
port = ${grafana:port} config-port = ${grafana:port}
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
extends = extends =
../../stack/slapos.cfg ../../stack/slapos.cfg
../../stack/nodejs.cfg ../../stack/nodejs.cfg
../../stack/monitor/buildout.cfg
../../component/make/buildout.cfg ../../component/make/buildout.cfg
../../component/golang/buildout.cfg ../../component/golang/buildout.cfg
../../component/openssl/buildout.cfg ../../component/openssl/buildout.cfg
...@@ -105,6 +106,7 @@ context = ...@@ -105,6 +106,7 @@ context =
key influx_bin gowork:influx-bin key influx_bin gowork:influx-bin
key grafana_bin gowork:grafana-bin key grafana_bin gowork:grafana-bin
key grafana_homepath gowork:grafana-homepath key grafana_homepath gowork:grafana-homepath
key monitor_template monitor2-template:rendered
[versions] [versions]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment