Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Fix APM Server managed by Elastic Agent setup #1078

Merged
merged 5 commits into from
Mar 11, 2021
Merged

Conversation

simitt
Copy link
Contributor

@simitt simitt commented Mar 9, 2021

The latest docker builds for Kibana and Elastic Agent for master and 7.13 are working again; the apm-integration testing setup needs to be adjusted to the latest fixes.

There seems to be something up with the production package registry - it is not serving an APM package. Snapshot registry works fine.

This PR includes:

  • print statements for APM Server setup for easier debugging in case something goes wrong
  • APM Server setup uses Fleet API now for fetching APM package instead of directly calling the EPR. The configured EPR URL already needs to be considered by Kibana.
  • Adding APM Server integration to Fleet Policy, to which the Elastic Agent now enrolls.
  • Using Snapshot EPR if --snapshot flag is provided, rather than production one.

@apmmachine
Copy link
Collaborator

apmmachine commented Mar 9, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #1078 updated

  • Start Time: 2021-03-11T09:39:11.993+0000

  • Duration: 33 min 52 sec

  • Commit: 1a268d2

Test stats 🧪

Test Results
Failed 0
Passed 490
Skipped 1
Total 491

Trends 🧪

Image of Build Times

Image of Tests

@simitt simitt marked this pull request as ready for review March 10, 2021 13:24
@simitt simitt requested a review from a team March 10, 2021 13:25
Copy link

@stuartnelson3 stuartnelson3 left a comment

Choose a reason for hiding this comment

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

looks fine to me

@@ -1185,7 +1186,7 @@ def package_registry_url(options):
return url
if options.get("enable_package_registry"):
return "http://package-registry:{}".format(PackageRegistry.SERVICE_PORT)
elif options.get("snapshot"):
elif options.get("snapshot") or not options.get("release"):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@axw this changes the default to snapshot, which will serve snapshot+staging+production packages; just wanted to get your 👀 on this real quick.

Copy link
Member

Choose a reason for hiding this comment

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

I suppose it's fine. My thinking was that we would rely on the logic in Kibana to select the appropriate registry, though to be fair we were still diverging by selecting the snapshot registry on snapshot stack images. But we can always select the staging repo if needed, so 👍

@@ -1185,7 +1186,7 @@ def package_registry_url(options):
return url
if options.get("enable_package_registry"):
return "http://package-registry:{}".format(PackageRegistry.SERVICE_PORT)
elif options.get("snapshot"):
elif options.get("snapshot") or not options.get("release"):
Copy link
Member

Choose a reason for hiding this comment

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

I suppose it's fine. My thinking was that we would rely on the logic in Kibana to select the appropriate registry, though to be fair we were still diverging by selecting the snapshot registry on snapshot stack images. But we can always select the staging repo if needed, so 👍

docker/apm-server/managed/main.go Outdated Show resolved Hide resolved
@simitt simitt merged commit 9350ca8 into elastic:master Mar 11, 2021
v1v added a commit to v1v/apm-integration-testing that referenced this pull request Mar 29, 2021
…rt-from-build

* upstream/master: (24 commits)
  Add mergify (elastic#1089)
  fix: update flake8 and deps to work with Python 3.8+ (elastic#1085)
  chore: bump elastic stack (elastic#1087)
  fix: force to activate venv (elastic#1086)
  fix: --opbeans-node-agent-local-repo=/a/local/dir (elastic#1084)
  ci: jjbb remove periodic-folder-trigger (elastic#1079)
  Fix APM Server managed by Elastic Agent setup (elastic#1078)
  docker/opbeans/go: use -mod=mod (elastic#1077)
  [fleet] fix elastic-agent setup (elastic#1076)
  update supported stack versions (elastic#1075)
  [CI] Increase timeout (elastic#1070)
  Add --package-registry-url flag (elastic#1069)
  Create opbeans_user/role with write/read access for the opbeans-python (elastic#1063)
  reset postgres sequences after database migration (elastic#1062)
  chore: bump Elastic Stack (elastic#1060)
  docker/go/nethttp: go build -mod=mod (elastic#1061)
  check agent liveness via version subcommand (elastic#1059)
  test: use filebeat step to grab Docker logs (elastic#1029)
  Update dotnet sdk 5.0 docker image (elastic#1048)
  docs: using Dyno (elastic#1056)
  ...
@simitt simitt deleted the fix-agent branch April 19, 2021 07:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants