Merge "feature(prometheus): Configuration can be dynamically replaced"
authorbeierlm <mark.beierl@canonical.com>
Thu, 30 Apr 2020 18:52:01 +0000 (20:52 +0200)
committerGerrit Code Review <root@osm.etsi.org>
Thu, 30 Apr 2020 18:52:01 +0000 (20:52 +0200)
1  2 
installers/full_install_osm.sh

@@@ -537,16 -520,21 +537,24 @@@ function generate_docker_env_files() 
      else
          # Docker-compose
          $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/docker-compose.yaml $OSM_DOCKER_WORK_DIR/docker-compose.yaml
 +        if [ -n "$INSTALL_PLA" ]; then
 +            $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/osm_pla/docker-compose.yaml $OSM_DOCKER_WORK_DIR/osm_pla/docker-compose.yaml
 +        fi
  
-         # Prometheus
-         $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/files/prometheus.yml $OSM_DOCKER_WORK_DIR/prometheus.yml
+         # Prometheus files
+         $WORKDIR_SUDO mkdir -p $OSM_DOCKER_WORK_DIR/prometheus
+         $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/prometheus/prometheus.yml $OSM_DOCKER_WORK_DIR/prometheus/prometheus.yml
  
-         # Grafana & Prometheus Exporter files
-         $WORKDIR_SUDO mkdir -p $OSM_DOCKER_WORK_DIR/files
-         $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/files/* $OSM_DOCKER_WORK_DIR/files/
+         # Grafana files
+         $WORKDIR_SUDO mkdir -p $OSM_DOCKER_WORK_DIR/grafana
+         $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/grafana/dashboards-osm.yml $OSM_DOCKER_WORK_DIR/grafana/dashboards-osm.yml
+         $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/grafana/datasource-prometheus.yml $OSM_DOCKER_WORK_DIR/grafana/datasource-prometheus.yml
+         $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/grafana/osm-sample-dashboard.json $OSM_DOCKER_WORK_DIR/grafana/osm-sample-dashboard.json
+         $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/grafana/osm-system-dashboard.json $OSM_DOCKER_WORK_DIR/grafana/osm-system-dashboard.json
+         # Prometheus Exporters files
+         $WORKDIR_SUDO mkdir -p $OSM_DOCKER_WORK_DIR/prometheus_exporters
+         $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/prometheus_exporters/node_exporter.service $OSM_DOCKER_WORK_DIR/prometheus_exporters/node_exporter.service
      fi
  
      # LCM