-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new per-component roles(vmstorage, vminsert, vmselect) to deploy a cluster by using binaries, similar to how other existing roles do the deployment. Added a deprecation notice to the old roles. New roles allow to create a full cluster setup with vmauth as a load balancer. Signed-off-by: Zakhar Bessarab <[email protected]>
- Loading branch information
Showing
78 changed files
with
2,170 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,4 @@ jobs: | |
make init-venv | ||
make molecule-converge | ||
make molecule-converge-integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,22 @@ | ||
[victoria_storage] | ||
victoria-storage-01 | ||
victoria-storage-02 | ||
victoria-storage-03 | ||
[vmstorage] | ||
vmstorage-01 | ||
vmstorage-02 | ||
vmstorage-03 | ||
|
||
[victoria_insert] | ||
victoria-insert-01 | ||
victoria-insert-02 | ||
victoria-insert-03 | ||
[vminsert] | ||
vminsert-01 | ||
vminsert-02 | ||
vminsert-03 | ||
|
||
[victoria_select] | ||
victoria-select-01 | ||
victoria-select-02 | ||
|
||
[victoria_storage:vars] | ||
vm_role=victoria-storage | ||
|
||
[victoria_insert:vars] | ||
vm_role=victoria-insert | ||
|
||
[victoria_select:vars] | ||
vm_role=victoria-select | ||
|
||
[load-balancer] | ||
load-balancer-01 | ||
[vmselect] | ||
vmselect-01 | ||
vmselect-02 | ||
|
||
[victoria_cluster:children] | ||
victoria_select | ||
victoria_insert | ||
victoria_storage | ||
vmselect | ||
vminsert | ||
vmstorage | ||
|
||
[vmauth] | ||
vmauth-01 | ||
vmauth-02 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
Oops, something went wrong.