Skip to content

Conversation

@pablodelarco
Copy link
Contributor

@pablodelarco pablodelarco commented Oct 2, 2025

Appliance

New appliance submission for n8n workflow automation platform.

Appliance Name

:app: n8n

Type of Contribution

  • New Appliance
  • Update to an Existing Appliance

Description of Changes

This PR adds a new n8n appliance to the OpenNebula Community Marketplace.

n8n is a fair-code licensed workflow automation tool that allows you to connect different services and automate tasks. It provides a visual workflow editor with a node-based interface for creating complex automation workflows. This appliance provides:

  • Visual workflow editor for connecting services and APIs
  • n8n 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 5678
  • Extensible with custom nodes and integrations
  • REST API and webhook support for programmatic access
  • Self-hosted solution with complete control over workflows

Technical Implementation:

  • Ubuntu 22.04 LTS base system with Docker Engine CE pre-installed
  • n8n container (n8nio/n8n: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
  • Data persistence with volume mapping to /data:/home/node/.n8n
  • Includes N8N_SECURE_COOKIE=false for IP-based access without HTTPS

Access Methods:

  • VNC: Direct access to desktop environment
  • SSH: Key-based authentication from OpenNebula context
  • Web Interface: n8n workflow editor on port 5678
  • 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: n8n)
  • Complete Packer build structure included
  • All necessary context scripts and configuration files included
  • Added to SERVICES list in Makefile.config

Publisher Information

  • Publisher: Pablo del Arco
  • Email: [email protected]
  • Version: 1.0.0-1
  • Docker Image: n8nio/n8n: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 5678
  • ✅ Auto-login console functional
  • ✅ Workflow creation and execution tested
  • ✅ Data persistence verified across reboots
  • ✅ Follows team naming convention requirements

Files Added

Appliance Files:

  • appliances/n8n/appliance.sh - Main appliance script with Docker container management
  • appliances/n8n/metadata.yaml - Appliance metadata
  • appliances/n8n/README.md - Documentation
  • appliances/n8n/CHANGELOG.md - Version history
  • appliances/n8n/context.yaml - Context configuration
  • appliances/n8n/tests.yaml - Test configuration
  • appliances/n8n/tests/00-n8n_basic.rb - Basic functionality tests
  • appliances/n8n/cf81cb32-dde4-4d47-a09c-fc3b4f058f45.yaml - Appliance configuration

Packer Build Files:

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

Configuration:

  • apps-code/community-apps/Makefile.config - Added n8n to SERVICES list

Logo:

  • logos/n8n.png - Official n8n logo (256x256)

- Add new Image appliance for n8n workflow automation platform
- Support for visual workflow editor connecting services and APIs
- Include Docker-based deployment with automatic container startup
- Features Ubuntu 22.04 LTS, Docker Engine CE, n8n latest container
- Add contextualization parameters for container configuration
- Include png logo (256x256) and complete appliance metadata
- Web interface accessible on port 5678
- Configurable via OpenNebula context: ports, environment variables, volumes
- Data persistence with volume mapping to /data:/home/node/.n8n
- Includes N8N_SECURE_COOKIE=false for IP-based access
@pablodelarco pablodelarco requested a review from mkutouski October 2, 2025 09:19
OpenNebula Community Contributor added 8 commits October 2, 2025 09:21
…tion

- Fix tests.yaml: remove escaped underscore (00-n8n\_basic.rb -> 00-n8n_basic.rb)
- Rewrite tests to use standard RSpec framework (lib/community/app_handler)
- Add comprehensive tests matching actual appliance:
  * Docker installation and service status
  * n8n container image availability (n8nio/n8n:latest)
  * Data directory existence (/data)
  * Container running status (n8n-container)
  * Container responsiveness
  * Container restart policy (unless-stopped)
  * Port mapping (5678:5678)
  * Volume mapping (/data:/home/node/.n8n)
  * oneapps MOTD verification (required test)
- Remove old test framework that doesn't exist in marketplace
Add missing newline at end of file to comply with yamllint rules.
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 n8n
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 1️⃣ section with template configuration
- Add :infra: section with disk_format and apps_path
- Add generated context.yaml for n8n appliance

All 9 tests passing successfully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant