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

Commit fd7209f

Browse files
committed
Fix ITs task ports conflict
- For DooD mode configure the Task port range 20200-61000 to be outside the default APPS_PORT_RANGE. - Fix a missing DockerComposeFactoryProperties.TEST_DOCKER_COMPOSE_APPS_PORT_RANGE support to allow the DockerComposeFactory control the (in Skipper running) apps port range when running DataFlowIT. - Revoke debug logging for cloud.deployer.spi.local. Resolves #4712
1 parent 0d28a00 commit fd7209f

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

spring-cloud-dataflow-server/src/test/java/org/springframework/cloud/dataflow/integration/test/util/DockerComposeFactory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ public class DockerComposeFactory {
107107
DockerComposeFactoryProperties.get(DockerComposeFactoryProperties.TEST_DOCKER_COMPOSE_STREAM_APPS_URI, (isDood ? KAFKA_DOCKER_STREAM_APPS_URI : DEFAULT_STREAM_APPS_URI)))
108108
.withAdditionalEnvironmentVariable("TASK_APPS_URI",
109109
DockerComposeFactoryProperties.get(DockerComposeFactoryProperties.TEST_DOCKER_COMPOSE_TASK_APPS_URI, (isDood ? "https://dataflow.spring.io/task-docker-latest" : DEFAULT_TASK_APPS_URI)))
110+
.withAdditionalEnvironmentVariable("APPS_PORT_RANGE",
111+
DockerComposeFactoryProperties.get(DockerComposeFactoryProperties.TEST_DOCKER_COMPOSE_APPS_PORT_RANGE, "20000-20195:20000-20195"))
110112
.withAdditionalEnvironmentVariable("DOCKER_DELETE_CONTAINER_ON_EXIT",
111113
"" + DockerComposeFactoryProperties.getBoolean(DockerComposeFactoryProperties.TEST_DOCKER_COMPOSE_DOCKER_DELETE_CONTAINER_ON_EXIT, true))
112114
.withAdditionalEnvironmentVariable("METADATA_DEFAULT_DOCKERHUB_USER", DockerComposeFactoryProperties.get("METADATA_DEFAULT_DOCKERHUB_USER", ""))

spring-cloud-dataflow-server/src/test/resources/docker-compose-it.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@ version: '3'
44
# reusing the parent DockerHub credentials.
55
services:
66
dataflow-server:
7-
environment:
8-
- LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_CLOUD_DEPLOYER_SPI_LOCAL=DEBUG
97
volumes:
108
- ${SCDF_DOCKER_CONFIG:-~/.docker}:/root/.docker
119
skipper-server:
12-
environment:
13-
- LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_CLOUD_DEPLOYER_SPI_LOCAL=DEBUG
1410
volumes:
1511
- ${SCDF_DOCKER_CONFIG:-~/.docker}:/root/.docker

src/docker-compose/docker-compose-dood.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,15 @@ services:
3333
environment:
3434
- SPRING_CLOUD_DATAFLOW_TASK_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_DOCKER_NETWORK=${COMPOSE_PROJECT_NAME:?COMPOSE_PROJECT_NAME must be set when DooD is enabled}_default
3535
- SPRING_CLOUD_DATAFLOW_TASK_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_DOCKER_DELETE_CONTAINER_ON_EXIT=${DOCKER_DELETE_CONTAINER_ON_EXIT:-true}
36+
# The Docker's apps port range must not overlap with the APPS_PORT_RANGE (the ports reserved to be used
37+
# by the stream , maven, apps running inside the Skipper container)! The APPS_PORT_RANGE are set
38+
# in the docker-compose.yaml#skipper-server. Tip: you can change the APPS_PORT_RANGE instead.
39+
- SPRING_CLOUD_DATAFLOW_TASK_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_DOCKER_PORTRANGE_LOW=20200
40+
- SPRING_CLOUD_DATAFLOW_TASK_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_DOCKER_PORTRANGE_HIGH=61000
41+
3642
# Override the CTR form maven to docker
3743
- SPRING_CLOUD_DATAFLOW_TASK_COMPOSEDTASKRUNNER_URI=docker://springcloud/spring-cloud-dataflow-composed-task-runner:${DATAFLOW_VERSION:-2.9.0-SNAPSHOT}${BP_JVM_VERSION:-}
3844
- SPRING_CLOUD_DATAFLOW_SERVER_URI=${DATAFLOW_URI:-http://dataflow-server:9393}
39-
- LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_CLOUD_DEPLOYER_SPI_LOCAL=DEBUG
4045
entrypoint: >
4146
bin/sh -c "
4247
apt-get update && apt-get install --no-install-recommends -y wget &&
@@ -54,10 +59,11 @@ services:
5459
environment:
5560
- SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_DOCKER_NETWORK=${COMPOSE_PROJECT_NAME:?COMPOSE_PROJECT_NAME must be set when DooD is enabled}_default
5661
- SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_DOCKER_DELETE_CONTAINER_ON_EXIT=${DOCKER_DELETE_CONTAINER_ON_EXIT:-true}
57-
# The Docker's apps port range must not overlap with the APPS_PORT_RANGE (e.g. the ports used by the stream apps running inside the Skipper container) !
62+
# The Docker's apps port range must not overlap with the APPS_PORT_RANGE (the ports reserved to be used
63+
# by the stream , maven, apps running inside the Skipper container)! The APPS_PORT_RANGE are set
64+
# in the docker-compose.yaml#skipper-server. Tip: you can change the APPS_PORT_RANGE instead.
5865
- SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_DOCKER_PORTRANGE_LOW=20200
5966
- SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_DOCKER_PORTRANGE_HIGH=61000
60-
- LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_CLOUD_DEPLOYER_SPI_LOCAL=DEBUG
6167
entrypoint: >
6268
bin/sh -c "
6369
apt-get update && apt-get install --no-install-recommends -y wget &&

src/templates/docker-compose/docker-compose-dood.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,15 @@ services:
3333
environment:
3434
- SPRING_CLOUD_DATAFLOW_TASK_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_DOCKER_NETWORK=${COMPOSE_PROJECT_NAME:?COMPOSE_PROJECT_NAME must be set when DooD is enabled}_default
3535
- SPRING_CLOUD_DATAFLOW_TASK_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_DOCKER_DELETE_CONTAINER_ON_EXIT=${DOCKER_DELETE_CONTAINER_ON_EXIT:-true}
36+
# The Docker's apps port range must not overlap with the APPS_PORT_RANGE (the ports reserved to be used
37+
# by the stream , maven, apps running inside the Skipper container)! The APPS_PORT_RANGE are set
38+
# in the docker-compose.yaml#skipper-server. Tip: you can change the APPS_PORT_RANGE instead.
39+
- SPRING_CLOUD_DATAFLOW_TASK_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_DOCKER_PORTRANGE_LOW=20200
40+
- SPRING_CLOUD_DATAFLOW_TASK_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_DOCKER_PORTRANGE_HIGH=61000
41+
3642
# Override the CTR form maven to docker
3743
- SPRING_CLOUD_DATAFLOW_TASK_COMPOSEDTASKRUNNER_URI=docker://springcloud/spring-cloud-dataflow-composed-task-runner:${DATAFLOW_VERSION:[email protected]@}${BP_JVM_VERSION:-}
3844
- SPRING_CLOUD_DATAFLOW_SERVER_URI=${DATAFLOW_URI:-http://dataflow-server:9393}
39-
- LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_CLOUD_DEPLOYER_SPI_LOCAL=DEBUG
4045
entrypoint: >
4146
bin/sh -c "
4247
apt-get update && apt-get install --no-install-recommends -y wget &&
@@ -54,10 +59,11 @@ services:
5459
environment:
5560
- SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_DOCKER_NETWORK=${COMPOSE_PROJECT_NAME:?COMPOSE_PROJECT_NAME must be set when DooD is enabled}_default
5661
- SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_DOCKER_DELETE_CONTAINER_ON_EXIT=${DOCKER_DELETE_CONTAINER_ON_EXIT:-true}
57-
# The Docker's apps port range must not overlap with the APPS_PORT_RANGE (e.g. the ports used by the stream apps running inside the Skipper container) !
62+
# The Docker's apps port range must not overlap with the APPS_PORT_RANGE (the ports reserved to be used
63+
# by the stream , maven, apps running inside the Skipper container)! The APPS_PORT_RANGE are set
64+
# in the docker-compose.yaml#skipper-server. Tip: you can change the APPS_PORT_RANGE instead.
5865
- SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_DOCKER_PORTRANGE_LOW=20200
5966
- SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_DOCKER_PORTRANGE_HIGH=61000
60-
- LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_CLOUD_DEPLOYER_SPI_LOCAL=DEBUG
6167
entrypoint: >
6268
bin/sh -c "
6369
apt-get update && apt-get install --no-install-recommends -y wget &&

0 commit comments

Comments
 (0)