We welcome contributions from the community! This project follows standard Apache project guidelines.
- How to Contribute
- Code Standards
- Pull Request Guidelines
- Development Workflow
- Testing
- Reporting Issues
- Code of Conduct
# Fork via GitHub UI, then clone your fork
git clone https://github.com/YOUR-USERNAME/hyperi-developer
cd hyperi-developer
git remote add upstream https://github.com/hyperi-io/hyperi-developergit checkout -b feature/your-feature-name
# Or for bug fixes
git checkout -b fix/issue-description- Follow the KISS principle (Keep It Simple, Stupid)
- Match the existing code style and conventions in the file you are editing
- Ansible tasks must be idempotent - run twice and the second run is all green
- Run the playbook as a regular user with per-command sudo
- Update documentation as needed
This project is Ansible-first. From ansible/:
# Lint + syntax (required)
ansible-lint
ansible-playbook --syntax-check playbooks/main.yml -i inventories/localhost/inventory.yml
# Shell scripts (required if you touched any)
shellcheck ../install.sh
# Portability (required if you touched any) - macbash flags GNU/Linux-only
# constructs that break on macOS. Install it with
# `cargo install --git https://github.com/hyperi-io/macbash --locked`.
macbash ../install.sh
# Syntax under BOTH bashes: a stock mac is still bash 3.2, so a bash 4+ construct
# that passes locally on brew's bash 5 will fail on someone else's machine.
/bin/bash -n ../install.sh # macOS system bash 3.2
/opt/homebrew/bin/bash -n ../install.sh # current bash 5.x
# Container matrix - clean install on Ubuntu + Fedora, current and n-1 (no hosts needed)
molecule test -s matrixUse conventional commit format:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changeschore:- Maintenance tasksrefactor:- Code refactoringtest:- Test additions or fixes
git add .
git commit -m "feat: add support for Ubuntu 22.04"Important:
- Write clear, concise commit messages
- No tool attribution in commit messages
- Reference issue numbers:
fix: resolve #123
git push origin feature/your-feature-nameThen create a PR via GitHub UI targeting the main branch.
- Shebang:
#!/bin/bash, withset -euo pipefailat the top - Portability: the bootstrap
install.shmust run on macOS's Bash 3.2 (it runs before any newer bash is installed) - no Bash 4+ features there - Error Handling: check command results and clean up temp files on exit (trap)
- Execution: run as a regular user, use sudo only when needed
- Idempotency: safe to run multiple times
- Output helpers: each script defines its own
print_info/print_error/print_warning/print_success(seeinstall.sh) - there is no sharedlib.sh - shellcheck clean: silence a genuine false positive with a scoped
# shellcheck disable=plus a reason, never blanket-disable - macbash clean, where macOS can actually run it: a script that is
guaranteed Linux-only does NOT need BSD compatibility, and macbash findings
against it are expected rather than defects.
hyperi-update-linux.shandhyperi-update-macos.share split precisely so each can use its own platform's idiom -sha256sumand${var,,}are CORRECT in the Linux one and must not be rewritten toshasum -a 256, which is not what Linux ships. Read every macbash finding against the file's target platform before acting. Note the macOS updater is zsh, which shellcheck refuses outright (SC1071); macbash still checks it
# Good - uses the script's print helpers
print_info "Installing package..."
sudo dnf install -y package-name
# Bad - direct echo
echo "Installing package..."# Good - use pushd/popd
pushd /tmp >/dev/null || exit 1
# do work
popd >/dev/null || exit 1
# Bad - use cd
cd /tmp
# do work
cd -Always detect latest versions dynamically, never hardcode:
# Good - dynamic detection
CONFLUENT_VERSION=$(curl -sL https://packages.confluent.io/rpm/ 2>/dev/null | grep -oE '[0-9]+\.[0-9]+' | sort -V | tail -1)
if [ -z "$CONFLUENT_VERSION" ]; then
print_warning "Could not detect latest version, using fallback"
CONFLUENT_VERSION="8.1"
fi
# Bad - hardcoded version
CONFLUENT_VERSION="7.7"- All Output: ASCII only - no emojis or special Unicode characters
- Console Output: Plain text with standard symbols only
- Log Files: Plain ASCII only
- Code Comments: ASCII only
- Commit Messages: ASCII only
All scripts must have a standardized header:
#!/bin/bash
# ============================================================================
# script-name - Brief Description
# ============================================================================
# Longer description of what the script does
#
# USAGE:
# ./script-name.sh [options]
#
# INSTALLS/OPTIMIZES:
# - Item 1
# - Item 2
#
# NOTE: Important context or prerequisites
#
# LICENSE:
# Licensed under the Apache License, Version 2.0
# See ../LICENSE file for full license text
# ============================================================================- ansible-lint +
--syntax-checkclean, shellcheck clean on any shell touched - macbash clean on any shell that macOS runs, and
bash -nunder both 3.2 and 5.x - molecule matrix passes for playbook changes
- Code follows project style guidelines
- Documentation updated (README.md)
- CHANGELOG.md updated if applicable
- Commit messages follow conventional format
- No merge conflicts with main branch
Include:
- Summary: What does this PR do?
- Motivation: Why is this change needed?
- Testing: How was it tested?
- Screenshots: If UI changes
- Breaking Changes: Clearly marked if any
- Keep PRs focused and reasonably sized
- Split large changes into multiple PRs
- One feature or fix per PR
- Maintainers will review within 48 hours
- Address review feedback promptly
- Keep PR updated with main branch
- Be respectful in discussions
# Clone and setup
git clone https://github.com/YOUR-USERNAME/hyperi-developer
cd hyperi-developer
# Keep your fork synced
git remote add upstream https://github.com/hyperi-io/hyperi-developer
git fetch upstream
git rebase upstream/main- Check existing issues before starting work
- Create an issue for discussion if needed
- Create a feature branch
- Make changes incrementally
- Test frequently
- Commit with clear messages
- Put the task in the right role: generic dev tooling in
developer(or adeveloper-<lang>/developer-guisibling), IaC/cloud ininfrastructure, HyperI-only policy insoe/soe-gui, the CI toolchain incontributor. - Tag it so it can be selected on its own (
./install.sh --list-appslists every tag). - Make it idempotent, and guard by platform with
when: ansible_facts['distribution'] == .... - If you DROP a tool, add a tombstone in
developer/tasks/removals.ymlin the same change - Ansible cannot prune what you stop declaring. - For an optional upstream download, wrap it in
block:/rescue:that records intodeploy_warnings, so one dead upstream does not abort the whole run (seedocs/resilient-deploy.md).
The test suite needs no HyperI infrastructure. Run everything from ansible/.
-
Lint + syntax
ansible-lint ansible-playbook --syntax-check playbooks/main.yml -i inventories/localhost/inventory.yml
-
shellcheck on any shell script you changed
shellcheck ../install.sh
-
Container matrix - a clean install on Ubuntu + Fedora, current and n-1, in Docker (no VMs, no cloud):
molecule test -s matrixOther scenarios:
existing-host(convergence on a long-lived box) andremediation(an old host converges to current).
- The self-updater, across the same container matrix:
tests/update/test-hyperi-update.sh
- A real VM:
tests/proxmox/resets Fedora/Ubuntu VMs from a snapshot and runs the playbook. Every host and secret is read from.envvialookup('env', ...)- copytests/.env.sampletotests/.envand fill it in. Nothing internal is ever committed.
Run the playbook straight on a throwaway machine or VM:
./install.sh --check # dry run first
./install.sh # the default lightweight basemacOS is tested by running ./install.sh on the Mac itself.
Use GitHub Issues and include:
- Fedora Version: Output of
cat /etc/fedora-release - Script: Which script(s) failed
- Error Output: Full error messages and logs
- Steps to Reproduce: Clear reproduction steps
- Expected Behavior: What should have happened
- Actual Behavior: What actually happened
Include:
- Use Case: Why is this feature needed?
- Proposed Solution: How should it work?
- Alternatives: Other approaches considered
- Additional Context: Relevant information
- Check existing issues before creating new ones
- Comment on existing issues if you have the same problem
- Use issue templates when available
- Be respectful and professional
- Focus on technical merit
- Welcome newcomers and help them learn
- Provide constructive feedback
- Accept constructive criticism gracefully
- Harassment or discriminatory language
- Personal attacks or trolling
- Publishing others' private information
- Other conduct inappropriate in a professional setting
Violations will result in:
- Warning from maintainers
- Temporary ban from project
- Permanent ban for repeated violations
Report issues to project maintainers via GitHub Issues.
./install.sh --list-apps- the full role and tag list- README.md - Project overview and quick start
- CHANGELOG.md - Version history
- LICENSE - Apache License 2.0 text
- Open a GitHub Issue for questions
- Run
./install.sh --list-appsfor the role and tag list - Review existing PRs for examples
Thank you for contributing to Hyperi Developer Environment!