-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
58 lines (49 loc) · 2.8 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
build-telegraf-conf:
@echo "======================================================================"
@echo "Build telegraf configuration files from template"
@echo "======================================================================"
python ./configuration-rendering.py -o 'configs/telegraf-openconfig.conf' -t 'templates/telegraf-openconfig.j2' -y 'data.yml'
python ./configuration-rendering.py -o 'configs/telegraf-snmp.conf' -t 'templates/telegraf-snmp.j2' -y 'data.yml'
grafana-cli:
@echo "======================================================================"
@echo "start a shell session in the grafana container"
@echo "======================================================================"
docker exec -i -t grafana /bin/bash
telegraf-openconfig-cli:
@echo "======================================================================"
@echo "start a shell session in the telegraf container for Openconfig"
@echo "======================================================================"
docker exec -i -t telegraf-openconfig /bin/bash
telegraf-snmp-cli:
@echo "======================================================================"
@echo "start a shell session in the telegraf container for SNMP"
@echo "======================================================================"
docker exec -i -t telegraf-snmp /bin/bash
influxb-cli:
@echo "======================================================================"
@echo "start a shell session in the influxb container"
@echo "======================================================================"
docker exec -it influxdb bash
restart: stop start
rebuild: destroy build-telegraf-conf build
build:
@echo "======================================================================"
@echo "create docker networks, pull docker images, create and start docker containers"
@echo "======================================================================"
python ./configuration-rendering.py -o 'docker-compose.yml' -t 'templates/docker-compose-tig.j2' -y 'data.yml'
docker-compose -f ./docker-compose.yml up -d
destroy:
@echo "======================================================================"
@echo "stop docker containers, remove docker containers, remove docker networks"
@echo "======================================================================"
docker-compose -f ./docker-compose.yml down
start:
@echo "======================================================================"
@echo "Start docker containers"
@echo "======================================================================"
docker-compose -f ./docker-compose.yml start
stop:
@echo "======================================================================"
@echo "Stop docker containers"
@echo "======================================================================"
docker-compose -f ./docker-compose.yml stop