2 ##############################################################################
3 # Copyright (c) 2017 Huawei Tech and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
12 MONITOR_CONFIG="/home/opnfv/bottlenecks/monitor/config"
13 DISPATCH="/home/opnfv/bottlenecks/monitor/dispatch"
16 # INSTALL GRAFANA + PROMETHEUS + CADVISOR + BAROMETER on the JUMPERSERVER
18 sudo docker run --name bottlenecks-node-exporter \
20 -v "/proc:/host/proc:ro" \
21 -v "/sys:/host/sys:ro" \
24 quay.io/prometheus/node-exporter:v0.14.0 \
25 -collector.procfs /host/proc \
26 -collector.sysfs /host/sys \
27 -collector.filesystem.ignored-mount-points "^/(sys|proc|dev|host|etc)($|/)"
30 # # Configure IP Address in collectd server configuration
31 # python ${DISPATCH}/server_ip_configure.py ${MONITOR_CONFIG}/collectd_server.conf
32 # sudo docker run --name bottlenecks-collectd -d \
34 # -v ${MONITOR_CONFIG}/collectd_server.conf:/etc/collectd/collectd.conf:ro \
35 # -v /proc:/mnt/proc:ro \
36 # fr3nd/collectd:5.5.0-1
38 echo == installation of monitoring module is started ==
42 sudo docker run --name bottlenecks-collectd-exporter \
43 -d -p 9103:9103 -p 25826:25826/udp \
44 prom/collectd-exporter:0.3.1 \
45 -collectd.listen-address=":25826"
48 sudo docker run --name bottlenecks-prometheus \
50 -v ${MONITOR_CONFIG}/prometheus.yaml:/etc/prometheus/prometheus.yml \
51 prom/prometheus:v1.7.1
54 sudo docker run --name bottlenecks-grafana \
56 -v ${MONITOR_CONFIG}/grafana.ini:/etc/grafana/grafana.ini \
58 # Automate Prometheus Datasource and Grafana Dashboard creation
62 python dashboard/automated_dashboard_datasource.py
67 --volume=/:/rootfs:ro \
68 --volume=/var/run:/var/run:rw \
69 --volume=/sys:/sys:ro \
70 --volume=/var/lib/docker/:/var/lib/docker:ro \
71 --volume=/dev/disk/:/dev/disk:ro \
74 --name=bottlenecks-cadvisor \
75 google/cadvisor:v0.25.0
79 # Configure IP Address in barometer server configuration
81 python ${DISPATCH}/server_ip_configure.py ${MONITOR_CONFIG}/barometer_server.conf
84 # Install on jumpserver
85 docker pull opnfv/barometer
86 sudo docker run --name bottlenecks-barometer -tid --net=host \
87 -v ${MONITOR_CONFIG}/barometer_server.conf:/src/barometer/src/collectd/collectd/src/collectd.conf \
88 -v ${MONITOR_CONFIG}/barometer_server.conf:/opt/collectd/etc/collectd.conf \
89 -v /var/run:/var/run \
91 --privileged opnfv/barometer /run_collectd.sh
95 # INSTALL BAROMETER + CADVISOR (+ COLLECTD) CLIENTS on COMPUTE/CONTROL NODES
96 # Configure IP Address in barometer client configuration
97 python ${DISPATCH}/client_ip_configure.py ${MONITOR_CONFIG}/barometer_client.conf
99 # Automate Barometer client installation
100 python ${DISPATCH}/automate_barometer_client.py
102 # # Configure IP Address in collectd client configuration
103 # python ${DISPATCH}/client_ip_configure.py ${MONITOR_CONFIG}/collectd_client.conf
104 # # Automate Collectd Client installation
105 # python ${DISPATCH}/automate_collectd_client.py
107 # Automate Cadvisor Client
108 python ${DISPATCH}/automate_cadvisor_client.py
110 echo == installation of monitoring module is finished ==