Skip to content
Snippets Groups Projects
Verified Commit c36550b2 authored by Konrad Botor's avatar Konrad Botor
Browse files

Reconfigured all service logs to be saved in cache (similar to HAF) - ref. #205

parent 332b451c
No related branches found
No related tags found
2 merge requests!827Merge develop changes to master,!605Resolve "Split sync_e2e_benchmark into two separate jobs"
...@@ -381,42 +381,36 @@ e2e_benchmark: ...@@ -381,42 +381,36 @@ e2e_benchmark:
- bash - bash
- -c - -c
- | - |
(python -m http.server --directory ${WORKING_DIR} $LOG_SERVER_PORT &) && \
cat /etc/hosts && \
wget --header "PRIVATE-TOKEN: $AWAIT_SERVICE_ACCESS_TOKEN" "$AWAIT_PACKAGE_URL" -O ${WORKING_DIR}/await && \ wget --header "PRIVATE-TOKEN: $AWAIT_SERVICE_ACCESS_TOKEN" "$AWAIT_PACKAGE_URL" -O ${WORKING_DIR}/await && \
chmod +x ${WORKING_DIR}/await && \ chmod +x ${WORKING_DIR}/await && \
${WORKING_DIR}/await -t 5m postgres://haf_admin@haf-instance:5432/haf_block_log#schemas=hivemind_app -- echo "Database found" && \ ${WORKING_DIR}/await -t 5m postgres://haf_admin@haf-instance:5432/haf_block_log#schemas=hivemind_app -- echo "Database found" && \
${WORKING_DIR}/await -t 1h ${RUNNER_HIVEMIND_SYNC_URL} -- echo "Hivemind sync finished" && \
${WORKING_DIR}/docker_entrypoint.sh server \ ${WORKING_DIR}/docker_entrypoint.sh server \
--log-request-times \ --log-request-times \
--log-request-times-path=${WORKING_DIR}/request_process_times_smoketests.log \ --log-request-times-path=${DATA_CACHE_HAF}/datadir/request_process_times_smoketests.log \
--log-mask-sensitive-data \ --log-mask-sensitive-data \
--http-server-port=${RUNNER_HIVEMIND_SERVER_HTTP_PORT} \ --http-server-port=${RUNNER_HIVEMIND_SERVER_HTTP_PORT} \
--database-url="${HAF_POSTGRES_URL}" --database-url="${HAF_POSTGRES_URL}"
variables: variables:
WORKING_DIR: /home/hivemind WORKING_DIR: /home/hivemind
LOG_PATH: /home/hivemind/hivemind-server.log LOG_PATH: $DATA_CACHE_HAF/datadir/hivemind-server.log
- name: $HIVEMIND_IMAGE - name: $HIVEMIND_IMAGE
alias: hivemind-benchmark # cannot be a variable alias: hivemind-benchmark # cannot be a variable
entrypoint: entrypoint:
- bash - bash
- -c - -c
- | - |
(python -m http.server --directory ${WORKING_DIR} $LOG_SERVER_PORT &) && \
cat /etc/hosts && \
wget --header "PRIVATE-TOKEN: $AWAIT_SERVICE_ACCESS_TOKEN" "$AWAIT_PACKAGE_URL" -O ${WORKING_DIR}/await && \ wget --header "PRIVATE-TOKEN: $AWAIT_SERVICE_ACCESS_TOKEN" "$AWAIT_PACKAGE_URL" -O ${WORKING_DIR}/await && \
chmod +x ${WORKING_DIR}/await && \ chmod +x ${WORKING_DIR}/await && \
${WORKING_DIR}/await -t 5m postgres://haf_admin@haf-instance:5432/haf_block_log#schemas=hivemind_app -- echo "Database found" && \ ${WORKING_DIR}/await -t 5m postgres://haf_admin@haf-instance:5432/haf_block_log#schemas=hivemind_app -- echo "Database found" && \
${WORKING_DIR}/await -t 1h ${RUNNER_HIVEMIND_SYNC_URL} -- echo "Hivemind sync finished" && \
${WORKING_DIR}/docker_entrypoint.sh server \ ${WORKING_DIR}/docker_entrypoint.sh server \
--log-request-times \ --log-request-times \
--log-request-times-path=${WORKING_DIR}/request_process_times.log \ --log-request-times-path=${DATA_CACHE_HAF}/datadir/request_process_times.log \
--log-mask-sensitive-data \ --log-mask-sensitive-data \
--http-server-port=${RUNNER_HIVEMIND_SERVER_HTTP_PORT} \ --http-server-port=${RUNNER_HIVEMIND_SERVER_HTTP_PORT} \
--database-url="${HAF_POSTGRES_URL}" --database-url="${HAF_POSTGRES_URL}"
variables: variables:
WORKING_DIR: /home/hivemind WORKING_DIR: /home/hivemind
LOG_PATH: /home/hivemind/hivemind-benchmark-server.log LOG_PATH: $DATA_CACHE_HAF/datadir/hivemind-benchmark-server.log
variables: variables:
HIVED_UID: $HIVED_UID HIVED_UID: $HIVED_UID
RUNNER_HIVEMIND_BENCHMARK_URL: http://$RUNNER_HIVEMIND_BENCHMARK_SERVER_HOSTNAME RUNNER_HIVEMIND_BENCHMARK_URL: http://$RUNNER_HIVEMIND_BENCHMARK_SERVER_HOSTNAME
...@@ -452,12 +446,12 @@ e2e_benchmark: ...@@ -452,12 +446,12 @@ e2e_benchmark:
- *api-benchmark-script - *api-benchmark-script
after_script: after_script:
- | - |
echo -e "\e[0Ksection_start:$(date +%s):logs[collapsed=true]\r\e[0KDownloading logs..." echo -e "\e[0Ksection_start:$(date +%s):logs[collapsed=true]\r\e[0KCollecting logs..."
cp "$DATA_CACHE_HAF/datadir/$CI_JOB_NAME.log" "haf-$CI_JOB_NAME.log" cp "${DATA_CACHE_HAF}/datadir/${CI_JOB_NAME}.log" "haf-$CI_JOB_NAME.log"
wget $RUNNER_HIVEMIND_SMOKETEST_URL:$LOG_SERVER_PORT/request_process_times_smoketests.log || true cp "${DATA_CACHE_HAF}/datadir/request_process_times_smoketests.log" request_process_times_smoketests.log
wget $RUNNER_HIVEMIND_SMOKETEST_URL:$LOG_SERVER_PORT/hivemind-server.log || true cp "${DATA_CACHE_HAF}/datadir/hivemind-server.log" hivemind-server.log
wget $RUNNER_HIVEMIND_BENCHMARK_URL:$LOG_SERVER_PORT/request_process_times.log || true cp "${DATA_CACHE_HAF}/datadir/request_process_times.log" request_process_times.log
wget $RUNNER_HIVEMIND_BENCHMARK_URL:$LOG_SERVER_PORT/hivemind-benchmark-server.log || true cp "${DATA_CACHE_HAF}/datadir/hivemind-benchmark-server.log" hivemind-benchmark-server.log
echo -e "\e[0Ksection_end:$(date +%s):logs\r\e[0K" echo -e "\e[0Ksection_end:$(date +%s):logs\r\e[0K"
- | - |
echo -e "\e[0Ksection_start:$(date +%s):dotenv[collapsed=true]\r\e[0KPreparing dotenv file..." echo -e "\e[0Ksection_start:$(date +%s):dotenv[collapsed=true]\r\e[0KPreparing dotenv file..."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment