This is an old revision of the document!


Set up an Alpine container with Node-RED

Goal

This wiki describes how to install an LXC container with the Alpine OS on the router. The LXC container is already prepared with a Node-RED installation and can then be used immediately.

Prerequisites

  • NetModule Wireless Router with wireless connection
  • NetModule Software 5.0.0.100 or newer
  • Not available for legacy products NB1600, NB2700, NB3700, NB3710

The wiki was tested with router software 5.0.0.100 and the LXC container with Alpine armhf 3.22.


1. Setting up an LXC container with Alpine Linux and a ready-to-run Node-RED implementation

You can download LXC containers via the link. The file contains Alpine for container installation and Node-RED has also been added.

* Alpine Linux with Node-REDAlpine and Node-RED

Password: node_red

Once you have downloaded the file “node-red_container.tar.xz”, save it in a subdirectory of the router. Use the subdirectory “/tmp” for this purpose.

You can then install the container via the router's web interface. Under point 1, you must specify the directory where the file was stored on the router.

file:///tmp/node-red_container.tar.xz

To execute the installation, the “check box Install on” must be activated under point 2.


If the installation from the file was performed correctly, the LXC container is installed on the router and visible in the web interface.


Next, a network connection is submitted for the container. In this example, the container is simply assigned to LAN interface 1. However, you can also set up the container with its own IP network via the “routed” option.

The container receives its IP address from LAN 1 via DHCP. To ensure that it always receives the same address, we set this under the “Static Host” option.

Under point 1, we store the MAC address of the container. This is easy, as it is always the one you see in this image: “00:FF:AA:00:44:00”.

Under point 2, we assign an IP address from the DHCP range. In this example, we have assigned the IP “192.168.1.100“.

Under the router console, you can check whether the router is assigned the correct IP address.

USER
~ $ lxc-info guest0 Name: guest0 State: RUNNING PID: 2653 IP: 192.168.1.100 CPU use: 32.63 seconds BlkIO use: 68.77 MiB Memory use: 103.00 MiB KMem use: 3.77 MiB Link: virt0 TX bytes: 4.67 KiB RX bytes: 66.28 KiB Total bytes: 70.95 KiB ~ $

Under the console of the LXC container, you can check again whether the Node-RED daemon has already been started.

USER
~ $ lxc-attach guest0 ~ $ rc-service node-red status * status: starting ~ $


If everything worked, you can now access Node-RED in your web browser via the IP address 192.168.1.100:1880.