Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 2887cbe

Browse files
tzolovchrisjs
authored andcommitted
Remove SCDF_HOST_IP from docker-compose
- For getting starter docker-compose replace the SCDF_HOST_IP by explicit dataflow-server and skipper-server container names. Resolves #3160
1 parent 1bc64ac commit 2887cbe

File tree

7 files changed

+12
-26
lines changed

7 files changed

+12
-26
lines changed

spring-cloud-dataflow-docs/src/main/asciidoc/getting-started-local.adoc

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,18 @@ To get started, you need to start Docker Compose. To do so:
5959
----
6060
$ export DATAFLOW_VERSION={local-server-image-tag}
6161
$ export SKIPPER_VERSION={skipper-version}
62-
$ export SCDF_HOST_IP=your-hsot-ip
6362
$ docker-compose up
6463
----
6564
====
6665

67-
The `docker-compose.yml` file defines `DATAFLOW_VERSION`, `SKIPPER_VERSION` and `SCDF_HOST_IP` variables, so that those values can be easily changed. The preceding commands first set the `DATAFLOW_VERSION`, `SKIPPER_VERSION` and `SCDF_HOST_IP` to use in the environment. Then `docker-compose` is started.
66+
The `docker-compose.yml` file defines `DATAFLOW_VERSION` and `SKIPPER_VERSION` variables, so that those values can be easily changed. The preceding commands first set the `DATAFLOW_VERSION` and`SKIPPER_VERSION` to use in the environment. Then `docker-compose` is started.
6867

69-
You can use the `ifconfig` (for linux/macos) or `ipconfig` (for Windows) command line toolkit to obtain the IP address to set in `SCDF_HOST_IP`. Note that `127.0.0.1` is not a valid option.
70-
71-
You can also use a shorthand version that exposes only the `DATAFLOW_VERSION`, `SKIPPER_VERSION` and `SCDF_HOST_IP` variables to the `docker-compose` process (rather than setting it in the environment), as follows:
68+
You can also use a shorthand version that exposes only the `DATAFLOW_VERSION` and `SKIPPER_VERSION` variables to the `docker-compose` process (rather than setting it in the environment), as follows:
7269

7370
====
7471
[source,bash,subs=attributes]
7572
----
76-
$ DATAFLOW_VERSION={local-server-image-tag} SKIPPER_VERSION={skipper-version} SCDF_HOST_IP=Your-Host-IP docker-compose up
73+
$ DATAFLOW_VERSION={local-server-image-tag} SKIPPER_VERSION={skipper-version} docker-compose up
7774
----
7875
====
7976

@@ -84,7 +81,6 @@ If you use Windows, environment variables are defined by using the `set` command
8481
----
8582
C:\ set DATAFLOW_VERSION={local-server-image-tag}
8683
C:\ set SKIPPER_VERSION={skipper-version}
87-
C:\ set SCDF_HOST_IP=Your-Host-IP
8884
C:\ docker-compose up
8985
----
9086
====
@@ -444,7 +440,6 @@ You can use InfluxDB rather than Prometheus for monitoring time-series database.
444440
- metrics.prometheus.target.refresh.cron=0/20 * * * * *
445441
- metrics.prometheus.target.discovery.url=http://localhost:9393/runtime/apps
446442
- metrics.prometheus.target.file.path=/tmp/targets.json
447-
- 'SCDF_HOST_IP=${SCDF_HOST_IP:?SCDF_HOST_IP is not set! Use "export SCDF_HOST_IP=<SCDF Server IP>". Note: 127.0.0.1 is not a valid option!}'
448443
depends_on:
449444
- dataflow-server
450445
----

spring-cloud-dataflow-docs/src/main/asciidoc/streams-monitoring-local.adoc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ You can use `ifconfig` to find out your IP address.
4343
----
4444
export SCDF_HOST_IP=<YOUR locahost IP address>
4545
----
46-
In many cases the provided `find_host_ip.sh` script will give you the IP address.
47-
[source,bash]
48-
----
49-
source ./find_host_ip.sh
50-
----
5146

5247
Start Prometheus, Grafana + Service-Discovery using `docker-compose`.
5348
[source,bash]

spring-cloud-dataflow-server/docker-compose.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ services:
7979
# The service-discovery container. Required for Prometheus setup only
8080
# Use `docker exec -it service-discovery /bin/sh` to logging the container
8181
service-discovery:
82-
image: springcloud/spring-cloud-dataflow-prometheus-service-discovery:0.0.3.RELEASE
82+
image: springcloud/spring-cloud-dataflow-prometheus-service-discovery:0.0.4.RELEASE
8383
container_name: 'service-discovery'
8484
volumes:
8585
- 'scdf-targets:/tmp/scdf-targets/'
@@ -90,12 +90,13 @@ services:
9090
environment:
9191
- metrics.prometheus.target.cron=0/20 * * * * *
9292
- metrics.prometheus.target.filePath=/tmp/scdf-targets/targets.json
93+
- metrics.prometheus.target.discoveryUrl=http://dataflow-server:9393/runtime/apps
94+
- metrics.prometheus.target.overrideIp=skipper-server
9395
- server.port=8181
94-
- 'SCDF_HOST_IP=${SCDF_HOST_IP:?SCDF_HOST_IP is not set! Use "export SCDF_HOST_IP=<SCDF Server IP>". Note: 127.0.0.1 is not a valid option!}'
9596
depends_on:
9697
- dataflow-server
9798

98-
# Grafana SCDF Prometheus/InfluxDB pre-built image:
99+
# Grafana SCDF Prometheus pre-built image:
99100
grafana:
100101
image: springcloud/spring-cloud-dataflow-grafana-prometheus:${DATAFLOW_VERSION:?DATAFLOW_VERSION is not set! Use 'export DATAFLOW_VERSION=local-server-image-tag'}
101102
container_name: 'grafana'

src/grafana/prometheus/docker/docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
# The service-discovery container.
2222
# Use `docker exec -it service-discovery /bin/sh` to logging the container
2323
service-discovery:
24-
image: springcloud/spring-cloud-dataflow-prometheus-service-discovery:0.0.2
24+
image: springcloud/spring-cloud-dataflow-prometheus-service-discovery:0.0.4.RELEASE
2525
container_name: 'service-discovery'
2626
volumes:
2727
- 'scdf-targets:/tmp/scdf-targets/'
@@ -30,8 +30,8 @@ services:
3030
ports:
3131
- '8181:8181'
3232
environment:
33-
- 'SCDF_HOST_IP=${SCDF_HOST_IP:?SCDF_HOST_IP is not set!
34-
Use "export SCDF_HOST_IP=<SCDF Server IP>". Note: 127.0.0.1 is not a valid option!}'
33+
- metrics.prometheus.target.discoveryUrl=http://${SCDF_HOST_IP}:9393/runtime/apps
34+
- metrics.prometheus.target.overrideIp=${SCDF_HOST_IP}
3535

3636
volumes:
3737
scdf-targets:

src/grafana/prometheus/docker/find_host_ip.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/grafana/prometheus/docker/grafana/provisioning/datasources/all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ datasources:
33
type: 'prometheus'
44
access: 'proxy'
55
org_id: 1
6-
url: 'https://prometheus:9090'
6+
url: 'http://prometheus:9090'
77
is_default: true
88
version: 5
99
editable: true

src/kubernetes/grafana/grafana-configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ data:
1212
type: prometheus
1313
access: proxy
1414
org_id: 1
15-
url: https://prometheus:9090
15+
url: http://prometheus:9090
1616
is_default: true
1717
version: 5
1818
editable: true

0 commit comments

Comments
 (0)