-
Notifications
You must be signed in to change notification settings - Fork 325
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
Official Docker images #997
Comments
This is great, thanks @cachedout ! Since it seems not too complicated, I'd say it worth it. If any part of this process is expected to take more than minimal efforts, let's think if we want to invest in that.
Currently this is the main use case I see for that and it makes sense to have such images public because of the blog post that will tell people how to use it. Otherwise, if people are willing to change their docker images, they might as well do this |
@cachedout since the blog post is about to go out soon, let's split this into two parts:
This way, I can make sure I update the post and publish it with the proper reference to an "official" image. |
First attempt at getting Maven to build Docker images can be found here. @eyalkoren Please let me know what you think about this approach! If this works for you, the next step will be building out CI pieces that can take a built image and push it up to a registry. |
@eyalkoren As you can see by the issue above, we are waiting on the infra folks to help resolve an issue with authentication to the registry. I'll update this issue when I know more. |
We now have official Docker images displayed on the registry web page, thanks to https://github.com/elastic/infra/issues/17508 |
Credit
This request was originally raised by @eyalkoren and credit for the suggestion goes to him. :)
Overview
There are cases in which it makes sense to have an official Docker image for the APM Java agent. This is a proposal for the creation of such an image and for its deployment as a part of the build and release process for the APM Java Agent.
Use cases
One use case which has been well-outlined by @eyalkoren in a separate document is for a standalone agent container as a part of a K8S cluster. As a pod starts, an agent container can be configured as an init container for the pod. In doing so, the APM agent would start up prior to the application(s) in the pod and be available for instrumentation by application containers through the use of the
JAVA_TOOL_OPTIONS
environment variable.I'm sure there are likely other use cases for this or the above case can be expanded upon, but I'll let @eyalkoren extend what I've written above as he sees fit. :)
Current Build Process
Currently, the build process for the Java APM agent is outlined here.
As one can see, there is currently no mention of an official container being built, nor does the repo currently contain a
Dockerfile
with which to build one.Proposed Changes
This request is a collection of a few concrete changes:
1. Official Dockerfile
Obviously, the build process will need a Dockerfile in the repository. @eyalkoren has kindly provided a basic sample which could get us started by checking it directly into the root of the repository.
Alternatives
The above is simple enough that I assume we can just check it in directly instead of making it a part of the build process to create it dynamically. However, I'll mention that as an alternative here just in case the team thinks this might be a worthwhile area of exploration.
2. Official Docker image
Right now, there is no
observability
namespace in our Docker repository, which we would likely want in order to host these images. If we agree that creating Docker images for the APM Java Agent is a worthwhile endeavor, I will reach out to the appropriate folks to make this happen.3. Build process
Right now, we use an internal CI server as a part of the release process. We propose modifying that pipeline to create an image as an artifact which can be automatically pushed up to Docker Hub once the requirements in step 2 are in place.
Questions
Snapshots?
We could, in theory, create nightly image snapshots as Docker images and make them available as well. My guess is that with a simple Docker file, anybody who wants an image could just clone the repository and build one themselves but if this is something people are interested in, it's worth discussing.
The text was updated successfully, but these errors were encountered: