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

Async API, leverage rq+redis, use docker-compose for service setup #2

Merged
merged 31 commits into from
Sep 19, 2023

Conversation

awelzel
Copy link
Contributor

@awelzel awelzel commented Sep 13, 2023

No description provided.

@awelzel awelzel mentioned this pull request Sep 13, 2023
* Make /zeek asynchronous using rq and redis
* Add tiny-benchmark.sh for running micro-benchmarks
* Allow specifying tests in config.yml
* Splits API, test execution and storage into various files
* Need to make the original pcap test case work again.
@awelzel awelzel force-pushed the topic/awelzel/add-rq branch from 5a9a84d to 32d81ee Compare September 13, 2023 17:44
@awelzel awelzel force-pushed the topic/awelzel/add-rq branch 4 times, most recently from df83fb0 to ae679aa Compare September 15, 2023 16:14
@awelzel awelzel marked this pull request as ready for review September 15, 2023 16:50
ci-based/settings.py Outdated Show resolved Hide resolved
Copy link
Member

@timwoj timwoj left a comment

Choose a reason for hiding this comment

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

This looks good to me overall. I had one minor question about configuration. If you want to rework that docker-compose file into the code that's fine with me.

@awelzel awelzel force-pushed the topic/awelzel/add-rq branch 2 times, most recently from ade0a54 to b35ba15 Compare September 18, 2023 16:02
Use the create_app() pattern and current_app context. This makes
it easier to test the application via Flask's test_client(). See
the new tests/test_app.py file.
Make them run a bit longer.
This is untested and not re-worked due to broker builds not
containing the needed broker-cluster-benchmark file.

app.py is now quite shallow
Instead of unpacking the build.tgz archive, unpack it once into
a volume (zeek_install_data) and mount the contents of that volume
at /zeek/install.

This reduces runtime by not redundantly extracting build.tgz and
also simplifies the setup a bit as we do not need to set ZEEKPATH
anymore (/zeek/install is where Zeek is configured to be installed).
...instead of subprocess.run() of /usr/bin/docker
Not available on Python 3.10 or Python 3.11 in GitHub actions :-(
We continue to use docker-compose, but it is now running
the infrastructure. Containers are launched from the rq
container via the docker Python library.

Broker benchmarking is now definitely not working.
No need to install the git package for checking the validity of
a branch name.
@awelzel awelzel force-pushed the topic/awelzel/add-rq branch from b35ba15 to a5e0058 Compare September 18, 2023 16:14
@awelzel awelzel changed the title Topic/awelzel/add rq Async API, leverage rq+redis, use docker-compose for service setup Sep 18, 2023
@awelzel awelzel force-pushed the topic/awelzel/add-rq branch from 1907668 to 07f7a5d Compare September 18, 2023 17:36
@awelzel
Copy link
Contributor Author

awelzel commented Sep 18, 2023

This looks good to me overall. I had one minor question about configuration. If you want to rework that docker-compose file into the code that's fine with me.

@timwoj - feel free to take another looks. I mentioned the locations of the new database in DM if you want to look at some of the results.

@timwoj timwoj self-requested a review September 18, 2023 20:21
@awelzel awelzel merged commit 5635863 into master Sep 19, 2023
3 checks passed
@awelzel awelzel deleted the topic/awelzel/add-rq branch September 19, 2023 10:03
@ckreibich ckreibich mentioned this pull request Oct 10, 2023
3 tasks
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