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 ##############################################################################
11 MONITOR_CONFIG="/home/opnfv/bottlenecks/monitor/config"
12 GRAFANA="/home/opnfv/bottlenecks/monitor/grafana"
15 sudo docker run --name bottlenecks-node-exporter \
17 -v "/proc:/host/proc:ro" \
18 -v "/sys:/host/sys:ro" \
21 quay.io/prometheus/node-exporter:v0.14.0 \
22 -collector.procfs /host/proc \
23 -collector.sysfs /host/sys \
24 -collector.filesystem.ignored-mount-points "^/(sys|proc|dev|host|etc)($|/)"
27 sudo docker run --name bottlenecks-collectd -d \
29 -v ${MONITOR_CONFIG}:/etc/collectd:ro \
30 -v /proc:/mnt/proc:ro \
31 fr3nd/collectd:5.5.0-1
34 sudo docker run --name bottlenecks-collectd-exporter \
36 -p 25826:25826/udp prom/collectd-exporter:0.3.1 \
37 -collectd.listen-address=":25826"
40 sudo docker run --name bottlenecks-prometheus \
42 -v ${MONITOR_CONFIG}/prometheus.yaml:/etc/prometheus/prometheus.yml \
43 prom/prometheus:v1.7.1
46 sudo docker run --name bottlenecks-grafana \
48 -v ${GRAFANA}/config/grafana.ini:/etc/grafana/grafana.ini \
53 --volume=/:/rootfs:ro \
54 --volume=/var/run:/var/run:rw \
55 --volume=/sys:/sys:ro \
56 --volume=/var/lib/docker/:/var/lib/docker:ro \
57 --volume=/dev/disk/:/dev/disk:ro \
61 google/cadvisor:v0.25.0 \ -storage_driver=Prometheus
63 # Configure IP Address in barometer client configuration
64 python client_ip_configure.py barometer_client.conf
66 # Configure IP Address in barometer server configuration
67 python server_ip_configure.py barometer-collectd.conf
69 # Automate Collectd Client
70 python automate_collectd_client.py
72 # Automate Cadvisor Client
73 python automate_cadvisor_client.py
75 # Automate Barometer installation for jump server
76 bash ./barometer-install-script.sh
78 # Automate Barometer installation for compute/controller nodes
79 python barometer_automated_client_install.py
81 # Automate Prometheus Datasource and Grafana Dashboard creation
82 python automated-dashboard-datasource.py