-
Notifications
You must be signed in to change notification settings - Fork 68
[elastic-agent]: Support running APM Server managed #1016
Conversation
* add --apm-server-managed flag to use in combination with --elastic-agent * install apm-integration-testing policy and remove old ones * expose APM Server port in Elastic Agent
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
|
Given this caveat I'm comfortable with approach. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the installer written in go, particularly for the error handling. I'm having trouble getting this stack to come up cleanly, consistently. I believe there is a race between the apm-server-managed container looking for default policy that the elastic-agent container is creating. A simple depends_on doesn't exactly fix it since a really slow starting elastic-agent will still pass this trivial health check before apm-server-managed tries to find the policy. I've proposed a retry in the installer to address this.
docker/apm-server/managed/main.go
Outdated
} | ||
return &kibanaClient{ | ||
fleetURL: fmt.Sprintf("%s/api/fleet", host), | ||
pkgURL: "https://epr-snapshot.elastic.co", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with #1010 should the package registry support configuration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should also account for the production (and maybe staging) registry, eg. when running a release branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, so in which cases should we use the release URL - only for apm-server-release
or als for apm-server-bc
? (I believe only for release).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
went with release
only for now
@graphaelli @simitt Do we want to enable APM Server managed on the daily ITs? |
@kuisathaverat the APM Server managed only supports a handful of config options so far. Are there any configurations needed for the daily ITs (except for |
I do not see any other parameter, we can do a try on a PR and see |
That would be great, thanks @kuisathaverat |
* add --apm-server-managed flag to use in combination with --elastic-agent * install apm-integration-testing policy and remove old ones if needed * expose APM Server port in Elastic Agent only when it manages APM Server * make package registry configurable # Conflicts: # scripts/modules/elastic_stack.py # scripts/tests/service_tests.py
What does this PR do?
Supports running APM Server managed by Elastic Agent by running
--apm-server-managed --with-elastic-agent
remove existing APM packages and install apm-integration-testing policy to default policy
expose APM Server port in Elastic Agent
run a reverse proxy for
apm-server:8200
to not require changes in existing Opbeans servicesonly uses config options that are supported by managed APM Server:
apm-server.secret_token
(RUM is always enabled, host is set to listen on all interfaces anyways)
The APM Server container runs the install script and provides the healthcheck for APM. This way the Elastic Agent (for now) doesn't have to bother about which integrations should be running for providing an overall healthcheck.
Why is it important?
To test APM Server managed by Elastic Agent
Related issues
related #1004
cc @graphaelli I see this as a short-to-midterm solution until we have a more general solution on how managed policies should be created on Elastic Agent startup. There is also going to be a couple of changes when the Fleet Server gets integrated into the Agent, as there probably won't be a direct Kibana connection anymore .