mirror of
https://github.com/hoshikawa2/agent_platform_oci.git
synced 2026-09-07 18:23:46 +00:00
Testes de Carga: /deploy/oke/load-test
This commit is contained in:
31
deploy/oke/load-test/scripts/prepare_env.sh
Normal file
31
deploy/oke/load-test/scripts/prepare_env.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../.." && pwd)"
|
||||
LT="$ROOT/deploy/oke/load-test"
|
||||
BASE="$ROOT/templates/agent_template_backend/.env"
|
||||
DEFAULTS="$LT/.env.loadtest.example"
|
||||
OVERRIDE="$LT/.env.loadtest"
|
||||
|
||||
[[ -f "$BASE" ]] || { echo "ERROR: backend env not found: $BASE" >&2; exit 1; }
|
||||
[[ -f "$DEFAULTS" ]] || { echo "ERROR: load-test defaults not found: $DEFAULTS" >&2; exit 1; }
|
||||
|
||||
args=(
|
||||
--base "$BASE"
|
||||
--overlay "$DEFAULTS"
|
||||
--output "$LT/.env.runtime"
|
||||
--langfuse-env "$LT/.env.langfuse"
|
||||
)
|
||||
|
||||
if [[ -f "$OVERRIDE" ]]; then
|
||||
args+=(--override "$OVERRIDE")
|
||||
echo "Using explicit load-test overrides: $OVERRIDE"
|
||||
else
|
||||
echo "No $OVERRIDE found; backend .env values will be preserved and example defaults only fill missing keys."
|
||||
fi
|
||||
|
||||
python3 "$LT/scripts/prepare_env.py" "${args[@]}"
|
||||
|
||||
echo
|
||||
echo "Runtime environment prepared: $LT/.env.runtime"
|
||||
echo "Source of application configuration: $BASE"
|
||||
echo "Optional explicit overrides: $OVERRIDE"
|
||||
Reference in New Issue
Block a user