Skip to content

Commit

Permalink
[NU-1740] README (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
mk-software-pl authored Sep 3, 2024
1 parent ea29a47 commit 0ce2fb7
Show file tree
Hide file tree
Showing 6 changed files with 424 additions and 24 deletions.
387 changes: 387 additions & 0 deletions README.md

Large diffs are not rendered by default.

44 changes: 24 additions & 20 deletions scenario-examples-bootstrapper/data/keep-sending.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,27 @@ cd "$(dirname "$0")"

source ../utils/lib.sh

magenta_echo "-------- DATA GENERATION ACTIVATION STAGE is starting... ------\n"

shopt -s nullglob

for FOLDER in /scenario-examples/*; do
if is_scenario_enabled "$FOLDER"; then
echo -e "Starting to send static and generated data for scenario from ${GREEN}$FOLDER${RESET} directory...\n\n"

./http/send-http-static-requests.sh "$FOLDER"
./kafka/send-kafka-static-messages.sh "$FOLDER"
./http/continuously-send-http-generated-requests.sh "$FOLDER"
./kafka/continuously-send-kafka-generated-messages.sh "$FOLDER"

echo -e "Static data sent and generators from ${GREEN}$FOLDER${RESET} directory are runnning!\n\n"
else
echo -e "Skipping sending static and generated data for scenario from ${GREEN}$FOLDER${RESET} directory.\n"
fi
done

magenta_echo "-------- DATA GENERATION ACTIVATION STAGE is finished! --------\n\n"
if is_data_generation_active; then
magenta_echo "-------- DATA GENERATION ACTIVATION STAGE is starting... ------\n"

shopt -s nullglob

for FOLDER in /scenario-examples/*; do
if is_scenario_enabled "$FOLDER"; then
echo -e "Starting to send static and generated data for scenario from ${GREEN}$FOLDER${RESET} directory...\n\n"

./http/send-http-static-requests.sh "$FOLDER"
./kafka/send-kafka-static-messages.sh "$FOLDER"
./http/continuously-send-http-generated-requests.sh "$FOLDER"
./kafka/continuously-send-kafka-generated-messages.sh "$FOLDER"

echo -e "Static data sent and generators from ${GREEN}$FOLDER${RESET} directory are runnning!\n\n"
else
echo -e "Skipping sending static and generated data for scenario from ${GREEN}$FOLDER${RESET} directory.\n"
fi
done

magenta_echo "-------- DATA GENERATION ACTIVATION STAGE is finished! --------\n\n"
else
magenta_echo "-------- DATA GENERATION IS DISABLED! ------\n"
fi
2 changes: 1 addition & 1 deletion scenario-examples-bootstrapper/run-mocks-setup-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ rm -rf /app/healthy
if /app/mocks/db/is-postgres-ready.sh && /app/mocks/http-service/is-wiremock-ready.sh; then
green_echo "------ Nu scenarios library is being prepared... ---------\n"

if is_embedded_examples_active; then
if are_embedded_examples_active; then
mkdir -p /scenario-examples
mv /tmp/scenario-examples/* /scenario-examples/
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function customize_nu_configuration() {

echo "Starting to customize Nu configuration..."

mkdir -p "$CONFS_DIR"
touch "$APP_CUSTOMIZATION_FILE_PATH"

shopt -s nullglob
Expand Down
12 changes: 10 additions & 2 deletions scenario-examples-bootstrapper/utils/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,16 @@ function is_scenario_enabled() {
return 0
}

function is_embedded_examples_active() {
if [[ "${DISABLE_EMBDEDED_EXAMPLES,,}" == "true" ]]; then
function are_embedded_examples_active() {
if [[ "${DISABLE_EMBEDDED_EXAMPLES,,}" == "true" ]]; then
return 1
else
return 0
fi
}

function is_data_generation_active() {
if [[ "${DISABLE_DATA_GENERATION,,}" == "true" ]]; then
return 1
else
return 0
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
LIBRARY_DOCKER_IMAGE_VERSION=0.1.0
LIBRARY_DOCKER_IMAGE_VERSION=0.2.0

0 comments on commit 0ce2fb7

Please sign in to comment.