-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from Project-OMOTES/35-move-orchestrator-db-sc…
…hema-to-orchestrator-and-rewire-integration-test-to-use-computation-engine-directly 35: Move orchestrator db schema here and rewire integration test to u…
- Loading branch information
Showing
33 changed files
with
811 additions
and
211 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
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,3 @@ | ||
[submodule "computation_engine"] | ||
path = computation-engine-at-orchestrator | ||
url = [email protected]:Project-OMOTES/computation-engine.git |
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,9 @@ | ||
#!/bin/bash | ||
|
||
if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then | ||
echo "Activating .venv first." | ||
. .venv/bin/activate | ||
fi | ||
|
||
cd src/ | ||
alembic upgrade head |
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,9 @@ | ||
#!/bin/bash | ||
|
||
if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then | ||
echo "Activating .venv first." | ||
. .venv/bin/activate | ||
fi | ||
|
||
cd src/ | ||
alembic revision --autogenerate -m "$1" |
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 @@ | ||
|
||
pushd . | ||
cd /D "%~dp0" | ||
cd ..\..\ | ||
cd src\ | ||
alembic upgrade head | ||
popd |
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 @@ | ||
|
||
pushd . | ||
cd /D "%~dp0" | ||
cd ..\..\ | ||
cd src\ | ||
alembic revision --autogenerate -m %1 | ||
popd |
Submodule computation-engine-at-orchestrator
added at
a905b3
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,15 @@ | ||
#!/bin/bash | ||
|
||
CURRENT_WORKDIR=$PWD | ||
COMPUTATION_ENGINE="../computation-engine-at-orchestrator" | ||
ENV_FILE="${CURRENT_WORKDIR}/.env.test" | ||
DOCKER_COMPOSE_FILE="${COMPUTATION_ENGINE}/docker-compose.yml" | ||
DOCKER_COMPOSE_OVERRIDE_FILE="./docker-compose.override.yml" | ||
|
||
export COMPOSE_PROJECT_NAME=omotes_orchestrator_integration_tests | ||
|
||
export ORCHESTRATOR_DIR="${CURRENT_WORKDIR}/../" | ||
export TEST_WORKER_DIR="${CURRENT_WORKDIR}/test_worker/" | ||
export INTEGRATION_TESTS_DIR="${CURRENT_WORKDIR}/integration_tests/" | ||
|
||
echo "Using docker compose files: ${DOCKER_COMPOSE_FILE} ${DOCKER_COMPOSE_OVERRIDE_FILE}" |
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,5 @@ | ||
#!/bin/bash | ||
|
||
. ci/_config.sh | ||
|
||
docker compose -f ${DOCKER_COMPOSE_FILE} -f ${DOCKER_COMPOSE_OVERRIDE_FILE} --env-file ${ENV_FILE} 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
. ci/_config.sh | ||
|
||
cp ${COMPUTATION_ENGINE}/.env-template ${ENV_FILE} | ||
sed -i 's/LOG_LEVEL=[a-z]*/LOG_LEVEL=WARNING/gi' ${ENV_FILE} | ||
|
||
docker compose -f ${DOCKER_COMPOSE_FILE} -f ${DOCKER_COMPOSE_OVERRIDE_FILE} --env-file ${ENV_FILE} down -v | ||
|
||
${COMPUTATION_ENGINE}/scripts/setup_orchestrator_postgres_db.sh ${ENV_FILE} ${DOCKER_COMPOSE_FILE} | ||
${COMPUTATION_ENGINE}/scripts/setup_rabbitmq.sh ${ENV_FILE} ${DOCKER_COMPOSE_FILE} | ||
|
||
docker compose -f ${DOCKER_COMPOSE_FILE} -f ${DOCKER_COMPOSE_OVERRIDE_FILE} --env-file ${ENV_FILE} up --build --abort-on-container-exit integration_tests orchestrator test_worker |
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,43 @@ | ||
version: "3.8" | ||
|
||
networks: | ||
omotes: | ||
external: true | ||
|
||
services: | ||
orchestrator: | ||
build: ${ORCHESTRATOR_DIR} | ||
image: !reset | ||
|
||
test_worker: | ||
build: ${TEST_WORKER_DIR} | ||
deploy: | ||
replicas: 3 | ||
networks: | ||
- omotes | ||
environment: | ||
RABBITMQ_HOSTNAME: rabbitmq-nwn | ||
RABBITMQ_PORT: 5672 | ||
RABBITMQ_USERNAME: ${RABBITMQ_CELERY_USER_NAME} | ||
RABBITMQ_PASSWORD: ${RABBITMQ_CELERY_USER_PASSWORD} | ||
RABBITMQ_VIRTUALHOST: omotes_celery | ||
LOG_LEVEL: ${LOG_LEVEL} | ||
|
||
integration_tests: | ||
build: ${INTEGRATION_TESTS_DIR} | ||
networks: | ||
- omotes | ||
depends_on: | ||
rabbitmq: | ||
condition: service_healthy | ||
omotes_influxdb: | ||
condition: service_healthy | ||
orchestrator: | ||
condition: service_started | ||
environment: | ||
RABBITMQ_OMOTES_USER_NAME: ${RABBITMQ_OMOTES_USER_NAME} | ||
RABBITMQ_OMOTES_USER_PASSWORD: ${RABBITMQ_OMOTES_USER_PASSWORD} | ||
RABBITMQ_VIRTUALHOST: omotes | ||
RABBITMQ_HOST: rabbitmq | ||
RABBITMQ_PORT: 5672 | ||
LOG_LEVEL: ${LOG_LEVEL} |
Oops, something went wrong.