Sphinx documentation configuration files
[eliot.git] / blueprints / iotgateway / scripts / prometheus.sh
1 #!/bin/bash -ex
2 ##############################################################################
3 # Copyright (c) 2019 Huawei Tech and others.
4 #
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 ##############################################################################
10
11 # start
12 PROMETHEUS_HOST_PORT="9090"
13 PROMETHEUS_CONTAINTER_PORT="9090"
14 #cp ci_management/prometheus.yml $HOME
15
16 echo "**********************************************************************"
17 echo "Prometheus setup ----------------------------------------------STARTED"
18
19
20 source generatePromeyml.sh
21 if [ ! -d "/etc/prometheus" ]; then
22   sudo mkdir /etc/prometheus
23 fi
24
25 sudo docker run -p ${PROMETHEUS_HOST_PORT}:${PROMETHEUS_CONTAINTER_PORT} \
26      -v ~/prometheus.yml:/etc/prometheus/prometheus.yml \
27      -d prom/prometheus \
28      --config.file=/etc/prometheus/prometheus.yml 
29
30 echo "Prometheus setup ----------------------------------------------SUCCESS"
31 echo "**********************************************************************"