1
0
Fork 0
mirror of synced 2024-11-22 17:05:34 -05:00

grfana from package

This commit is contained in:
Michael Kutý 2014-03-03 20:46:34 +01:00
parent 4eecac22d4
commit a79bbdb2df
2 changed files with 56 additions and 1 deletions

View file

@ -23,6 +23,25 @@ A beautiful, easy to use and feature rich Graphite dashboard replacement and gra
port: 443 port: 443
user: test user: test
## Sample pillar with source from stable package
grafana:
server:
enabled: true
source:
type: 'pkg'
rev: 1.4.0
elasticsearch:
host: localhost
port: 9200
data:
- name: metrics1
type: graphite
host: metrics1.domain.com
ssl: true
port: 443
user: test
## Read more ## Read more
* http://grafana.org/ * http://grafana.org/

View file

@ -10,7 +10,6 @@ include:
- mode: 755 - mode: 755
- makedirs: true - makedirs: true
{% if pillar.grafana.server.source.type == 'git' %} {% if pillar.grafana.server.source.type == 'git' %}
grafana_repository: grafana_repository:
@ -50,6 +49,43 @@ grafana_grun_build:
- git: grafana_repository - git: grafana_repository
- file: /srv/grafana/site/src/config.js - 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 %}
{%- endif %} {%- endif %}