Add grafana dep recipe
authorSiraaj Khandkar <siraaj@khandkar.net>
Fri, 13 Nov 2020 22:02:56 +0000 (17:02 -0500)
committerSiraaj Khandkar <siraaj@khandkar.net>
Fri, 13 Nov 2020 22:02:56 +0000 (17:02 -0500)
deps/grafana/Makefile [new file with mode: 0644]
deps/grafana/install-grafana-on-debian-or-ubuntu.sh [new file with mode: 0755]

diff --git a/deps/grafana/Makefile b/deps/grafana/Makefile
new file mode 100644 (file)
index 0000000..bfa85d8
--- /dev/null
@@ -0,0 +1,3 @@
+.PHONY: install
+install:
+       ./install-grafana-on-debian-or-ubuntu.sh
diff --git a/deps/grafana/install-grafana-on-debian-or-ubuntu.sh b/deps/grafana/install-grafana-on-debian-or-ubuntu.sh
new file mode 100755 (executable)
index 0000000..3f56a6d
--- /dev/null
@@ -0,0 +1,44 @@
+#! /bin/sh
+
+# === Package details ===
+# Installs binary to
+#   /usr/sbin/grafana-server
+# Installs Init.d script to
+#   /etc/init.d/grafana-server
+# Creates default file (environment vars) to
+#   /etc/default/grafana-server
+# Installs configuration file to
+#   /etc/grafana/grafana.ini
+# Installs systemd service (if systemd is available) name
+#   grafana-server.service
+# The default configuration sets the log file at
+#   /var/log/grafana/grafana.log
+# The default configuration specifies a SQLite3 db at
+#   /var/lib/grafana/grafana.db
+# Installs HTML/JS/CSS and other Grafana files at
+#   /usr/share/grafana
+
+
+apt_source_file='/etc/apt/sources.list.d/grafana.list'
+
+sudo apt install -y apt-transport-https
+sudo apt install -y software-properties-common wget
+wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
+echo 'deb https://packages.grafana.com/oss/deb stable main' | sudo tee -a "$apt_source_file"
+sudo chmod a+r "$apt_source_file"
+sudo apt update
+sudo apt install grafana
+
+# Adding system user `grafana' (UID 130) ...
+# Adding new user `grafana' (UID 130) with group `grafana' ...
+# Not creating home directory `/usr/share/grafana'.
+# ### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd
+#  sudo /bin/systemctl daemon-reload
+#  sudo /bin/systemctl enable grafana-server
+# ### You can start grafana-server by executing
+#  sudo /bin/systemctl start grafana-server
+
+sudo systemctl daemon-reload
+#sudo systemctl start grafana-server
+#sudo systemctl status grafana-server
+#sudo systemctl enable grafana-server.service
This page took 0.026172 seconds and 4 git commands to generate.