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

feat(discovery): add cryostat-agent discovery plugin #45

Closed
wants to merge 2 commits into from

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Aug 17, 2022

Related to https://github.com/cryostatio/cryostat/issues/936

Just a draft for now, mostly meant to share what the setup looks like to add the new cryostat-agent to a Quarkus containerized application.

@andrewazores
Copy link
Member Author

andrewazores commented Aug 17, 2022

The agent JAR is also now published (automatically) as a package on the GitHub Packages Maven repository:

https://github.com/cryostatio/cryostat-agent/packages/1601815

But this requires a GitHub Personal Access Token to use - GitHub still doesn't allow unauthenticated package downloads. For now I'll stick with using jitpack in this draft for the convenience. Ideally we publish the agent JAR to some repository that allows anonymous downloads.

The latest commits use that GitHub Packages JAR, but this requires some setup for the end user in $HOME/.m2/settings.xml, which I have documented in the README. We can also set up the CI build on this repo to be able to pull from that package repository, so images would still be built by CI and published to quay.io after this is merged, including the officially CI-built upstream agent JAR in the image.

@andrewazores andrewazores force-pushed the discovery-agent branch 2 times, most recently from e1107bd to 2ee1253 Compare August 18, 2022 02:57
@andrewazores andrewazores added feat New feature or request build labels Aug 18, 2022
Copy link
Member

@ebaron ebaron left a comment

Choose a reason for hiding this comment

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

Seems good overall. The GitHub Maven repository manual setup seems unfortunate, but I imagine this will integrate more smoothly with CI than needing to clone and mvn install the dependency like we do with -core.

@andrewazores
Copy link
Member Author

andrewazores commented Aug 18, 2022

Yea, I tried a few different things (now erased from the commit history) to try to get the CI build working within this PR, but I couldn't figure it out. Always a 401 response when the runner tries to download the agent .jar from the GH repository. But, I think consuming the JAR in this way with the dependency plugin is much more palatable than building the agent as a submodule.

Consumers of the upstream -agent .jar might be okay with this manual GH Packages setup step, otherwise maybe we need to look at publishing to ex. Maven Central when the agent is ready for primetime. For downstream builds there's already some system for publishing JARs, so that should be relatively straightforward.

@andrewazores
Copy link
Member Author

Dropping this, since the Agent is now available on Maven Central as well as on quay.io as an init container (both unauthenticated), and we have other published examples of how to consume the Agent in an application container (ex. test-applications repository).

@andrewazores andrewazores deleted the discovery-agent branch July 22, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build feat New feature or request safe-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants