Although it's being correctly set on the config file, the admin credentials
are not bein honored at first server start, and so the default password
is set in the database.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>
--- /dev/null
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+{%- set grafana_server = salt['pillar.get']('grafana', {}) %}
+
+{%- if grafana_server %}
+extra_grafana_admin_user:
+ cmd.run:
+ - name: grafana-cli admin reset-admin-password {{ grafana_server.config.security.admin_password }}
+ - require:
+ - service: grafana-service-running-service-running
+{%- endif %}
\ No newline at end of file
grep -q "\- grafana$" ${S_DIR}/top.sls || echo " - grafana" >> ${S_DIR}/top.sls
grep -q "extra.grafana_datasource" ${S_DIR}/top.sls || echo " - extra.grafana_datasource" >> ${S_DIR}/top.sls
grep -q "extra.grafana_dashboards" ${S_DIR}/top.sls || echo " - extra.grafana_dashboards" >> ${S_DIR}/top.sls
+ grep -q "extra.grafana_admin_user" ${S_DIR}/top.sls || echo " - extra.grafana_admin_user" >> ${S_DIR}/top.sls
if [ "${SSL_MODE}" = "lets-encrypt" ]; then
grep -q "letsencrypt" ${S_DIR}/top.sls || echo " - letsencrypt" >> ${S_DIR}/top.sls