Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mock_uss] Use docker compose for mock systems #170

Merged

Conversation

BenjaminPelletier
Copy link
Member

@BenjaminPelletier BenjaminPelletier commented Aug 17, 2023

Currently, we have a bunch of separate scripts to start up mock_uss in various configurations, but most of them are required in order to run baseline uss_qualifier tests, so we have complicated orchestration to manage all the mock_uss containers individually. docker compose is a much better fit for this task, so this PR replaces most of mock_uss's run_locally_xxx.sh with a system based on docker compose, with a single definition in docker-compose.yaml (in mock_uss) -- this is similar to how the interoperability ecosystem infrastructure is managed.

Also, we currently connect all containers on a local UTM deployment by routing their traffic out to specific ports on the host machine, and then back into the correct container via that external port. #28 could possibly be due to traffic exiting and then re-entering the docker internal network, so routing traffic directly within the docker network could possibly improve this problem. The docker compose configuration in this PR changes the mock_uss container configurations to:

  • Have descriptive hostnames, versus port on host machine (scdsc.uss1.localutm versus host.docker.internal:8074)
  • Share a single docker network (interop_ecosystem_network) and address each other via the hostnames on that network
  • Still maintain the ability to access any container from the host machine on the pre-existing host machine port numbers

The local interoperability ecosystem infrastructure is also adjusted according to the above.

atproxy and atproxy_client are entirely disabled from the standard mock_uss deployment.

@BenjaminPelletier BenjaminPelletier marked this pull request as ready for review August 18, 2023 15:46
Copy link
Contributor

@barroco barroco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and works well. Well done!

@@ -17,7 +17,7 @@

TIMEOUTS = (5, 5) # Timeouts of `connect` and `read` in seconds
ATTEMPTS = (
2 # Number of attempts to query when experiencing a retryable error like a timeout
5 # Number of attempts to query when experiencing a retryable error like a timeout
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, was the previous configuration blocking the ci tests to pass?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a simultaneous change to #172 and 5 retries is probably not helpful -- I'll revert before merging.

@BenjaminPelletier BenjaminPelletier merged commit 71b2ff6 into interuss:main Aug 22, 2023
@BenjaminPelletier BenjaminPelletier deleted the feature/compose-mocks branch August 22, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants