IBM Developer Blog

Follow the latest happenings with IBM Developer and stay in the know.

Use Node-RED to quickly build all kinds of apps

Node-RED has been available in the IBM Cloud catalog since the very early days of the platform. With just a couple of clicks it was possible to get Node-RED deployed as a Cloud Foundry application. It has proved to be a very popular option in countless engagements to quickly start building applications that make use of the wide range of services available.

Node-RED Starter Kit

The Node-RED boilerplate application has recently been replaced with the Node-RED Starter Kit. This provides a new user experience for getting the application deployed and is a first step in opening up some new options in the future.

When you chose to create a new instance of the old boilerplate application, you would go straight to configuring how it should be deployed into a Cloud Foundry space of IBM Cloud. That was quick and easy, but it skipped over an important aspect of maintaining any application: the code.

A common task after installing Node-RED would be to add some extra nodes to the palette, or customize the application in some way. The recommended way of doing that was to edit the application’s package.json file that lists all of its dependencies. With the old boilerplate, users had to know to enable the Continuous Delivery feature for their app, which generated a git repository and deployment pipeline. From there, they could make the changes and deploy them back to Cloud Foundry.

With the new Starter Kit, the experience is slightly different. When you create a new instance, the first thing the platform does is set up a git repository for your application — it starts with the code. You can then choose how that code should be deployed. With a couple of clicks, you tell the platform to deploy the code to Cloud Foundry, and you have your application running as before.

Because the Node-RED Starter Kit starts with the code, it is much easier to customize and maintain the application since the git repository and delivery pipeline have already been setup for you.

Other starter kits in the catalog offer alternative targets for deploying to, such that you can get your application running in a Kubernetes cluster rather than Cloud Foundry if you want. We don’t have that option with Node-RED yet, but by moving to this new Starter Kit infrastructure, it will be easy for us to add that as an option in the future.

To help users get started with the new Node-RED Starter Kit, we’ve published a complete tutorial that walks you through the steps needed, including how to customize your application once it is deployed.

Using Node-RED in production environments

When using the Node-RED Starter Kit, you tend to develop and run your application in the same environment. This mode of working is not suitable for production environments, where there needs to be more control and governance around the development process.

In Cloud Native development, there is typically a well defined development “pipeline” where:

  • Code is created and stored in a version control system, such as git
  • A build step takes the code from the version control system, builds the code and packages it in a container which is then stored in a registry
  • A deploy step that takes the application container from the registry and deploys it to a cloud environment, along with any required configuration needed by the application which is specific to the target environment where the container is being deployed.

We have created a set of tutorials in a learning path that takes you through each of the steps outlined above to allow Node-RED applications to work in modern DevOps environments.

Node-RED on IBM Developer

On the Node-RED home page on IBM Developer, we’re featuring our newest and best Node-RED content. We’ve also added a new Get started page to help you make the most of Node-RED.

What will you get started building with Node-RED today?