Exposing PM and ELK stack ports 45/6645/3
authorEduardo Sousa <esousa@whitestack.com>
Mon, 8 Oct 2018 09:36:17 +0000 (10:36 +0100)
committerEduardo Sousa <esousa@whitestack.com>
Tue, 9 Oct 2018 09:18:55 +0000 (10:18 +0100)
Change-Id: I72476acb6edbec2be3a12a08cfa8c3ca2e35d346
Signed-off-by: Eduardo Sousa <esousa@whitestack.com>
installers/docker/osm_elk/docker-compose.yml
installers/docker/osm_metrics/docker-compose.yml
installers/full_install_osm.sh

index c74eb67..9f03c4f 100644 (file)
@@ -28,7 +28,7 @@ services:
     volumes:
       - ./kibana.yml:/usr/share/kibana/config/kibana.yml:ro
     ports:
-      - "5601:5601"
+      - "${OSM_ELK_PORTS:-5601:5601}"
     networks:
       - elk
     depends_on:
index e2ba5c9..f529a01 100644 (file)
@@ -28,7 +28,7 @@ services:
       - ./datasource-prometheus.yml:/etc/grafana/provisioning/datasources/datasource-prometheus.yml
     hostname: grafana
     ports:
-      - "3000:3000"
+      - "${OSM_PM_PORTS:-3000:3000}"
     networks:
       - netOSM
     depends_on:
index cd82909..3515797 100755 (executable)
@@ -791,19 +791,25 @@ function deploy_lightweight() {
     OSM_KEYSTONE_PORT=5000
     OSM_UI_PORT=80
     OSM_MON_PORT=8662
-
+    [ -n "$INSTALL_ELK" ] && OSM_ELK_PORT=5601
+    [ -n "$INSTALL_PERFMON" ] && OSM_PM_PORT=3000
+    
     if [ -n "$NO_HOST_PORTS" ]; then
         OSM_PORTS+=(OSM_NBI_PORTS=$OSM_NBI_PORT)
         OSM_PORTS+=(OSM_RO_PORTS=$OSM_RO_PORT)
         OSM_PORTS+=(OSM_KEYSTONE_PORTS=$OSM_KEYSTONE_PORT)
         OSM_PORTS+=(OSM_UI_PORTS=$OSM_UI_PORT)
         OSM_PORTS+=(OSM_MON_PORTS=$OSM_MON_PORT)
+        [ -n "$INSTALL_PERFMON" ] && OSM_PORTS+=(OSM_PM_PORTS=$OSM_PM_PORT)
+        [ -n "$INSTALL_ELK" ] && OSM_PORTS+=(OSM_ELK_PORTS=$OSM_ELK_PORT)
     else
         OSM_PORTS+=(OSM_NBI_PORTS=$OSM_NBI_PORT:$OSM_NBI_PORT)
         OSM_PORTS+=(OSM_RO_PORTS=$OSM_RO_PORT:$OSM_RO_PORT)
         OSM_PORTS+=(OSM_KEYSTONE_PORTS=$OSM_KEYSTONE_PORT:$OSM_KEYSTONE_PORT)
         OSM_PORTS+=(OSM_UI_PORTS=$OSM_UI_PORT:$OSM_UI_PORT)
         OSM_PORTS+=(OSM_MON_PORTS=$OSM_MON_PORT:$OSM_MON_PORT)
+        [ -n "$INSTALL_PERFMON" ] && OSM_PORTS+=(OSM_PM_PORTS=$OSM_PM_PORT:$OSM_PM_PORT)
+        [ -n "$INSTALL_ELK" ] && OSM_PORTS+=(OSM_ELK_PORTS=$OSM_ELK_PORT:$OSM_ELK_PORT)
     fi
     echo "export ${OSM_PORTS[@]}" | $WORKDIR_SUDO tee $OSM_DOCKER_WORK_DIR/osm_ports.sh
     echo "export OSM_NETWORK=net${OSM_STACK_NAME}" | $WORKDIR_SUDO tee --append $OSM_DOCKER_WORK_DIR/osm_ports.sh