Skip to content

Commit

Permalink
Merge pull request #14 from juwi/install-prometheus
Browse files Browse the repository at this point in the history
feat: Add install prometheus and grafana playbook
  • Loading branch information
erikzenker authored Mar 18, 2021
2 parents 5a76f52 + ab4a3b7 commit e662ea8
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 1 deletion.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
## Requirements

### General
- ansible (prefer newer ansible versions which are python 3 compatible)

### Prometheus
- jmespath (deployer host)
- unzip (target host)

### Grafana
- jmespath (deployer host)

## Deployment Instructions

### Grafana
- `ansible-galaxy install cloudalchemy.grafana`
- `ansible-playbook -i environments/production/inventory.yml playbooks/install_grafana.yml`

### Prometheus
- `ansible-galaxy install cloudalchemy.prometheus`
- `ansible-playbook -i environments/production/inventory.yml playbooks/install_prometheus.yml`

### Signal tower
- Copy `ansible.cfg.example` to `ansible.cfg`
- `ansible-playbook -i environments/production/inventory.yml playbooks/install_signaltower.yml`
24 changes: 23 additions & 1 deletion environments/staging/group_vars/all/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,26 @@ palava_signaltower_install_dir: /srv/signaltower-staging
palava_signaltower_log_dir: /var/log/signaltower-staging
palava_environment: staging

palava_signaltower_autostart: no
palava_signaltower_autostart: no

# Prometheus vars
prometheus_version: 2.22.0
prometheus_web_listen_address: '127.0.0.1:9090'
prometheus_scrape_jobs:
- job_name: 'signal-tower'
metrics_path: /metrics
params:
module: [http_2xx]
static_configs:
- targets:
- localhost:4233
# Grafana vars
grafana_security:
admin_user: admin
admin_password: "admin"
grafana_datasources:
- name: prometheus
type: prometheus
access: proxy
url: 'http://{{ prometheus_web_listen_address }}'
basicAuth: false
7 changes: 7 additions & 0 deletions playbooks/install_grafana.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

- hosts: all
strategy: debug
remote_user: root
become: yes
roles:
- cloudalchemy.grafana
7 changes: 7 additions & 0 deletions playbooks/install_prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

- hosts: all
strategy: debug
remote_user: root
become: yes
roles:
- cloudalchemy.prometheus

0 comments on commit e662ea8

Please sign in to comment.