-
Notifications
You must be signed in to change notification settings - Fork 9
Add Node-RED appliance #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pablodelarco
wants to merge
11
commits into
OpenNebula:master
Choose a base branch
from
pablodelarco:feature/add-nodered-appliance
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add Node-RED appliance #88
pablodelarco
wants to merge
11
commits into
OpenNebula:master
from
pablodelarco:feature/add-nodered-appliance
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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)
- 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Appliance
New appliance submission for Node-RED flow-based programming tool.
Appliance Name
:app: nodered
Type of Contribution
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:
Technical Implementation:
nodered/node-red:latest) pre-pulled and ready to runAccess Methods:
Contributor Checklist
Publisher Information
Testing & Validation
Files Added
Appliance Files:
appliances/nodered/appliance.sh- Main appliance script with Docker container managementappliances/nodered/metadata.yaml- Appliance metadataappliances/nodered/README.md- Documentationappliances/nodered/context/context.sh- Context initialization scriptappliances/nodered/3fc354db-94e0-4ced-adcb-03b1b84c89d9.yaml- Appliance configurationPacker Build Files:
apps-code/community-apps/packer/nodered/nodered.pkr.hcl- Main Packer configurationapps-code/community-apps/packer/nodered/variables.pkr.hcl- Build variablesapps-code/community-apps/packer/nodered/common.pkr.hcl- Common configuration (symlink)apps-code/community-apps/packer/nodered/gen_context- Context generation scriptapps-code/community-apps/packer/nodered/81-configure-ssh.sh- SSH configurationapps-code/community-apps/packer/nodered/82-configure-context.sh- Context configurationapps-code/community-apps/packer/nodered/postprocess.sh- Post-processing scriptLogo:
logos/nodered.png- Official Node-RED logo