-
Notifications
You must be signed in to change notification settings - Fork 34
/
cluster.yml
50 lines (46 loc) · 1.11 KB
/
cluster.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
- name: Setup storage
become: true
hosts: vmstorage
roles:
- vmstorage
- name: Setup vmselect
become: true
hosts: vmselect
vars:
vmselect_cache_dir: "/var/lib/vmselect"
vmselect_config:
cacheDataPath: "/var/lib/vmselect"
storageNode: "{{ groups['vmstorage'] | join(',') }}"
roles:
- vmselect
- name: Setup vminsert
become: true
hosts: vminsert
vars:
vminsert_config:
storageNode: "{{ groups['vmstorage'] | join(',') }}"
roles:
- vminsert
- name: Setup vmauth
become: true
hosts: vmauth
vars:
# See: https://docs.victoriametrics.com/vmauth/#load-balancer-for-victoriametrics-cluster
vmauth_auth_config: |-
unauthorized_user:
url_map:
- src_paths:
- "/insert/.+"
url_prefix:
{% for insert in groups['vminsert'] %}
- "http://{{ insert }}:8480/"
{% endfor %}
- src_paths:
- "/select/.+"
url_prefix:
{% for select in groups['vmselect'] %}
- "http://{{ select }}:8481/"
{% endfor %}
roles:
- vmauth