Skip to content

vm: add joinmyhomelab-vm (new script) - #2719

Open
bash3r777 wants to merge 1 commit into
community-scripts:mainfrom
joinmyhomelab:vm/joinmyhomelab-vm
Open

bash3r777 wants to merge 1 commit into
community-scripts:mainfrom
joinmyhomelab:vm/joinmyhomelab-vm

Conversation

@bash3r777

Copy link
Copy Markdown

AI assistance (as the template asks): the script, the catalog entry and this PR were produced with an AI agent — DeepSeek V4.1 Flash (via OpenRouter; that setup exposes no explicit reasoning-effort level). The output was then reviewed against AGENTS.md and .github/agents/pve-script-creator.agent.md, shellchecked, and tested on real Proxmox VE hosts; two behaviours changed as a direct result of that testing (the unattended path and the SSH handshake — see Additional Information).

✍️ Description

Adds vm/joinmyhomelab-vm.sh and json/joinmyhomelab-vm.json. Join My Homelab is a community compute marketplace: members lend spare Proxmox hardware and other members host VMs on the shared cluster — this VM is the node that provides the hardware. It boots a vendor image, like umbrel-os-vm, with one deviation: the image is built per account and carries that account's join token, so it cannot be a fixed public URL. The script asks the platform for it over SSH, or takes VM_ISO_URL; an unattended run without it creates the VM without the image instead of prompting. Tested on real Proxmox VE hosts, unattended, through the same env contract your build test uses.

🔗 Related PR / Issue

Link: #2718

✅ Prerequisites

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No breaking changes – Existing functionality remains intact.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🧩 Script

Name: Join My Homelab

Tool: A community compute marketplace. Members lend spare Proxmox hardware, and other members host VMs/VPS on the shared cluster; the contributor keeps 90% of the credits their node produces. This script creates the node VM.

🗂️ Category

  • VM – Virtual machine (vm/)

🖥️ Platform – tested on

  • Proxmox VE – Created on a Proxmox VE host and the app works.

🏗️ Architecture

  • arm64 not supported – Confirmed upstream dependencies or binaries do not support arm64.

The platform is amd64 only and the script calls vm_require_arch amd64.


🛠️ Type of Change

  • 🆕 New script – A fully functional and tested script or script set.

🔍 Code & Security Review

  • Follows CODE-AUDIT.md & CONTRIBUTING.md guidelines
  • Uses correct script structure (vm/joinmyhomelab-vm.sh, json/joinmyhomelab-vm.json)
  • No hardcoded credentials
  • No Docker / Docker Compose – The application is installed bare-metal; Docker is not used.
  • No git pull – No upstream repository is fetched; the VM boots a per-account image.

📋 Additional Information

How it was tested

Proxmox VE 9 hosts, using the same contract as your harness — VM_UNATTENDED=1, VM_VMID, VM_HOSTNAME, VM_BRIDGE, VM_STORAGE, VM_ISO_STORAGE, VM_START set, stdin closed, script fetched by raw URL from this branch:

  1. Unattended, no VM_ISO_URL (what your build test will do): exit 0, VM created and started, image omitted — no prompt, no hang, no SSH attempt. A guest with no bootable image gets no DHCP lease, which your harness reports rather than fails.
  2. Unattended with VM_ISO_URL set to a real account image: exit 0, image downloaded and cached, VM created with the ISO attached and booted. The console showed Talos installing from the platform's registry, and the guest registered with the cluster (rmhl-bbbe14d6a3, IP 192.168.10.186). The test node and its VMs were removed afterwards.
  3. bash -n passes; shellcheck -S warning reports fewer findings than the existing vm/ scripts (same SC1090/SC2034 classes).

Why unattended never does the SSH handshake

The platform creates an account for any unknown key on first connection. If an unattended build did the handshake, every CI run would enrol an account and boot a node at the platform. So the handshake only runs when not unattended, and never when VM_ISO_URL is set — unattended installs must pass VM_ISO_URL.

The image is per account

The image is a small Talos installer carrying that account's discovery identity; it is not fetchable from a public URL. VM_ISO_URL is how an unattended install supplies it; interactively the script asks the platform (ssh -T [email protected] -- --iso-url), and the first connection creates the account.


📦 Application Requirements (for new scripts)

  • The application is at least 6 months old
  • The application is actively maintained
  • The application has 1,000+ GitHub stars
  • Official release tarballs are published
  • I understand that not all scripts will be accepted due to various reasons and criteria by the community-scripts ORG

Said plainly: this is a platform node installer, not an application, and it does not meet that bar — the project is about two months old and has no stars, and there are no release tarballs (the "release" is the per-account image the platform builds). I have left the boxes unticked rather than tick them falsely. If that rules it out, no hard feelings: the script is published standalone either way.

