Skip to content

This repo includes labs that will be used for Node-RED Series

Notifications You must be signed in to change notification settings

pmmistry/Node-RED-Series

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 

Repository files navigation

Node-RED Series

Node-RED is a wonderful flow based programming tool that makes it easy to make event driven applications in a simple and intuitive way. Node-RED is a low code programming environment for beginners and experts alike who want to write and understand programming flow.

Node-RED provides plugins called nodes which can be installed to support almost everything related to programming. It can be used for APIs, DataBase, IoT devices, WebSockets, Emails, Scripting, Image Processing, Cloud computing, edge computing, creating websites and lot more one can think of doing it based on NodeJS. In this workshop we will go over getting started with Node-RED on IBM Cloud and learning Node-RED essentials.

Contents

  1. Get Started with Node-RED on IBM Cloud
  2. Labs
  3. References

Get Started with Node-RED on IBM Cloud

In this tutorial, you will learn how to create a Node-RED starter application in the IBM Cloud, including a Cloudant database to store the application flow configuration.

Prerequisites

To complete this tutorial, you need an IBM Cloud account (IBM Cloud Lite, trial, or paid account).

Estimated Time

You can complete this tutorial in less than 20 minutes.

Step 1: Find the Node-RED Starter in the IBM Cloud catalog

  1. Log in to IBM Cloud.
  2. Open the catalog and search for node-red.
  3. Click on the Node-RED App tile.

Image1

Step 2: Create your application

Now you need to create the Node-RED Starter application.

  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.

  1. The Node-RED Starter application requires an instance of the Cloudant database service to store your application flow configuration. Select the region the service should be created in and what pricing plan it should use.

Note: You can only have one Cloudant instance using the Lite plan. If you have already got an instance, you will be able to select it from the Pricing plan select box. You can have more than one Node-RED Starter application using the same Cloudant service instance.

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

Image2

Step 3: Enable the Continuous Delivery feature

At this point, you have created the application and the resources it requires, but you have not deployed it anywhere to run. This step shows how to setup the Continuous Delivery feature that will deploy your application into the Cloud Foundry space of IBM Cloud.

  1. On the next screen, click the Deploy your app button to enable the Continuous Delivery feature for your application. Image3

  2. 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. Image4

A message dialog will appear. You can accept the default values and confirm to close the dialog. Image5

  1. 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.

  2. The Node-RED Starter kit only supports deployment to the Cloud Foundry space of IBM Cloud. Select the region to deploy your application to. This should match the region you created your Cloudant instance in. Lite users might only be able to deploy to your default region.

Image6

Click Next to continue.

  1. Configure the DevOps toolchain by selecting the region it should be created in – again, try to match the region you selected previously.

Image7

Click Create. This will take you back to the application details page.

  1. After a few moments, the Deployment Automation section will refresh with the 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.

Click on the Status field to see the full status of the Delivery Pipeline.

Image8

  1. 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.

Image9

Step 4: Open the Node-RED application

Now that you’ve deployed your Node-RED application, let’s open it up!

  1. Back on the application details page, you should now see the App URL, Source and Deployment target fields filled in.

Image10

  1. Click on the App URL to open up your Node-RED application in a new browser tab.

Step 5:Configure your Node-RED application

The first time you open your Node-RED app, you’ll need to configure it and set up security.

  1. A new browser tab will open with the Node-RED start page. Image11

  2. On the initial screen, click Next to continue.

  3. 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. Image12

  4. The final screen summarizes the options you’ve made and highlights the environment variables you can use to change the options in the future. Click Finish to proceed.

  5. 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.

Image13

The Node-RED editor opens showing the default flow.

Image14

Labs

After you have finished creating a Node-RED instance on IBM Cloud you can go through these labs to build some Node-RED Applications

References

About

This repo includes labs that will be used for Node-RED Series

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •