Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Cloud-Temple/ansible-victoria-metrics

 
 

Repository files navigation

ansible-playbooks

Ansible roles and playbooks for Victoria Metrics.

How to install

Roles are published in ansible galaxy: https://galaxy.ansible.com/ui/namespaces/victoriametrics/

Install collection:

ansible-galaxy collection install victoriametrics.cluster

Contents

Collection includes the following roles:

See cluster and single playbooks for examples of how to use these roles.

Deprecated roles:

  • docker - role for docker installation
  • load_balancer - nginx setup for load balancing between select and insert nodes
  • cluster - installs and configures VictoriaMetrics cluster running in docker

These roles are deprecated in favor of roles for each component. They are still available in the collection, but will be removed in future releases. Note that per-component roles are using binary releases of VictoriaMetrics, while cluster role is using docker images.

Cluster deployment

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: vm-cluster.png

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.

Development

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.

Please, note that cluster role is tested with vagrant and libvirt provider and requires vagrant to be installed.

Refer to Makefile for available commands for linting and molecule testing.

About

Ansible Playbooks for Victoria Metrics monorepo

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Jinja 70.4%
  • Shell 15.9%
  • Makefile 13.7%