- Terraform with DigitalOcean provider
serving as orchestrator for infrastructure part via API
- config files:
digitalocean.tf : main configuration file with infrastructure specifications
outputs.tf : serves as template for output information about results
digitalocean.tfvars : contain api_key
Note: Missing from repo: `api_token = "xxx"`
terraform-droplet.yaml : cloud init script for postinstall tasks
- workflow with terraform
terraform init (just once per project)
terraform apply -var-file="digitalocean.tfvars"
terraform destroy -var-file="digitalocean.tfvars"
- Ansible swarm bootstrap
serving as configuration management automation
- config files:
ansible.cfg : main configuration file with run defaults
ansible-droplet.inventory : inventory file with VM IPs and host variables
ansible-setup-swarm-cluster.yaml : simple playbook to kickstart Docker Swarm cluster
ansible-configure-swarm-stacks.yaml : playbook to deploy desired service containers
- workflow with ansible
ansible-playbook ansible-setup-swarm-cluster.yaml
-
Ansible monitoring stack deploy
- ansible-playbook ansible-configure-swarm-stacks.yaml
- takes care of following service containers deployprometheus : time series DB alertmanager : router for prometheus alerts pushgateway : push allowing gateway for pull prometheus ecosystem node-exporter : gathering metrics about underlying linux system balckbox-exporter : gathering information about provided http / https targets grafana : multi-data-source vizualization tool example-app : simple go app allowing to open http://<IP>:8080 and http://<IP>:8080/err
-
import dashboard 7587
- check other grafana functionality
- graphs creation or import -
insert dummy data with script and curl
- basic bash script to input sensor like datacreate_data_samples.sh
-echo "mymetric $(( $RANDOM % 35 + 10 ))" | curl --data-binary @- http://164.90.165.207:8084/metrics/job/my-temperature