This repository is deprecated; please follow the main search page or use the ‘Related code repos’ widget on the right side of the current page.

Node-RED Slim

This repo contains code to build the docker image of Node-RED slim version that can be run on Cisco IR800 series devices.

Installation and Usage

0. Build Node-RED slim Docker image

After you git clone this repo, build the Docker image using:

docker build -t node0:1.0 .

By building the above image, later you can use it to build docker image of IOx GPS node or other nodes.

1. Create IOx application package

If you want to play with the Node-RED without IOx specific nodes, you can now package the files using:

ioxclient docker package node0:1.0 .

2. Deploy, activate and start the app

Then use Local Manager, ioxclient or Fog Director to deploy, activate and start the app in your device(s).

For Local Manager option:

Access device Local Manager UI using the URL path https://<IR829_mgmt_intf_ip>:8443.

Deploy the app using the name nodered and the package package.tar that you created.

image

image

Activate the app with these configurations:

  • Choose iox-nat0 for network and 1880:1880 for custom port mapping.

  • Choose async1 and async0 for device serial ports.

  • The recommended resource profile is:

    • CPU: 200 cpu-units
    • Memory: 128 MB
    • Disk: 10 MB

    You can change the combination upon the consumption of your other apps. The memory should be no less.

image

image

image

Finally start the app.

image

For ioxclient option:

Run the following command to deploy, activate and start the app:

ioxclient app install nodered package.tar

ioxclient app activate --payload activation.json nodered

ioxclient app start nodered

The activation.json file is similar to the Sample Activation payload in GPS service introduction of IOx.

Verify the app is running

a) Add NAT forwarding rule in IOS running configuration for port 1880.

b) Open Node-RED interface at http://<IR829_mgmt_interface_ip>:1880.

image

Build a simple flow with inject and debug nodes. Use timestamp as the payload of inject node.

image

Deploy the flow.

image

Click the button at timestamp node once. You'll be able to see the current timestamp.

image

Using on a DevNet Sandbox

You can also run the app on a Cisco DevNet Sandbox if you remove the "devices" section in package.yaml.

Go to DevNet Sandbox page: https://devnetsandbox.cisco.com/RM/Topology

Choose an IOx Sandbox under IoT category to reserve.

image

Getting help

If you have questions, concerns, bug reports, etc., please file an issue in this repository's Issue Tracker.


Credits and references

  1. https://github.com/node-red/node-red-docker
View code on GitHub
  • Owner

  • Contributors

    +2Github contributors
  • Categories

  • Programming Languages

    Dockerfile
  • License

    Apache License 2.0

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.