-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testing: updated docker-compose.yml (MINOR) (#5245)
* testing: updated docker-compose.yml Commit adds utility `up` script to bring up docker images, wait for ksql to be responsive, and then load the cli. `down` to bring everything down again. `.env` file added with environment vars for setting docker version. updated some outdated links too. Co-authored-by: Andy Coates <[email protected]>
- Loading branch information
1 parent
4c351d2
commit b252fae
Showing
6 changed files
with
63 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Sets environment variables used in docker-compose.yml | ||
|
||
# Set to specific version needed, e.g. 5.5.0 | ||
CP_VERSION=latest | ||
|
||
# Set to the specific version needed, e.g. 0.9.1, or local.build | ||
KSQL_VERSION=latest | ||
|
||
KSQL_IMAGE_BASE= | ||
|
||
# For locally built images the following settings should be uncommented | ||
#KSQL_VERSION=local.build | ||
#KSQL_IMAGE_BASE=placeholder/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
# exit when any command fails | ||
set -e | ||
|
||
echo -e "## Bringing down containers:\n" | ||
docker-compose down -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# exit when any command fails | ||
set -e | ||
|
||
echo -e "## Bringing up containers:\n" | ||
docker-compose up -d | ||
|
||
echo -e "\n## Waiting for ksqlDB to start:" | ||
until curl -s --fail -X "POST" "http://localhost:8088/ksql" \ | ||
-H "Content-Type: application/json; charset=utf-8" \ | ||
-d '{"ksql":"SHOW STREAMS;"}' | ||
do | ||
sleep 5 | ||
echo -n "." | ||
done | ||
|
||
echo -e "\n## Starting ksqlDB CLI:\n" | ||
docker exec -it ksqldb-cli ksql http://primary-ksqldb-server:8088 | ||
|
||
|
||
|
||
|