Skip to content

Conversation

@juronja
Copy link
Contributor

@juronja juronja commented Jan 16, 2026

Scripts wich are clearly AI generated and not further revied by the Author of this PR (in terms of Coding Standards and Script Layout) may be closed without review.

✍️ Description

This PR adds a TrueNAS Community Edition VM script and json for frontend. TrueNAS CE (Formerly TrueNAS SCALE) is a popular open source NAS software built on Debian (CORE versions are discontinued).

The script prepares the VM with the installation ISO image, which is automatically fetched from the official TrueNAS downloads URL. The user also has the option to import onboard disks.

After running the script, the user has to proceed with installing TrueNas via VM console.

  • App Name: TrueNAS Community Edition
  • Source: https://www.truenas.com/truenas-community-edition/
  • Default OS: Debian 12
  • Recommended Resources: 2 CPU, 8GB RAM, 16GB Disk
  • Access URL: Dynamically allocated IP after installation, which can be seen in the console or Proxmox via agent

🔗 Related PR / Issue

Link: #

✅ Prerequisites (X in brackets)

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

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • [ x] 🆕 New script – A fully functional and tested script or script set.
  • [ x] 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🔍 Code & Security Review (X in brackets)

  • [ x] Follows Code_Audit.md & CONTRIBUTING.md guidelines
  • [ x] Uses correct script structure (AppName.sh, AppName-install.sh, AppName.json)
  • [ x] No hardcoded credentials

📋 Additional Information (optional)

  • I edited the code as far as I can, external feedback would be appreciated.
  • The script has to be tested with Proxmox 8, I tested it on the latest version 9.
  • The script has to be tested when New versions of ISOs come out to see if the code fetches them fine. (it should if truenas staff keep the naming conventions)

📦 Application Requirements (for new scripts)

Required for 🆕 New script submissions.
PRs that do not meet these requirements may be closed without review.

  • [ x] The application is at least 6 months old
  • [ x] The application is actively maintained
  • [ x] The application has 600+ GitHub stars
  • [ x] Official release tarballs are published

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 16, 2026

Greptile Summary

This PR adds a TrueNAS Community Edition VM installation script with automatic ISO fetching and optional disk import functionality. The implementation is well-structured with proper error handling and user interaction flows.

Key Changes:

  • Added vm/truenas-vm.sh with ISO lookup, VM creation, and disk import features
  • Added frontend/public/json/truenas-vm.json with proper metadata and helpful notes
  • Script includes both default and advanced configuration options
  • Implements ISO caching to avoid redundant downloads

Issues Found:

  • Missing Source: field in script header (required by coding standards)
  • Incorrect repository URL reference (ProxmoxVED should be ProxmoxVE)
  • Multiple inline comments violate the no-comments rule for shell scripts
  • All issues are non-critical style/formatting fixes

Confidence Score: 4/5

  • This PR is safe to merge after addressing the minor style and formatting issues.
  • The script is functionally sound with proper error handling, user interaction, and follows most coding standards. The identified issues are all non-critical style violations (missing header field, incorrect URL, and inline comments) that don't affect functionality. The JSON configuration is fully compliant. Score of 4 reflects that these style issues should be addressed before merge, but they don't pose any risk to functionality or security.
  • Focus on vm/truenas-vm.sh to fix the header and remove inline comments per project standards.

Important Files Changed

Filename Overview
vm/truenas-vm.sh VM creation script with extensive comments (violates rule 2fcf5e5e), incorrect URL reference in source line, and missing Source field in header
frontend/public/json/truenas-vm.json JSON schema compliant with all required fields present and properly formatted

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 7 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +76 to +78
# Scrapes the TrueNAS download portal for ISO paths from the current and previous year,
# filtering out nightlies/alphas and returning the latest stable releases for each major
# version along with any beta or RC pre-releases.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Remove comments from shell script body. Comments only allowed in file headers.

Suggested change
# Scrapes the TrueNAS download portal for ISO paths from the current and previous year,
# filtering out nightlies/alphas and returning the latest stable releases for each major
# version along with any beta or RC pre-releases.
function truenas_iso_lookup() {

Context Used: Rule from dashboard - What: Shell script files in ct/ and /install directories must not contain comments except for file h... (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +187 to +188
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 – 9.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Remove comments from shell script body.

Suggested change
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 – 9.1
pve_check() {

Context Used: Rule from dashboard - What: Shell script files in ct/ and /install directories must not contain comments except for file h... (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

fi
done

# Fetching iso list from TrueNAS downloads for whiptail radiolist
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Remove comment.

Suggested change
# Fetching iso list from TrueNAS downloads for whiptail radiolist
ISOARRAY=()

Context Used: Rule from dashboard - What: Shell script files in ct/ and /install directories must not contain comments except for file h... (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +506 to +507
if [ -z "${SELECTED_ISO:-}" ]; then
# Fallback: Find the latest stable release only (excluding RC/BETA for safety)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Remove comment.

Suggested change
if [ -z "${SELECTED_ISO:-}" ]; then
# Fallback: Find the latest stable release only (excluding RC/BETA for safety)
if [ -z "${SELECTED_ISO:-}" ]; then

Context Used: Rule from dashboard - What: Shell script files in ct/ and /install directories must not contain comments except for file h... (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

-scsihw virtio-scsi-single -cdrom local:iso/$ISO_NAME -vga virtio >/dev/null
msg_ok "Created VM shell"

# Optional step to import onboard disks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Remove comment.

Suggested change
# Optional step to import onboard disks
if [ "$IMPORT_DISKS" == "yes" ]; then

Context Used: Rule from dashboard - What: Shell script files in ct/ and /install directories must not contain comments except for file h... (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@juronja
Copy link
Contributor Author

juronja commented Jan 16, 2026

I intentionally added the inline comments for reviewing purposes. I can gladly remove them.

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.

1 participant