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

Official docker image #1121

Closed
bmorelli25 opened this issue Jan 12, 2021 · 5 comments
Closed

Official docker image #1121

bmorelli25 opened this issue Jan 12, 2021 · 5 comments
Labels
agent-dotnet enhancement New feature or request

Comments

@bmorelli25
Copy link
Member

Overview

An official docker image for the APM .NET agent would simplify the use of the agent in a Kubernetes environment. Per @eyalkoren:

One advantage I think there is for using a Docker container is that it is native to k8s, meaning - you are guaranteed to have an accessible docker registry to pull images from, as opposed to downloading files from external resources that may be restricted in some environments.

For now, we do have a workaround documented.

Related

The Java agent already publishes an official docker image. Their implementation issue offers a ton of additional information: elastic/apm-agent-java#997

@eyalkoren
Copy link

To complete the picture, this is a reference to the process we do per each release.
You should talk to @cachedout about baking it into your release process.
Mike, sorry for referring more things over to you, if you don't like this you need to reduce your usefulness 😛

@cachedout
Copy link
Contributor

@eyalkoren Hah! I'm actually really happy when we can be of service to teams! Thanks for alerting me to this.

@bmorelli25 We should definitely talk about this. There may be a lot of what we did for the Java folks that we could re-use for you.

@russcam
Copy link
Contributor

russcam commented Jan 14, 2021

++ this will be useful for #1073, to test the startup hook

@felixbarny
Copy link
Member

As there's a good workaround in place (downloading the agent binaries via wget in an init container), I'd say that the priority for this is not critical. Especially, because the longer-term direction is to rely on the agent binaries bundled with APM Server rather than Docker images containing the agent binaries for k8s. See also elastic/apm#383

But if we get to it, it would be nice to completely automate the step of publishing the Docker image. We manually publish Docker images for the Java agent for quite a while now which makes the release process more painful. So if we want to extend the Docker image publishing to other agents such as .NET and Node.js, I think automating that step during the release is a requirement.

@russcam
Copy link
Contributor

russcam commented Nov 4, 2021

This has been implemented

/// Builds docker image including the ElasticApmAgent
let AgentDocker (canary:bool) =
let agentVersion =
if canary then
sprintf "%s-%s" (Versioning.CurrentVersion.AssemblyVersion.ToString()) versionSuffix
else
Versioning.CurrentVersion.AssemblyVersion.ToString()
Docker.Exec [ "build"; "--file"; "./build/docker/Dockerfile";
"--tag"; sprintf "observability/apm-agent-dotnet:%s" agentVersion; "./build/output/ElasticApmAgent" ]

which can be built with

./build.[sh|bat] agent-docker

(use .bat on Windows and .sh on non-Windows)

so a docker image with startup hooks can be built, but we don't artifact it. I'm going to close this issue out for now, and if an ask comes up for publishing the image, we can handle it in a new issue.

@russcam russcam closed this as completed Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-dotnet enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants