Knowledge Base

cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced NPM Guide for the AppDynamics Node.js Agent

AppDynamics Node.js Agent native dependencies and their environments

 

The AppDynamics Node.js Agent has multiple native dependencies which are keyed to particular environments. As such, the Agent works somewhat differently than other NPM packages. 

 

For example, when downloading our package from NPM, it will request a dependency appdynamics-native which itself will in turn download an artifact to install that will work only for a particular environment. As we want to support multiple environments, we need some way to distribute multiple artifacts for each dependency; one for each unique environment.

 

The way we currently accomplish this is through a post install script for each dependency. The agent modules containing cross-platform Javascript are uploaded to NPM, but the platform-dependent portions are hosted on AppDynamics infrastructure and downloaded separately. This allows our agent to work well with lock files of package managers, while still retaining the ability to deploy platform-specific artifacts, which otherwise would change the checksum within these lock files.

 

Generally, dependency artifacts are matrixed on Node.js major version, platform, and architecture. This means that the same dependency has many different potential artifacts, depending on the automatically detected values of the Node.js version, platform, and architecture.

 

The most important operational implication of this is that users must install the agent within an environment which exactly matches the target deployment environment, otherwise they will be deploying an agent bundle that will not load properly. We see this scenario in many CI/CD pipelines, where the build server is in important ways set up differently than the deployment servers/containers, and needs to be adjusted.

Version history
Revision #:
6 of 6
Last update:
‎09-29-2020 03:12 PM
Updated by:
 
Labels (1)
Tags (2)


Found this article helpful? Click the Thumbs Up button.
Have an additional comment? Post it below.