Skip to content

Latest commit

 

History

History
106 lines (56 loc) · 3.79 KB

README.md

File metadata and controls

106 lines (56 loc) · 3.79 KB

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