Serving, publishing, and deploying your New Relic One app

There are two options for placing your application in New Relic One:

For details on permissions and access to data, see Permissions.

 

Serve locally

While developing your application, you can locally serve the Nerdpack, which will display it in New Relic One. If you're doing this for the first time, we recommend going through the quick-start process.

To serve a Nerdpack locally: 

  1. Serve the Nerdpack by running the following in the parent root folder of your Nerdpack: nr1 nerdpack:serve.

  2. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks available.

The serve command must be run with an API key that is associated with the user who created the Nerdpack. A different user won't be able to serve unless they use the creator's API key.

When you make a change to a locally served Nerdpack, New Relic One will automatically reload it.

For more on this, see Local development.

Publish

The CLI command nerdpack:publish places your Nerdpack in New Relic One. To publish and deploy, you must be a Nerdpack manager (a type of New Relic add-on role). Your New Relic account administrator can grant this role. For more on permissions, see Authentication and permissions.

Note: New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published. Thus, the nr1 nerdpack:publish command expects the correct permissions (the aforementioned Nerdpack Manager role and a unique version (as specified in the package.json's version attribute).

To publish, run: nr1 nerdpack:publish

To learn how to switch the account a Nerdpack is associated with, see App access to data.

To learn more about the command's capabilities, run:

nr1 nerdpack:publish --help

Deploy

One of the CLI commands is nerdpack:deploy. Deploying a Nerdpack is how you choose which New Relic accounts have access to your application, and how you control which version of the application they’ll see.

When you deploy a Nerdpack, you choose its "channel." A channel represents the development status of an application. There are three-channel choices: DEV, BETA, and STABLE. When you deploy your application (or a new version of your application) you assign it to one of these channels. Channels are meant to be an easier way to control application version access than having to be concerned with many specific version numbers. 

For more on permissions, see Authentication and permissions

Subscribe

Once an app is deployed, a user with a Nerdpack Manager role can use the nr1 nerdpack:subscribe command to subscribe the owner account, or any of its subaccounts, to that app. This is what allows the app to be accessible in New Relic One. 

For details on subscribe permissions, see Authentication and permissions

For more on how to publish and deploy, see the workshop.