Log proper version
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..3b04cfb
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+0.2
diff --git a/grafana/server.sls b/grafana/server.sls
index 1d813f1..9b75dc5 100644
--- a/grafana/server.sls
+++ b/grafana/server.sls
@@ -9,8 +9,8 @@
file.managed:
- source: salt://grafana/files/grafana.ini
- template: jinja
- - user: root
- - group: root
+ - user: grafana
+ - group: grafana
- require:
- pkg: grafana_packages
diff --git a/init.sls b/init.sls
deleted file mode 100644
index 380fc34..0000000
--- a/init.sls
+++ /dev/null
@@ -1,5 +0,0 @@
-
-include:
-{% if pillar.grafana.server is defined %}
-- grafana.server
-{% endif %}
diff --git a/server.sls b/server.sls
deleted file mode 100755
index 5cd29f9..0000000
--- a/server.sls
+++ /dev/null
@@ -1,91 +0,0 @@
-{%- if pillar.grafana.server.enabled %}
-
-include:
- - git
- - nodejs
-
-/srv/grafana:
- file:
- - directory
- - mode: 755
- - makedirs: true
-
-{% if pillar.grafana.server.source.type == 'git' %}
-
-grafana_repository:
- git.latest:
- - name: {{ pillar.grafana.server.source.address }}
- - rev: {{ pillar.grafana.server.source.rev }}
- - target: /srv/grafana/site
- - require:
- - file: /srv/grafana
- - pkg: git_packages
-
-/srv/grafana/site/src/config.js:
- file:
- - managed
- - source: salt://grafana/conf/config.js
- - template: jinja
- - require:
- - git: grafana_repository
-
-grafana_install:
- cmd.run:
- - names:
- - npm install
- - npm install -g grunt-cli
- - cwd: /srv/grafana/site
- - unless: test -e /srv/grafana/site/node_modules
- - require:
- - git: grafana_repository
-
-grafana_grun_build:
- cmd.run:
- - names:
- - grunt build --force
- - cwd: /srv/grafana/site
- - unless: test -e /srv/grafana/site/dist
- - require:
- - git: grafana_repository
- - file: /srv/grafana/site/src/config.js
-
-{% elif pillar.grafana.server.source.type == 'pkg' %}
-
-{% set version = pillar.grafana.server.source.rev %}
-
-/srv/grafana/site/dist:
- file:
- - directory
- - mode: 755
- - makedirs: true
-
-/srv/grafana/site/dist/config.js:
- file:
- - managed
- - source: salt://grafana/conf/config.js
- - template: jinja
- - require:
- - file: /srv/grafana/site/dist
-
-download_grafana:
- cmd.run:
- - names:
- - wget https://github.com/torkelo/grafana/releases/download/v{{ version }}/grafana-{{ version }}.tar.gz
- - user: root
- - cwd: /root
- - unless: test -e /root/grafana-{{ version }}.tar.gz
-
-untar_grafana:
- cmd.run:
- - names:
- - tar zxvf /root/grafana-{{ version }}.tar.gz -C /srv/grafana/site/dist
- - user: root
- - cwd: /root
- - unless: test -e /srv/grafana/dist/app
- - require:
- - file: /srv/grafana/site/dist/config.js
- - file: /srv/grafana/site/dist
-
-{% endif %}
-
-{%- endif %}