Ansible roles and playbooks for Victoria Metrics.
Roles are published in ansible galaxy: https://galaxy.ansible.com/ui/namespaces/victoriametrics/
Install collection:
ansible-galaxy collection install victoriametrics.cluster
Collection includes the following roles:
- vmsingle - installs and configures VictoriaMetrics single node
- vmagent - installs and configures
vmagent
- vmalert - installs and configures
vmalert
- vmselect - installs and configures
vmselect
- vmstorage - installs and configures
vmstorage
- vminsert - installs and configures
vminsert
- vmauth - installs and configures
vmauth
- vlsingle - installs and configures VictoriaLogs single node
See cluster and vmsingle playbooks for examples of how to use these roles.
Cluster deployment example is available in playbooks/cluster.yml. The playbook deploys VictoriaMetrics cluster and vmauth to act as a load balancer and authentication proxy. See inventory for example of inventory file.
Here is a diagram of the cluster deployment:
It's also possible to use molecule scenario to create a local cluster for testing.
See molecule directory for details. The scenario uses docker as a driver and
sets up a container for each component. The scenario can be deployed by
using make molecule-converge-cluster-integration
command.
In order to set up development environment, you need to have docker
, python
and make
installed.
Run make init-venv
to create virtual environment and install required packages for linting and testing
with molecule.
Refer to Makefile for available commands for linting and molecule testing.