Serve, publish, and deploy your New Relic One app

20 min

When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. The following sections describe how to serve your app locally, add it to New Relic One, and then share it with coworkers.

  • Serve it locally: During development, you can serve it locally to test it out.

  • Publish it: When your application is ready for the world, you can publish and deploy it, and subscribe accounts to it.

Before you begin

This guide requires the following:

  • A New Relic One app or Nerdpack
  • New Relic One CLI
  • The Nerdpack manager role for publishing, deploying, and subscribing apps.

About permissions

The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators or owners have the Nerdpack manager role automatically, and can subscribe their accounts to Nerdpacks available to that acount. You can learn about permissions related to managing applications in the product documentation.

About versions

New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published. Thus, the nr1 nerdpack:publish command requires the following:

  • The Nerdpack Manager role
  • A unique version as specified in the version attribute found in the app's package.json.

Step 1 of 4

Serve your app locally

While developing your application, you can locally serve the Nerdpack, which will display it in New Relic One.

  1. In the parent root folder of your Nerdpack, run nr1 nerdpack:serve.

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

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

Step 2 of 4

Publish

Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager.

  • To publish your Nerdpack, run nr1 nerdpack:publish.

Step 3 of 4

Deploy

Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with many specific version numbers.

  1. To deploy an application, run nr1 nerdpack:deploy.

Step 4 of 4

Subscribe

You provide access to the Nerdpacks you create (or manage) by subscribing accounts to them. When you publish and deploy your application, it’s available to you in the New Relic One Catalog. Use the Catalog to manage the information that you want to share about your application, as well as how it appears on the New Relic One home page. Subscribe accounts to your applications with the Catalog too. For information about subscribing, see Discover and manage applications with New Relic One Catalog.