cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NodeJS agent installation with custom npm registry

Hi,

 

in our environment the build machines have access to a custom npm registry (based on nexus) that is able to proxy requests to npmjs.org, but otherwise has no internet access. The problem with the NodeJS appdynamics agent is that it tries to fetch dependencies from appdynamics.com.

 

I published these dependencies (appdynamics-jre, appdynamics-proxy etc.) to our private registry and then tried to publish a "fork" of appdynamics (with its dependencies pointing to that registry), but did not succeed. Is there a general recommendation for this type of scenario?

 

Thanks!

2 REPLIES 2

Ayush.Ghosh
AppDynamics Team

Hi Christian,

 

There are 2 ways for you to install the AppDynamics Node.JS agent in a system with no internet

 

Way 1 (When you have a system with similar environment with inernet access.)

 

Install the appdynamics agent in that system in a fresh drive with npm install appdynamics@version. (replace "verison" with the version required)

 

Copy contents of node_modules folder to the server you want to instrument.

 

Way 2 (When you don't have a system with same environment)

 

1: Get the npm user agent by running the command "npm config get user-agent"

 

2: Use any system with nodejs installed. 

3: Backup this system's npm user agent with the same command "npm config get user-agent"

Save the above output to revert the settings back, once we have the appdynamics package.

 

4: Set the npm user agent in the system with internet to the one we took earlier in step 1 with command 'npm config set user-agent "out put from step 1" '

5: Follow the steps in way 1 on installing the agent & copying the files in node_modules to the target server.

6: Revert the npm user agent by running the command  'npm config set user-agent "out put from step 3" '

 

Please let us know if you face any issue.

 

Thanks

Ayush

 

 

 

 

 

 

 

 

 

Hi.

This does not work for me as I need to have a packaged tgz file to upload to nexus3. When it tries to open the packaged file (downloaded from the appdynamics download sites) it fails.

I get this:

root@ip-10-0-0-145:/home/ubuntu/nexus# npm install appdynamics@4.5.12
npm WARN deprecated set-immediate@0.1.1: Use `setimmediate` instead
npm WARN excluding symbolic link node_modules/.bin/n -> ../n/bin/n
npm WARN excluding symbolic link node_modules/.bin/semver -> ../semver/bin/semver
npm WARN excluding symbolic link node_modules/.bin/uuid -> ../uuid/bin/uuid
npm WARN excluding symbolic link node_modules/appdynamics-libagent/node_modules/.bin/sshpk-conv -> ../sshpk/bin/sshpk-conv
npm WARN excluding symbolic link node_modules/appdynamics-libagent/node_modules/.bin/sshpk-sign -> ../sshpk/bin/sshpk-sign
npm WARN excluding symbolic link node_modules/appdynamics-libagent/node_modules/.bin/sshpk-verify -> ../sshpk/bin/sshpk-verify
npm WARN excluding symbolic link node_modules/appdynamics-libagent/node_modules/.bin/uuid -> ../uuid/bin/uuid
npm WARN excluding symbolic link node_modules/appdynamics-libagent-napi/node_modules/.bin/sshpk-conv -> ../sshpk/bin/sshpk-conv
npm WARN excluding symbolic link node_modules/appdynamics-libagent-napi/node_modules/.bin/sshpk-sign -> ../sshpk/bin/sshpk-sign
npm WARN excluding symbolic link node_modules/appdynamics-libagent-napi/node_modules/.bin/sshpk-verify -> ../sshpk/bin/sshpk-verify
npm WARN excluding symbolic link node_modules/appdynamics-libagent-napi/node_modules/.bin/uuid -> ../uuid/bin/uuid
npm WARN excluding symbolic link node_modules/log4js/node_modules/.bin/semver -> ../semver/bin/semver
/home/ubuntu/nexus
└─┬ appdynamics@4.5.12
├─┬ cls-hooked@4.2.2
│ ├─┬ async-hook-jl@1.7.6
│ │ └── stack-chain@1.3.7
│ ├─┬ emitter-listener@1.1.2
│ │ └── shimmer@1.2.1
│ └── semver@5.6.0
├─┬ log4js@0.6.38
│ ├─┬ readable-stream@1.0.34
│ │ ├── core-util-is@1.0.2
│ │ ├── inherits@2.0.3
│ │ ├── isarray@0.0.1
│ │ └── string_decoder@0.10.31
│ └── semver@4.3.6
├── n@2.1.12
├── set-immediate@0.1.1
└── uuid@3.1.0

npm WARN enoent ENOENT: no such file or directory, open '/home/ubuntu/nexus/package.json'
npm WARN nexus No description
npm WARN nexus No repository field.
npm WARN nexus No README data
npm WARN nexus No license field.

 

 

and nothing in the appdynamics node_modules dir.

Do you have a solution for this?

 

Thanks,

Asaf