Skip to content

Conversation

@pablodelarco
Copy link
Contributor

Appliance

New appliance submission for Node-RED flow-based programming tool.

Appliance Name

:app: nodered

Type of Contribution

  • New Appliance
  • Update to an Existing Appliance

Description of Changes

This PR adds a new Node-RED appliance to the OpenNebula Community Marketplace.

Node-RED is a flow-based development tool for visual programming developed originally by IBM for wiring together hardware devices, APIs and online services as part of the Internet of Things. This appliance provides:

  • Flow-based programming for event-driven applications
  • Node-RED container running on Ubuntu 22.04 LTS with Docker
  • VNC access for direct desktop environment interaction
  • SSH key authentication from OpenNebula context variables
  • Web interface accessible on port 1880
  • Visual programming interface with drag-and-drop nodes
  • Built-in library of nodes for common tasks
  • Easy integration with IoT devices, APIs, and online services

Technical Implementation:

  • Ubuntu 22.04 LTS base system with Docker Engine CE pre-installed
  • Node-RED container (nodered/node-red:latest) pre-pulled and ready to run
  • Automatic container startup and management via OpenNebula contextualization
  • Configurable container parameters (ports, volumes, environment variables)
  • OpenNebula context integration for SSH key injection
  • Auto-login console (root/opennebula) for easy access
  • 8GB virtual disk size optimized for the appliance

Access Methods:

  • VNC: Direct access to desktop environment
  • SSH: Key-based authentication from OpenNebula context
  • Web Interface: Node-RED flow editor on port 1880
  • Console: Auto-login console access

Contributor Checklist

  • The submission follows the Contribution Guidelines
  • My submission is based on the latest version of the master branch
  • For a new appliance, this Pull Request follows the agreed naming convention (single lowercase word: nodered)
  • Complete Packer build structure included
  • All necessary context scripts and configuration files included

Publisher Information

  • Publisher: Pablo del Arco
  • Email: pdelarco@opennebula.io
  • Version: 1.0.0-1
  • Docker Image: nodered/node-red:latest

Testing & Validation

  • ✅ Tested with OpenNebula 7.0 and KVM hypervisor
  • ✅ Image builds successfully with Packer
  • ✅ Docker image pre-pulled during build
  • ✅ VNC and SSH access verified
  • ✅ Container starts automatically on boot
  • ✅ Web interface accessible on port 1880
  • ✅ Auto-login console functional
  • ✅ Follows team naming convention requirements

Files Added

Appliance Files:

  • appliances/nodered/appliance.sh - Main appliance script with Docker container management
  • appliances/nodered/metadata.yaml - Appliance metadata
  • appliances/nodered/README.md - Documentation
  • appliances/nodered/context/context.sh - Context initialization script
  • appliances/nodered/3fc354db-94e0-4ced-adcb-03b1b84c89d9.yaml - Appliance configuration

Packer Build Files:

  • apps-code/community-apps/packer/nodered/nodered.pkr.hcl - Main Packer configuration
  • apps-code/community-apps/packer/nodered/variables.pkr.hcl - Build variables
  • apps-code/community-apps/packer/nodered/common.pkr.hcl - Common configuration (symlink)
  • apps-code/community-apps/packer/nodered/gen_context - Context generation script
  • apps-code/community-apps/packer/nodered/81-configure-ssh.sh - SSH configuration
  • apps-code/community-apps/packer/nodered/82-configure-context.sh - Context configuration
  • apps-code/community-apps/packer/nodered/postprocess.sh - Post-processing script

Logo:

  • logos/nodered.png - Official Node-RED logo

OpenNebula Community Contributor added 2 commits September 30, 2025 09:13
- Updated Node-RED appliance to use Docker container
- Docker image: nodered/node-red:latest
- Default port: 1880
- Virtual disk size: 8GB
- Pre-pulled Docker image during build
- Auto-login console (root/opennebula)
- VNC and SSH support
- OpenNebula contextualization
- Automatic container startup on boot

Packer configuration:
- Added complete packer build structure
- Disk size set to 8192MB (8GB)
- Context generation with proper hostname
- Post-processing with virt-sysprep and virt-sparsify
- All necessary build scripts included

Logo:
- Added official Node-RED logo (logos/nodered.png)
OpenNebula Community Contributor added 9 commits September 30, 2025 10:40
- Remove complex systemd service and startup script approach
- Use direct container setup in service_bootstrap() like Phoenix RTOS
- Add setup_nodered_container() function with msg logging
- Keep ONE_SERVICE_PARAMS for reconfigurability
- Simplify service_install() to just pull image and configure console
- Use msg info/error for consistent logging
- Add container health check with retry loop
- Add tests.yaml configuration file
- Add comprehensive test suite matching actual appliance:
  * Docker installation and service status
  * Node-RED container image availability (nodered/node-red:latest)
  * Data directory existence (/data)
  * Container running status (nodered-app)
  * Container responsiveness
  * Container restart policy (unless-stopped)
  * Port mapping (1880:1880)
  * Volume mapping (/data:/data)
  * oneapps MOTD verification (required test)
- Uses standard RSpec framework (lib/community/app_handler)
The user_inputs should be a dictionary (key: value), not an array.
Changed keys to lowercase with oneapp_ prefix to match OpenNebula conventions:
- CONTAINER_NAME -> oneapp_container_name
- CONTAINER_PORTS -> oneapp_container_ports
- CONTAINER_ENV -> oneapp_container_env
- CONTAINER_VOLUMES -> oneapp_container_volumes

Updated inputs_order to match the new uppercase context variable names.
Set ONE_SERVICE_VERSION='latest' instead of leaving it empty.
This fixes the build script metadata.
Use proper version number '1.0' instead of 'latest' for the appliance version.
- Add wait period for contextualization to complete (60s initial + up to 120s for Docker)
- Fix template parsing error in volume mount test (use single quotes for docker format)
- Fix app_handler.rb context escaping (add quotes around context value and use consistent escaping)

The tests now properly wait for Docker service to start and the Node-RED
container to be created before running validation checks.
- Fix metadata.yaml structure to match test framework requirements
- Change :os: from array to hash with :type and :base
- Change :hypervisor: from array to single value
- Add :context: section with container parameters
- Add 1️⃣ section with template configuration
- Add :infra: section with disk_format and apps_path
- Add generated context.yaml for Node-RED appliance

Tests should pass successfully with these changes.
Remove extra blank lines at end of file to comply with yamllint rules.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants