Skip to content

Commit

Permalink
Updates src/local/README.md with information on the scripts.
Browse files Browse the repository at this point in the history
Removes create-containers.sh that used jib
Adds comment to application-dataflow-keycloak.yaml on client-secret.
  • Loading branch information
corneil committed Dec 11, 2024
1 parent 7e0244c commit 94862fd
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 72 deletions.
21 changes: 14 additions & 7 deletions src/local/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,20 @@ Downloads all applications needed by `create-containers.sh` from Maven repositor
Usage: `download-apps.sh [version]`
* `version` is the dataflow-server version like `2.10.3`. Default is `2.11.3-SNAPSHOT`

## `create-containers.sh`
Creates all containers and pushes to local docker registry.
## `launch-dataflow.sh`
Uses docker compose to launch a database, broker, skipper and dataflow server.

This script requires [jib-cli](https://github.com/GoogleContainerTools/jib/tree/master/jib-cli)
## `launch-with-keycloak.sh`
Uses docker compose to launch a database, broker, skipper and dataflow server and a Keycloak server that loads the `dataflow` realm from `./src/local/data` which define a single user named `joe` with password `password`

Usage: `create-containers.sh [version] [jre-version]`
* `version` is the dataflow-server version like `2.9.6`. Default is `2.11.3-SNAPSHOT`
* `jre-version` should be one of 11, 17. Default is 11
## `stop-dataflow.sh`
Stops docker-compose and all running Java instances based on the pid files.

## `launch-keycloak.sh`
Launches standalone Keycloak and loads the dataflow realm from `./src/local/data` which define a single user named `joe` with password `password`

## `tail-container-log.sh`
Finds a container with provided name and tails the stdout of the container.

## Testing with Keycloak
### Build with Java 17
Expand All @@ -39,4 +44,6 @@ Arguments: `--spring.cloud.dataflow.features.streams-enabled=false --spring.clou

### Run

java -jar spring-cloud-dataflow-server/target/spring-cloud-dataflow-server-3.0.0-SNAPSHOT.jar --spring.cloud.dataflow.features.streams-enabled=false --spring.cloud.dataflow.features.tasks-enabled=true --spring.cloud.dataflow.features.schedules-enabled=false --spring.config.additional-location="src/local/application-dataflow-keycloak.yaml"
```shell
java -jar spring-cloud-dataflow-server/target/spring-cloud-dataflow-server-3.0.0-SNAPSHOT.jar --spring.cloud.dataflow.features.streams-enabled=false --spring.cloud.dataflow.features.tasks-enabled=true --spring.cloud.dataflow.features.schedules-enabled=false --spring.config.additional-location="src/local/application-dataflow-keycloak.yaml"
```
2 changes: 2 additions & 0 deletions src/local/application-dataflow-keycloak.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spring:
redirect-uri: '{baseUrl}/login/oauth2/code/{registrationId}'
client-id: 'dataflow'
client-name: 'dataflow'
# aligns with the realm imported from the data directory
client-secret: '090RucamvekrMLyGHMr4lkHX9xhAlsqK'
provider: 'keycloak'
authorization-grant-type: 'authorization_code'
Expand All @@ -41,6 +42,7 @@ spring:
opaquetoken:
introspection-uri: http://localhost:8080/realms/dataflow/protocol/openid-connect/token/introspect
client-id: 'dataflow'
# aligns with the realm imported from the data directory
client-secret: '090RucamvekrMLyGHMr4lkHX9xhAlsqK'

logging:
Expand Down
2 changes: 2 additions & 0 deletions src/local/application-skipper-keycloak.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spring:
redirect-uri: '{baseUrl}/login/oauth2/code/{registrationId}'
client-id: 'dataflow'
client-name: 'dataflow'
# aligns with the realm imported from the data directory
client-secret: '090RucamvekrMLyGHMr4lkHX9xhAlsqK'
provider: 'keycloak'
authorization-grant-type: 'authorization_code'
Expand All @@ -41,4 +42,5 @@ spring:
opaquetoken:
introspection-uri: http://localhost:8080/realms/dataflow/protocol/openid-connect/token/introspect
client-id: 'dataflow'
# aligns with the realm imported from the data directory
client-secret: '090RucamvekrMLyGHMr4lkHX9xhAlsqK'
64 changes: 0 additions & 64 deletions src/local/create-containers.sh

This file was deleted.

1 change: 0 additions & 1 deletion src/local/launch-with-keycloak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,4 @@ echo "$!" > dataflow.pid
echo "Waiting for Data Flow Server"
wget --retry-connrefused --read-timeout=20 --timeout=15 --tries=10 --continue -q http://localhost:9393
echo "Data flow running"
# docker run -v ${SCDIR}/data:/opt/keycloak/data/import -p 8080:8080 -e KC_BOOTSTRAP_ADMIN_USERNAME=admin -e KC_BOOTSTRAP_ADMIN_PASSWORD=admin keycloak/keycloak:25.0 start-dev --import-realm --verbose
fi

0 comments on commit 94862fd

Please sign in to comment.