* Use Nginx + Basic Auth to secure OSS Airbyte * use local passwords * Use gradle builds * K8s setup and source values from ENV * note about disabling * add back defaults * custom 401 page * update http message * update docs * remove kube files * additional doc updates * Add a test suite * fix failure exit codes * doc updates * Add docs * bump to re-test * add more sleep in tests for CI * better sleep in test * Update docs/operator-guides/security.md Co-authored-by: Davin Chia <davinchia@gmail.com> * PR updates * test comment * change test host on CI * update tests and nginx to boot without backend * proxy updates for docker DNS * simpler test for uptime * acceptance test skips PWs * remove resolver madness * fixup tests * more proxy_pass revert * update acceptance test exit codes * relax test expectations * add temporal mount back for testing * Update docs/operator-guides/security.md Co-authored-by: swyx <shawnthe1@gmail.com> * Update airbyte-proxy/401.html Co-authored-by: swyx <shawnthe1@gmail.com> * more doc updates * Octavia CLI uses Basic Auth (#17982) * [WIP] Octavia CLI uses Basic Auth * readme * augustin: add basic auth headers to clien * augustin: add basic auth headers to client * tests passing * lint * docs * Move monkey patch to test * coerce headers into strings * monkey patch get_basic_auth_token Co-authored-by: alafanechere <augustin.lafanechere@gmail.com> * fix launch permissions * Keep worker port internal * more readme Co-authored-by: Davin Chia <davinchia@gmail.com> Co-authored-by: swyx <shawnthe1@gmail.com> Co-authored-by: alafanechere <augustin.lafanechere@gmail.com>
55 lines
1.7 KiB
Bash
Executable File
55 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
. tools/lib/lib.sh
|
|
|
|
assert_root
|
|
|
|
## Helper functions
|
|
|
|
get_epoch_time() {
|
|
date +'%s'
|
|
}
|
|
|
|
check_success() {
|
|
docker-compose ps | grep "^$1" | grep -e 'Exit 0' -e 'exited (0)' >/dev/null || (echo "$1 didn't run successfully"; exit 1)
|
|
}
|
|
|
|
##
|
|
|
|
echo "Starting app..."
|
|
|
|
# Detach so we can run subsequent commands
|
|
VERSION=dev TRACKING_STRATEGY=logging USE_STREAM_CAPABLE_STATE=true BASIC_AUTH_USERNAME="" BASIC_AUTH_PASSWORD="" docker-compose -f docker-compose.yaml -f docker-compose.acceptance-test.yaml up -d
|
|
|
|
# Sometimes source/dest containers using airbyte volumes survive shutdown, which need to be killed in order to shut down properly.
|
|
shutdown_cmd="docker-compose down -v || docker kill \$(docker ps -a -f volume=airbyte_workspace -f volume=airbyte_data -f volume=airbyte_db -q) && docker-compose down -v"
|
|
# Uncomment for debugging. Warning, this is verbose.
|
|
# trap "echo 'docker-compose logs:' && docker-compose logs -t --tail 1000 && $shutdown_cmd" EXIT
|
|
|
|
echo "Waiting for services to begin"
|
|
starttime=`get_epoch_time`
|
|
maxtime=300
|
|
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8000/api/v1/health)" != "200" ]];
|
|
do
|
|
echo "Waiting for docker deployment.."
|
|
currenttime=`get_epoch_time`
|
|
if [[ $(( $currenttime - $starttime )) -gt $maxtime ]]; then
|
|
docker-compose ps
|
|
echo "Platform is taking more than ${maxtime}s to start. Aborting..."
|
|
exit 1
|
|
fi
|
|
sleep 5
|
|
done
|
|
|
|
# Getting a snapshot of the docker compose state
|
|
docker-compose ps
|
|
|
|
# Make sure init containers ran successfully
|
|
check_success 'init'
|
|
check_success 'airbyte-bootloader'
|
|
|
|
echo "Running e2e tests via gradle"
|
|
SUB_BUILD=PLATFORM USE_EXTERNAL_DEPLOYMENT=true ./gradlew :airbyte-tests:acceptanceTests --rerun-tasks --scan
|