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 all commits
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
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