Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add install prometheus playbook #14

Merged
merged 3 commits into from
Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@
- ansible (prefer newer ansible versions which are python 3 compatible)

### Prometheus
- jmespath (installing host)
- 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`
Expand Down
25 changes: 25 additions & 0 deletions environments/production/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

all:
vars:
# Prometheus vars
prometheus_version: 2.22.0

prometheus_web_listen_address: '0.0.0.0: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

hosts:
185.189.221.157: null
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