D3DeFi / zbx-ansible-dev

Collection of playbooks to spin up zabbix testing environment in cloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

Collection of ansible playbooks, terraform configurations and scripts to spin up testing instances of Zabbix servers in cloud. Currently supported:

  • DigitalOcean

Prerequisities

  1. Following tools should be present:

    • terraform (doc)
    • python2.7+ or python3+
    • pip (doc)
    • (optional) virtualenv (pip install virtualenv)
    • (optional if using zabbix_map) libtff-dev libjpeg-dev zlib-dev
  2. Create virtualenv (optional) and install requirements

virtualenv env
source env/bin/activate
pip install -r requirements.txt
  1. Any variables from main.tf should be overriden in terraform.tfvars. Required minimum is:
do_token    = "API_TOKEN_STRING"
do_ssh_keys = [SSH_KEY_ID]
  1. Finalize by downloading required ansible roles and initializing terraform:
terraform init
ansible-galaxy install -r requirements.yml

Usage

  1. Deploy testing infrastructure
terraform plan
terraform apply
  1. If there is need for bastion host and it was configured to terraform.tfvars:
source scripts/setup-bastion.sh
# source scripts/setup-bastion.sh HOST  # if do_bastion_host is not set
  1. Provision via ansible-playbook:
source env/bin/activate  # if using virtualenv
ansible-playbook site.yml

About

Collection of playbooks to spin up zabbix testing environment in cloud

License:Apache License 2.0


Languages

Language:HCL 53.1%Language:Shell 46.9%