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

fix: --opbeans-node-agent-local-repo=/a/local/dir #1084

Merged
merged 3 commits into from
Mar 23, 2021

Conversation

trentm
Copy link
Member

@trentm trentm commented Mar 22, 2021

What does this PR do?

Fixes './scripts/compose.py start --opbeans-node-agent-local-repo=$dir'
to (a) install the Node.js APM agent into the opbeans-node app at "/app"
and (b) to skip copying the possibly large node_modules and build dirs
for speed.

Why is it important?

Otherwise the starting of the opbeans-node container is potentially very slow and doesn't run the Node.js APM agent code one expects.

Related issues

Fixes: #1083

Fixes './scripts/compose.py start --opbeans-node-agent-local-repo=$dir'
to (a) install the Node.js APM agent into the opbeans-node app at "/app"
and (b) to skip copying the possibly large node_modules and build dirs
for speed.

Fixes: elastic#1083
@trentm trentm requested a review from graphaelli March 22, 2021 21:29
@trentm trentm self-assigned this Mar 22, 2021
echo "Installing from local folder"
# copy to folder inside container to ensure were not poluting the local folder
cp -r /local-install ~
cd ~/local-install && npm install .
Copy link
Member Author

Choose a reason for hiding this comment

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

This npm install . was installing the deps for the apm-agent-nodejs copy in ~/local-install, but it wasn't installing them where the app at "/app" would use it.

echo "Installing elastic-apm-node from local folder (--opbeans-node-agent-local-repo)"
# Copy to a folder inside container to ensure we're not polluting the
# local folder. Skip possibly huge dirs to speed this up.
apk add rsync
Copy link
Member Author

Choose a reason for hiding this comment

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

Is installing rsync appropriate here? Would doing so in the Dockerfile be more appropriate?

Copy link
Contributor

Choose a reason for hiding this comment

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

it is better to add packages on the Dockerfile

@apmmachine
Copy link
Collaborator

apmmachine commented Mar 22, 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: Started by timer

  • Start Time: 2021-03-23T03:19:00.668+0000

  • Duration: 34 min 50 sec

  • Commit: addd2d9

Test stats 🧪

Test Results
Failed 0
Passed 490
Skipped 1
Total 491

Trends 🧪

Image of Build Times

Image of Tests

@kuisathaverat kuisathaverat requested a review from a team March 23, 2021 08:38
@apmmachine
Copy link
Collaborator

💚 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 #1084 updated

  • Start Time: 2021-03-23T16:56:54.837+0000

  • Duration: 36 min 35 sec

  • Commit: a56980b

Test stats 🧪

Test Results
Failed 0
Passed 490
Skipped 1
Total 491

Trends 🧪

Image of Build Times

Image of Tests

@trentm trentm merged commit 41ac1c3 into elastic:master Mar 23, 2021
@trentm trentm deleted the fix-1083 branch March 23, 2021 17:41
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)
  ...
trentm added a commit to trentm/apm-integration-testing that referenced this pull request Apr 28, 2021
Fixes './scripts/compose.py start --opbeans-node-agent-local-repo=$dir'
to (a) install the Node.js APM agent into the opbeans-node app at "/app"
and (b) to skip copying the possibly large node_modules and build dirs
for speed.

Fixes: elastic#1083

# Conflicts:
#	README.md
trentm added a commit that referenced this pull request Apr 28, 2021
Fixes './scripts/compose.py start --opbeans-node-agent-local-repo=$dir'
to (a) install the Node.js APM agent into the opbeans-node app at "/app"
and (b) to skip copying the possibly large node_modules and build dirs
for speed.

Fixes: #1083

# Conflicts:
#	README.md
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.

"--opbeans-node-agent-local-repo=/some/local/dir" doesn't work
4 participants