Build-a-Node-RED-starter-dashboard-application-in-IBM-Cloud

Step 1: Create IBM Cloud account

Signup/Sign-in on IBM Cloud account: https://ibm.biz/node-red-workshop

Step 2: create the Node-RED Starter application.

Open the catalog and search for node-red. Click on the Node-RED App tile

1

On the Create tab, a randomly generated App name will be suggested. Either accept that default name or provide a unique name for your application. This will become part of the application URL.

Note: If the name is not unique, you will see an error message and you must enter a different name before you can continue.

2

Click the Create button to continue. This will create your application, but it is not yet deployed to IBM Cloud.

3

Step 3. Enable the Continuous Delivery feature

click the Deploy your app button to enable the Continuous Delivery feature for your application.

4

Select Cloud Foundry from deployment target option

5

You will need to create an IBM Cloud API key to allow the deployment process to access your resources. Click the New button to create the key. A message dialog will appear. You can accept the default values and confirm to close the dialog.Also Increase the Memory allocation per instance slider to at least 128MB. If you do not increase the memory allocation, your Node-RED application might not have sufficient memory to run successfully.

6

Configure the DevOps toolchain by selecting the region it should be created in. Again, try to match the region you selected previously. Click Create.

7

Refresh the page, the Deployment Automation section will show details of your newly created Delivery Pipeline. The Status field of the pipeline will eventually show In progress. That means your application is being built and deployed.

8

Click the Status field to see the full status of the Delivery Pipeline. The Deploy stage will take a few minutes to complete. You can click on the View logs and history link to check its progress. Eventually the Deploy stage will go green to show it has passed. This means your Node-RED Starter application is now running.

9

Step 4: Open and Configure your Node-RED application

on the application details page click on the App URL to open up your Node-RED application in a new browser tab.

10

On the initial screen, click Next to continue. Secure your Node-RED editor by providing a username and password. If you need to change these at any point, you can either edit the values in the Cloudant database, or override them using environment variables. The documentation on nodered.org describes how to do this. Click Next to continue. Click Finish to proceed.

11a

Node-RED will save your changes and then load the main application. From here you can click the Go to your Node-RED flow editor button to open the editor.

11

The Node-RED editor opens showing the default flow.

Step 5: Add Dashboard nodes to your Node-RED palette

On your application’s details page, click Source url

12

This will take you to a git repository where you can edit the application source code from your browser. Scroll down the list of files and click on package.json. This file lists the module dependencies of your application.

13

Click the edit button and Add following in dependecies section

 "node-red-dashboard": "2.x",

14

Note: Do not forget the comma (,) at the end of the line to separate it from the next entry.

click Commit changes