Node-RED in Bluemix

Node-RED in Bluemix

A visual tool for wiring the Internet of Things

Node-RED provides a browser-based editor that makes it easy to wire together flows that can be deployed to the runtime in a single-click.

The version running here has been customised for the Bluemix cloud environment.

More information about Node-RED, including documentation, can be found at nodered.org.

Customising your instance of Node-RED

This template instance of Node-RED is enough to get you started creating flows.

You may want to customise it for your needs, for example replacing this introduction page with your own, adding http authentication to the flow editor or adding new nodes to the palette.

To start customising your instance of Node-RED, you can either download the application locally or use IBM DevOps Services to edit and deploy your changes directly.

Using IBM DevOps Services

  1. Within your Bluemix dashboard, open the overview page for the application.
  2. Click the link to Add Git Integration and follow the guide to import the application into IBM DevOps Services
  3. Once complete, click the Edit Code link to open it in IBM DevOps Services
  4. Customise the application following the guide below, commit your changes and push them back to Bluemix

Downloading the application locally

  1. Within your Bluemix dashboard, open the overview page for the application.
  2. Click on the Start Coding in the sidebar
  3. Follow the instructions there for downloading, editing and pushing back into Bluemix

Password protect the flow editor

By default, the editor is open for anyone to access and modify flows. To password-protect the editor:

  1. In the Bluemix dashboard, select the 'Environment Variables' page for your application
  2. Add the following user-defined variables:
    • NODE_RED_USERNAME - the username to secure the editor with
    • NODE_RED_PASSWORD - the password to secure the editor with
  3. Click Save.

Adding new nodes to the palette

  1. There is a growing collection of additional nodes that can be added to the Node-RED editor. You can search for available nodes in the Node-RED library.
  2. Edit the file package.json and add the required node package to the dependencies section. The format is:
    "node-red-node-package-name":"x.x.x"
    Where x.x.x is the desired version number.

Upgrading the version of Node-RED

  1. This boilerplate is configured to grab the latest stable release of Node-RED whenever the application is pushed into Bluemix. Simply commit and push a change from IBM DevOps Services or push from your local copy to trigger an update. You can find out about the latest version at nodered.org.

Changing the static web content

  1. The page you are reading now is served as static content from the application. This can be replaced with whatever content you want in the public directory.

Remove static web content and serve the flow editor from the root path

  1. In the file bluemix-settings.js, delete the httpStatic and httpAdminRoot entries.