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

"--opbeans-node-agent-local-repo=/some/local/dir" doesn't work #1083

Closed
trentm opened this issue Mar 22, 2021 · 0 comments · Fixed by #1084
Closed

"--opbeans-node-agent-local-repo=/some/local/dir" doesn't work #1083

trentm opened this issue Mar 22, 2021 · 0 comments · Fixed by #1084
Assignees

Comments

@trentm
Copy link
Member

trentm commented Mar 22, 2021

The compose.py script supports some --opbeans-$lang-agent-local-repo=$localDir options to have the opbeans-$lang container use an APM agent from the given $localDir (a working copy of the APM agent repo). For example:

% ./scripts/compose.py start master --with-opbeans-node \
    --opbeans-node-agent-local-repo=~/el/apm-agent-nodejs5

Two issues using the node.js version of this option:

  1. It doesn't actually install the Node.js APM agent from the local repo in a way that the opbeans-node installed at "/app" uses it.
  2. Part of the handling for this involves making a copy of the local repo dir (to not pollute it). Unfortunately the local repo dir can have a somewhat weighty node_modules dir, which can take a long time (sometimes too long, resulting in the container being marked as unhealthy).

Screen Shot 2021-03-22 at 1 39 58 PM

In my case:

% docker exec -ti 699d48159443 /bin/sh
/app # cd ~/local-install/
~/local-install # du -sh .
484.3M	.
~/local-install # du -sh node_modules
370.9M	node_modules
~/local-install # du -sk * | sort -n | tail -3
1516	test
101288	build
379756	node_modules

That's copying almost half a GiB for every ./scripts/compose.py start ....

PR coming to attempt to fix these.

@trentm trentm self-assigned this Mar 22, 2021
trentm added a commit to trentm/apm-integration-testing that referenced this issue Mar 22, 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
trentm added a commit that referenced this issue Mar 23, 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
trentm added a commit to trentm/apm-integration-testing that referenced this issue 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 issue 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 a pull request may close this issue.

1 participant