Skip to content

Commit

Permalink
Update to conform to Aerie v2.8.0 (#133)
Browse files Browse the repository at this point in the history
* Updating to work with Aerie 2.8.0

* Adding default passwords to .env for integration tests

* Updated docker-compose-test.yml
  • Loading branch information
joshhaug authored May 8, 2024
1 parent 5e774b6 commit b18005a
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 167 deletions.
14 changes: 13 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
DOCKER_TAG=v2.6.0
DOCKER_TAG=v2.8.0
REPOSITORY_DOCKER_URL=ghcr.io/nasa-ammos

AERIE_USERNAME=aerie
AERIE_PASSWORD=aerie

GATEWAY_USERNAME=gateway_service
GATEWAY_PASSWORD=gateway_service

MERLIN_USERNAME=merlin_service
MERLIN_PASSWORD=merlin_service

SCHEDULER_USERNAME=scheduler_service
SCHEDULER_PASSWORD=scheduler_service

SEQUENCING_USERNAME=sequencing_service
SEQUENCING_PASSWORD=sequencing_service

POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
COMPOSE_PROJECT_NAME=aerie
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
strategy:
matrix:
python-version: ["3.6.15", "3.11"]
aerie-version: ["2.6.0"]
aerie-version: ["2.8.0"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
220 changes: 95 additions & 125 deletions docker-compose-test.yml
Original file line number Diff line number Diff line change
@@ -1,202 +1,172 @@
version: "3.7"
version: '3.7'
services:
aerie_gateway:
container_name: aerie_gateway
depends_on: ["postgres"]
depends_on: ['postgres']
environment:
AUTH_TYPE: none
GQL_API_URL: http://localhost:8080/v1/graphql
HASURA_GRAPHQL_JWT_SECRET: "${HASURA_GRAPHQL_JWT_SECRET}"
HASURA_GRAPHQL_JWT_SECRET: '${HASURA_GRAPHQL_JWT_SECRET}'
LOG_FILE: console
LOG_LEVEL: warn
LOG_LEVEL: debug
NODE_TLS_REJECT_UNAUTHORIZED: '0'
PORT: 9000
POSTGRES_AERIE_MERLIN_DB: aerie_merlin
POSTGRES_HOST: postgres
POSTGRES_PASSWORD: "${AERIE_PASSWORD}"
POSTGRES_PORT: 5432
POSTGRES_USER: "${AERIE_USERNAME}"
image: "${REPOSITORY_DOCKER_URL}/aerie-gateway:${DOCKER_TAG}"
ports: ["9000:9000"]
AERIE_DB_HOST: postgres
AERIE_DB_PORT: 5432
GATEWAY_DB_USER: '${GATEWAY_USERNAME}'
GATEWAY_DB_PASSWORD: '${GATEWAY_PASSWORD}'
image: '${REPOSITORY_DOCKER_URL}/aerie-gateway:${DOCKER_TAG}'
ports: ['9000:9000']
restart: always
volumes:
- aerie_file_store:/app/files
networks:
- aerie_net
aerie_merlin:
container_name: aerie_merlin
depends_on: ["postgres"]
depends_on: ['postgres']
environment:
HASURA_GRAPHQL_ADMIN_SECRET: "${HASURA_GRAPHQL_ADMIN_SECRET}"
HASURA_GRAPHQL_ADMIN_SECRET: '${HASURA_GRAPHQL_ADMIN_SECRET}'
HASURA_GRAPHQL_URL: http://hasura:8080/v1/graphql
MERLIN_DB: "aerie_merlin"
MERLIN_DB_PASSWORD: "${AERIE_PASSWORD}"
MERLIN_DB_PORT: 5432
MERLIN_DB_SERVER: postgres
MERLIN_DB_USER: "${AERIE_USERNAME}"
AERIE_DB_HOST: postgres
AERIE_DB_PORT: 5432
MERLIN_DB_USER: '${MERLIN_USERNAME}'
MERLIN_DB_PASSWORD: '${MERLIN_PASSWORD}'
MERLIN_LOCAL_STORE: /usr/src/app/merlin_file_store
MERLIN_PORT: 27183
MERLIN_USE_NEW_CONSTRAINT_PIPELINE: 'true'
JAVA_OPTS: >
-Dorg.slf4j.simpleLogger.defaultLogLevel=WARN
-Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
-Dorg.slf4j.simpleLogger.log.com.zaxxer.hikari=INFO
-Dorg.slf4j.simpleLogger.logFile=System.err
UNTRUE_PLAN_START: "2000-01-01T11:58:55.816Z"
image: "${REPOSITORY_DOCKER_URL}/aerie-merlin:${DOCKER_TAG}"
ports: ["27183:27183"]
UNTRUE_PLAN_START: '2000-01-01T11:58:55.816Z'
image: '${REPOSITORY_DOCKER_URL}/aerie-merlin:${DOCKER_TAG}'
ports: ['27183:27183']
restart: always
volumes:
- aerie_file_store:/usr/src/app/merlin_file_store
networks:
- aerie_net
aerie_merlin_worker_1:
aerie_merlin_worker:
container_name: aerie_merlin_worker
depends_on: ["postgres"]
depends_on: ['postgres']
environment:
MERLIN_WORKER_DB: "aerie_merlin"
MERLIN_WORKER_DB_PASSWORD: "${AERIE_PASSWORD}"
MERLIN_WORKER_DB_PORT: 5432
MERLIN_WORKER_DB_SERVER: postgres
MERLIN_WORKER_DB_USER: "${AERIE_USERNAME}"
AERIE_DB_HOST: postgres
AERIE_DB_PORT: 5432
MERLIN_DB_USER: '${MERLIN_USERNAME}'
MERLIN_DB_PASSWORD: '${MERLIN_PASSWORD}'
MERLIN_WORKER_LOCAL_STORE: /usr/src/app/merlin_file_store
SIMULATION_PROGRESS_POLL_PERIOD_MILLIS: 2000
JAVA_OPTS: >
-Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
-Dorg.slf4j.simpleLogger.log.com.zaxxer.hikari=WARN
-Dorg.slf4j.simpleLogger.log.com.zaxxer.hikari=INFO
-Dorg.slf4j.simpleLogger.logFile=System.err
UNTRUE_PLAN_START: "2000-01-01T11:58:55.816Z"
image: "${REPOSITORY_DOCKER_URL}/aerie-merlin-worker:${DOCKER_TAG}"
ports: ["27187:8080"]
UNTRUE_PLAN_START: '2000-01-01T11:58:55.816Z'
image: '${REPOSITORY_DOCKER_URL}/aerie-merlin-worker:${DOCKER_TAG}'
ports: ['27187:8080']
restart: always
volumes:
- aerie_file_store:/usr/src/app/merlin_file_store:ro
networks:
- aerie_net
aerie_scheduler:
container_name: aerie_scheduler
depends_on: ["aerie_merlin", "postgres"]
depends_on: ['aerie_merlin', 'postgres']
environment:
HASURA_GRAPHQL_ADMIN_SECRET: "${HASURA_GRAPHQL_ADMIN_SECRET}"
HASURA_GRAPHQL_ADMIN_SECRET: '${HASURA_GRAPHQL_ADMIN_SECRET}'
MERLIN_GRAPHQL_URL: http://hasura:8080/v1/graphql
SCHEDULER_DB: "aerie_scheduler"
SCHEDULER_DB_PASSWORD: "${AERIE_PASSWORD}"
SCHEDULER_DB_PORT: 5432
SCHEDULER_DB_SERVER: postgres
SCHEDULER_DB_USER: "${AERIE_USERNAME}"
AERIE_DB_HOST: postgres
AERIE_DB_PORT: 5432
SCHEDULER_DB_USER: '${SCHEDULER_USERNAME}'
SCHEDULER_DB_PASSWORD: '${SCHEDULER_PASSWORD}'
SCHEDULER_PORT: 27185
JAVA_OPTS: >
-Dorg.slf4j.simpleLogger.defaultLogLevel=WARN
-Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
-Dorg.slf4j.simpleLogger.log.com.zaxxer.hikari=INFO
-Dorg.slf4j.simpleLogger.logFile=System.err
image: "${REPOSITORY_DOCKER_URL}/aerie-scheduler:${DOCKER_TAG}"
ports: ["27185:27185"]
image: '${REPOSITORY_DOCKER_URL}/aerie-scheduler:${DOCKER_TAG}'
ports: ['27185:27185']
restart: always
volumes:
- aerie_file_store:/usr/src/app/merlin_file_store
networks:
- aerie_net
aerie_scheduler_worker_1:
container_name: aerie_scheduler_worker_1
depends_on: ["postgres"]
aerie_scheduler_worker:
container_name: aerie_scheduler_worker
depends_on: ['postgres']
environment:
HASURA_GRAPHQL_ADMIN_SECRET: "${HASURA_GRAPHQL_ADMIN_SECRET}"
HASURA_GRAPHQL_ADMIN_SECRET: '${HASURA_GRAPHQL_ADMIN_SECRET}'
MERLIN_GRAPHQL_URL: http://hasura:8080/v1/graphql
SCHEDULER_WORKER_DB: "aerie_scheduler"
SCHEDULER_WORKER_DB_PASSWORD: "${AERIE_PASSWORD}"
SCHEDULER_WORKER_DB_PORT: 5432
SCHEDULER_WORKER_DB_SERVER: postgres
SCHEDULER_WORKER_DB_USER: "${AERIE_USERNAME}"
SCHEDULER_OUTPUT_MODE: UpdateInputPlanWithNewActivities
MERLIN_LOCAL_STORE: /usr/src/app/merlin_file_store
SCHEDULER_OUTPUT_MODE: UpdateInputPlanWithNewActivities
SCHEDULER_RULES_JAR: /usr/src/app/merlin_file_store/scheduler_rules.jar
AERIE_DB_HOST: postgres
AERIE_DB_PORT: 5432
SCHEDULER_DB_USER: '${SCHEDULER_USERNAME}'
SCHEDULER_DB_PASSWORD: '${SCHEDULER_PASSWORD}'
JAVA_OPTS: >
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
-Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
-Dorg.slf4j.simpleLogger.log.com.zaxxer.hikari=INFO
-Dorg.slf4j.simpleLogger.logFile=System.err
image: "${REPOSITORY_DOCKER_URL}/aerie-scheduler-worker:${DOCKER_TAG}"
ports: ["27189:8080"]
image: '${REPOSITORY_DOCKER_URL}/aerie-scheduler-worker:${DOCKER_TAG}'
ports: ['27189:8080']
restart: always
volumes:
- aerie_file_store:/usr/src/app/merlin_file_store:ro
networks:
- aerie_net
aerie_sequencing:
container_name: aerie_sequencing
depends_on: ["postgres"]
depends_on: ['postgres']
environment:
HASURA_GRAPHQL_ADMIN_SECRET: "${HASURA_GRAPHQL_ADMIN_SECRET}"
HASURA_GRAPHQL_ADMIN_SECRET: '${HASURA_GRAPHQL_ADMIN_SECRET}'
LOG_FILE: console
LOG_LEVEL: warn
LOG_LEVEL: debug
MERLIN_GRAPHQL_URL: http://hasura:8080/v1/graphql
SEQUENCING_SERVER_PORT: 27184
SEQUENCING_DB: aerie_sequencing
SEQUENCING_DB_PASSWORD: "${AERIE_PASSWORD}"
SEQUENCING_DB_PORT: 5432
SEQUENCING_DB_SERVER: postgres
SEQUENCING_DB_USER: "${AERIE_USERNAME}"
AERIE_DB_HOST: postgres
AERIE_DB_PORT: 5432
SEQUENCING_DB_USER: '${SEQUENCING_USERNAME}'
SEQUENCING_DB_PASSWORD: '${SEQUENCING_PASSWORD}'
SEQUENCING_LOCAL_STORE: /usr/src/app/sequencing_file_store
image: "${REPOSITORY_DOCKER_URL}/aerie-sequencing:${DOCKER_TAG}"
ports: ["27184:27184"]
SEQUENCING_SERVER_PORT: 27184
image: '${REPOSITORY_DOCKER_URL}/aerie-sequencing:${DOCKER_TAG}'
ports: ['27184:27184']
restart: always
volumes:
- aerie_file_store:/usr/src/app/sequencing_file_store
networks:
- aerie_net
aerie_ui:
container_name: aerie_ui
depends_on: ["postgres"]
environment:
ORIGIN: http://localhost
PUBLIC_LOGIN_PAGE: "enabled"
PUBLIC_GATEWAY_CLIENT_URL: http://localhost:9000
PUBLIC_GATEWAY_SERVER_URL: http://aerie_gateway:9000
PUBLIC_HASURA_CLIENT_URL: http://localhost:8080/v1/graphql
PUBLIC_HASURA_SERVER_URL: http://hasura:8080/v1/graphql
PUBLIC_HASURA_WEB_SOCKET_URL: ws://localhost:8080/v1/graphql
image: "${REPOSITORY_DOCKER_URL}/aerie-ui:${DOCKER_TAG}"
ports: ["80:80"]
restart: always
networks:
- aerie_net
hasura:
container_name: aerie_hasura
depends_on: ["postgres"]
depends_on: ['postgres']
environment:
AERIE_MERLIN_DATABASE_URL: "postgres://${AERIE_USERNAME}:${AERIE_PASSWORD}@postgres:5432/aerie_merlin"
AERIE_MERLIN_URL: "http://aerie_merlin:27183"
AERIE_SCHEDULER_DATABASE_URL: "postgres://${AERIE_USERNAME}:${AERIE_PASSWORD}@postgres:5432/aerie_scheduler"
AERIE_SCHEDULER_URL: "http://aerie_scheduler:27185"
AERIE_SEQUENCING_DATABASE_URL: "postgres://${AERIE_USERNAME}:${AERIE_PASSWORD}@postgres:5432/aerie_sequencing"
AERIE_SEQUENCING_URL: "http://aerie_sequencing:27184"
AERIE_UI_DATABASE_URL: "postgres://${AERIE_USERNAME}:${AERIE_PASSWORD}@postgres:5432/aerie_ui"
HASURA_GRAPHQL_ADMIN_SECRET: "${HASURA_GRAPHQL_ADMIN_SECRET}"
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
AERIE_DATABASE_URL: 'postgres://${AERIE_USERNAME}:${AERIE_PASSWORD}@postgres:5432/aerie?options=-c%20search_path%3Dutil_functions%2Chasura%2Cpermissions%2Ctags%2Cmerlin%2Cscheduler%2Csequencing%2Cpublic'
AERIE_MERLIN_URL: 'http://aerie_merlin:27183'
AERIE_SCHEDULER_URL: 'http://aerie_scheduler:27185'
AERIE_SEQUENCING_URL: 'http://aerie_sequencing:27184'
HASURA_GRAPHQL_ADMIN_SECRET: '${HASURA_GRAPHQL_ADMIN_SECRET}'
HASURA_GRAPHQL_DEV_MODE: 'true'
HASURA_GRAPHQL_ENABLE_CONSOLE: 'true'
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_JWT_SECRET: "${HASURA_GRAPHQL_JWT_SECRET}"
HASURA_GRAPHQL_LOG_LEVEL: warn
HASURA_GRAPHQL_METADATA_DATABASE_URL: "postgres://${AERIE_USERNAME}:${AERIE_PASSWORD}@postgres:5432/aerie_hasura"
HASURA_GRAPHQL_INFER_FUNCTION_PERMISSIONS: false
HASURA_GRAPHQL_JWT_SECRET: '${HASURA_GRAPHQL_JWT_SECRET}'
HASURA_GRAPHQL_LOG_LEVEL: info
HASURA_GRAPHQL_METADATA_DATABASE_URL: 'postgres://${AERIE_USERNAME}:${AERIE_PASSWORD}@postgres:5432/aerie_hasura'
HASURA_GRAPHQL_METADATA_DIR: /hasura-metadata
image: "${REPOSITORY_DOCKER_URL}/aerie-hasura:${DOCKER_TAG}"
ports: ["8080:8080"]
image: '${REPOSITORY_DOCKER_URL}/aerie-hasura:${DOCKER_TAG}'
ports: ['8080:8080']
restart: always
networks:
- aerie_net
postgres:
container_name: aerie_postgres
environment:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_USER: "${POSTGRES_USER}"
AERIE_USERNAME: "${AERIE_USERNAME}"
AERIE_PASSWORD: "${AERIE_PASSWORD}"
image: "${REPOSITORY_DOCKER_URL}/aerie-postgres:${DOCKER_TAG}"
ports: ["5432:5432"]
POSTGRES_PASSWORD: '${POSTGRES_PASSWORD}'
POSTGRES_USER: '${POSTGRES_USER}'
AERIE_USERNAME: '${AERIE_USERNAME}'
AERIE_PASSWORD: '${AERIE_PASSWORD}'
GATEWAY_DB_USER: '${GATEWAY_USERNAME}'
GATEWAY_DB_PASSWORD: '${GATEWAY_PASSWORD}'
MERLIN_DB_USER: '${MERLIN_USERNAME}'
MERLIN_DB_PASSWORD: '${MERLIN_PASSWORD}'
SCHEDULER_DB_USER: '${SCHEDULER_USERNAME}'
SCHEDULER_DB_PASSWORD: '${SCHEDULER_PASSWORD}'
SEQUENCING_DB_USER: '${SEQUENCING_USERNAME}'
SEQUENCING_DB_PASSWORD: '${SEQUENCING_PASSWORD}'
image: '${REPOSITORY_DOCKER_URL}/aerie-postgres:${DOCKER_TAG}'
ports: ['5432:5432']
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- aerie_net

volumes:
aerie_file_store:
mission_file_store:
postgres_data:

networks:
aerie_net:
postgres_data:
21 changes: 0 additions & 21 deletions src/aerie_cli/aerie_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,27 +290,6 @@ def create_activity_plan(
simulation_end_time=simulation_end_time
)

create_scheduling_spec_mutation = """
mutation CreateSchedulingSpec($spec: scheduling_specification_insert_input!) {
insert_scheduling_specification_one(object: $spec) {
id
}
}
"""

spec = {
"plan_id": plan_id,
"analysis_only": False,
"horizon_end": plan_to_create.end_time.isoformat(),
"horizon_start": plan_to_create.start_time.isoformat(),
"plan_revision": plan_revision,
"simulation_arguments": {}
}

self.aerie_host.post_to_graphql(
create_scheduling_spec_mutation, spec=spec
)

return plan_id

def create_activity(self, activity_to_create: Activity, plan_id: int) -> int:
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
CONFIGURATIONS_PATH = os.path.join(FILES_PATH, "configuration")
CONFIGURATION_PATH = os.path.join(CONFIGURATIONS_PATH, "localhost_config.json")
MODELS_PATH = os.path.join(FILES_PATH, "models")
MODEL_VERSION = os.environ.get("AERIE_VERSION", "2.6.0")
MODEL_VERSION = os.environ.get("AERIE_VERSION", "2.8.0")
MODEL_JAR = os.path.join(MODELS_PATH, f"banananation-{MODEL_VERSION}.jar")
MODEL_NAME = "banananation"
MODEL_VERSION = "0.0.1"
Expand Down
Binary file not shown.
18 changes: 0 additions & 18 deletions tests/unit_tests/files/mock_responses/create_activity_plan_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,5 @@
"response": {
"id": 58
}
},
{
"request": {
"query": "mutation CreateSchedulingSpec($spec: scheduling_specification_insert_input!) { insert_scheduling_specification_one(object: $spec) { id } }",
"variables": {
"spec": {
"plan_id": 456,
"analysis_only": false,
"horizon_end": "2030-01-01T12:00:00+00:00",
"horizon_start": "2030-01-01T00:00:00+00:00",
"plan_revision": 0,
"simulation_arguments": {}
}
}
},
"response": {
"id": 58
}
}
]

0 comments on commit b18005a

Please sign in to comment.