🌐 Source


🤖 AI Assistance

Degree of LLM use: drafted by an AI agent — DeepSeek V4.1 Flash (OpenRouter), which exposes no explicit reasoning-effort setting. Reviewed against AGENTS.md and the vm/ conventions, shellchecked, and tested unattended on real Proxmox VE hosts as described above.

Creates a VM that boots the account's personal Join My Homelab image,
installs itself and joins the community cluster as a node.

The image is per account, so the script asks joinmyhomelab.com for it over
SSH (the first connection creates the account), or takes VM_ISO_URL. An
unattended run without VM_ISO_URL creates the VM without the image instead
of prompting, so the build test needs no account.
@bash3r777
bash3r777 requested a review from a team as a code owner November 23, 2026 17:34
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Not ready for review yet

@bash3r777, this pull request is missing the following:

  • The application is at least 6 months old
  • The application is actively maintained
  • The application has 1,000+ GitHub stars
  • Official release tarballs are published

Edit the PR description to fix it — no new PR needed. This check runs again on every edit and clears itself once everything is in place.

Until then the PR is marked stale and will be closed in 7 days.


@community-scripts/contributor please take a look: close it, comment, or set keep-open to keep it.

@github-actions github-actions Bot added requirements missing PR description misses template items; closes after 7 days unless fixed or keep-open stale new script labels Nov 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Try this branch

vm/joinmyhomelab-vm.sh, run in the Proxmox VE shell:

bash -c "$(curl -fsSL "https://raw.githubusercontent.com/joinmyhomelab/DevScripts/vm/joinmyhomelab-vm/vm/joinmyhomelab-vm.sh")"

Only the script itself comes from this branch. The engine it loads still
comes from community-scripts/core on main.

Against a core branch as well

Add COMMUNITY_SCRIPTS_CORE_URL=https://raw.githubusercontent.com/OWNER/core/BRANCH
to test an engine change at the same time. The two resolve independently.

community-scripts-ci-screenshots Bot added a commit to community-scripts/ci that referenced this pull request Nov 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Proxmox script test

@bash3r777 ✅ 1/1 passed at 5fefebb

Script Platform Install Update Duration Detail
vm/joinmyhomelab-vm.sh VM ✅ – 7m26s booted, no DHCP lease (an installer ISO, or no network)
📸 vm/joinmyhomelab-vm.sh (VM) — console Screenshot of vm/joinmyhomelab-vm.sh
✅ vm/joinmyhomelab-vm.sh (VM) — build log
Community Scripts
  Join My Homelab
 Loading...
File descriptor 148 (pipe:[388682]) leaked on lvs invocation. Parent PID 77858: bash
File descriptor 151 (pipe:[388683]) leaked on lvs invocation. Parent PID 77858: bash
  🆔  Virtual Machine ID: 100
  📦  Machine Type: Q35 (Modern)
  💾  Disk Size: 50G
  💾  Disk Cache: None
  🏠  Hostname: joinmyhomelab-node
  🖥️  CPU Model: host
  🧠  CPU Cores: 4
  🛠️  RAM Size: 8192 MiB
  🌉  Bridge: vmbr0
  🔗  MAC Address: 02:B0:AF:11:43:74
  🏷️  VLAN: Default
  ⚙️  Interface MTU Size: Default
  ⚙️  Keyboard Layout: Proxmox default
  🌐  Start VM when completed: yes
  🔍  Verbose Mode: no
  🚀  Creating a Join My Homelab VM using the above default settings
  💡  Unattended: script defaults with environment overrides
  💡   VM_ISO_URL is not set: creating the VM without the Join My Homelab image
  ✔️   Using local for Storage Location.
  ✔️   Created a Join My Homelab node (ci-joinmyhomelab-vm-9100)
  ✔️   Started Join My Homelab node
  💡  Join My Homelab Summary:
  VM ID: 9100
  Hostname: ci-joinmyhomelab-vm-9100
  Resources: 4 vCPU, 8192 MiB RAM, 50G disk
  State: running
  Image: none
  Dashboard: ssh [email protected]
  💡  Next Steps:
  1. Open the console in Proxmox (noVNC) to watch the node install.
  2. It installs itself, reboots, and joins the cluster.
  3. The dashboard shows the node green when it is ready: ssh [email protected]
  ✔️   VM created. The node installs and joins the cluster on first boot.

Full logs: workflow run (artifacts result-*). Comment /test to build again.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new script requirements missing PR description misses template items; closes after 7 days unless fixed or keep-open stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant