diff --git a/CLOUDRON_PACKAGING_SHORTLIST.md b/CLOUDRON_PACKAGING_SHORTLIST.md new file mode 100644 index 0000000..e17c069 --- /dev/null +++ b/CLOUDRON_PACKAGING_SHORTLIST.md @@ -0,0 +1,113 @@ +# Cloudron Packaging Shortlist + +**Target**: Package 56 free/libre/open-source applications as Cloudron apps + +## Packaging Priority Order + +### Phase 1: Infrastructure & DevOps Tools (High Priority) +1. **Jenkins** - CI/CD Platform (Issue #234) +2. **Apache APISIX** - API Gateway (Issue #179) +3. **Rundeck** - Job Scheduler (Issue #217) +4. **Healthchecks** - Health Monitoring (Issue #192) +5. **Fleet** - Device Management (Issue #195) +6. **NetBox** - Network Documentation (Issue #201) +7. **SigNoz** - Observability Platform (Issue #221) + +### Phase 2: Development & Productivity (High Priority) +8. **Grist** - Database/Spreadsheet (Issue #191) +9. **ReviewBoard** - Code Review (Issue #216) +10. **Huginn** - Web Automation (Issue #194) +11. **Windmill** - Workflow Automation (Issue #285) +12. **DocAssemble** - Document Assembly (Issue #277) +13. **WireFlow** - Flowchart Designer (Issue #50) +14. **Draw.io** - Diagram Editor (Issue #272) + +### Phase 3: Business & Management (Medium Priority) +15. **InvenTree** - Inventory Management (Issue #173) +16. **OpenBoxes** - Supply Chain Management (Issue #205) +17. **Payroll Engine** - Payroll Management (Issue #208) +18. **Consul Democracy** - Democratic Platform (Issue #189) +19. **Fonoster** - Communications Platform (Issue #227) +20. **Craig** - Chat Platform (Issue #185) +21. **KillBill** - Billing Platform (Issue #181) + +### Phase 4: Specialized Applications (Medium Priority) +22. **ELabFTW** - Laboratory Management (Issue #188) +23. **Jamovi** - Statistical Analysis (Issue #196) +24. **KiBot** - PCB Documentation (Issue #197) +25. **Resgrid** - Emergency Management (Issue #214) +26. **SatNOGS** - Satellite Network (Issue #218) +27. **SDR Angel** - Software Defined Radio (Issue #219) +28. **Warp** - Terminal (Issue #228) + +### Phase 5: Advanced Tools (Lower Priority) +29. **GoAlert** - On-call Management (Issue #204) +30. **Hyperswitch** - Payment Processing (Issue #209) +31. **OpenFile** - Tax Filing (Issue #316) +32. **SniperPhish** - Security Training (Issue #211) +33. **DataHub** - Data Catalog (Issue #309) +34. **Easy Gate** - Access Control (Issue #54) +35. **Rathole** - Reverse Proxy (Issue #225) ✅ **COMPLETED** + +### Phase 6: Infrastructure & Advanced (Lower Priority) +36. **SLURM** - Job Scheduler (Issue #222) +37. **TAK Server** - Military Communications (Issue #180) +38. **Midday** - AI Assistant (Issue #178) +39. **ChirpStack** - LoRaWAN (Issue #184) +40. **Mirlo** - Music Streaming (TBD) +41. **Nautilus Trader** - Trading Platform (Issue #226) +42. **RunMe** - Code Execution (Issue #322) + +### Phase 7: Development & Research (Lower Priority) +43. **Seatunnel** - Data Processing (Issue #301) +44. **Docker Webhook** - Webhook Handler (Issue #271) +45. **Database Gateway** - Database Proxy (Issue #273) +46. **OpenBlocks** - Low-code Platform (Issue #274) +47. **WireViz** - Cable Documentation (Issue #276) +48. **AutoBOM** - Bill of Materials (Issue #278) +49. **PLMore** - Project Management (Issue #279) + +### Phase 8: Specialized & Research (Lowest Priority) +50. **Manyfold** - 3D Modeling (Issue #282) +51. **Langfuse** - LLM Operations (Issue #283) +52. **Puter** - Cloud Desktop (Issue #286) +53. **SWUpdate** - Software Updates (Issue #326) +54. **Mender** - Device Management (Issue #300) +55. **Vanila Wireflow** - Flowchart (Issue #50) + +## Packaging Strategy + +### Container-Only Workflow +- All packaging work happens inside `KNELCloudron-packaging` container +- Use `scripts/packaging-exec.sh` for all build/test commands +- Follow validation checklist before committing + +### Validation Requirements +- ✅ Build succeeds: `docker build -t :dev CloudronPackages/` +- ✅ Health check passes: container starts and responds to health endpoint +- ✅ Manifest validation: correct `id`, `version`, `httpPort`, `healthCheckPath` +- ✅ No secrets/credentials in code +- ✅ Proper `/app/data` ownership + +### Commit Strategy +- Small, focused commits per application +- Use conventional commit format: `feat(): initial Cloudron package` +- Batch pushes at natural milestones (5-10 apps per push) +- Never push unvalidated builds + +## Estimated Timeline +- **Phase 1-2**: 2-3 weeks (14 apps) +- **Phase 3-4**: 3-4 weeks (14 apps) +- **Phase 5-6**: 2-3 weeks (14 apps) +- **Phase 7-8**: 2-3 weeks (14 apps) +- **Total**: ~10-13 weeks for all 56 applications + +## Notes +- Rathole is already completed and serves as reference implementation +- Each app will be packaged using `scripts/new-package.sh` scaffold +- Upstream sources available in `PackagingForCloudronWorkspace/Docker/` +- All work follows single-branch `main` workflow + +--- +**Created**: 2025-01-04 +**Maintainers**: KNEL/TSYS Development Team diff --git a/CloudronPackages/Jenkins/.dockerignore b/CloudronPackages/Jenkins/.dockerignore new file mode 100644 index 0000000..090ba8b --- /dev/null +++ b/CloudronPackages/Jenkins/.dockerignore @@ -0,0 +1,11 @@ +# Ignore typical build context clutter +.git +.gitignore +node_modules +npm-debug.log +*.log +dist +build +Dockerfile.* +.DS_Store + diff --git a/CloudronPackages/Jenkins/CloudronManifest.json b/CloudronPackages/Jenkins/CloudronManifest.json new file mode 100644 index 0000000..f4153d3 --- /dev/null +++ b/CloudronPackages/Jenkins/CloudronManifest.json @@ -0,0 +1,19 @@ +{ + "manifestVersion": 2, + "id": "io.knel.jenkins", + "title": "Jenkins CI/CD", + "author": "KNEL", + "description": "Jenkins CI/CD Platform for automated builds, testing, and deployment", + "website": "https://jenkins.io", + "contactEmail": "admin@knownelement.com", + "version": "2.450.0", + "changelog": "Initial Cloudron package for Jenkins CI/CD Platform", + "healthCheckPath": "/login", + "httpPort": 8080, + "addons": { + "localstorage": {} + }, + "tags": ["ci", "cd", "automation", "build", "deployment"], + "icon": "logo.png" +} + diff --git a/CloudronPackages/Jenkins/Dockerfile b/CloudronPackages/Jenkins/Dockerfile new file mode 100644 index 0000000..8cc528a --- /dev/null +++ b/CloudronPackages/Jenkins/Dockerfile @@ -0,0 +1,50 @@ +FROM cloudron/base:5.0.0 + +# Metadata labels +LABEL org.opencontainers.image.title="Jenkins CI/CD" +LABEL org.opencontainers.image.description="Cloudron package for Jenkins CI/CD Platform" +LABEL org.opencontainers.image.source="https://github.com/jenkinsci/jenkins" + +# Install Java and Jenkins dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + openjdk-17-jdk \ + curl \ + ca-certificates \ + git \ + && rm -rf /var/lib/apt/lists/* + +# Set Java environment +ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 +ENV PATH=$JAVA_HOME/bin:$PATH + +# Create Jenkins directories +RUN mkdir -p /app/data/jenkins_home && \ + mkdir -p /app/data/plugins && \ + mkdir -p /app/pkg && \ + chown -R cloudron:cloudron /app/data + +# Download and install Jenkins WAR file +ARG JENKINS_VERSION=2.450 +RUN cd /tmp && \ + curl -fsSL "https://get.jenkins.io/war/${JENKINS_VERSION}/jenkins.war" -o jenkins.war && \ + mv jenkins.war /app/pkg/jenkins.war && \ + chown cloudron:cloudron /app/pkg/jenkins.war + +# Copy startup script +COPY start.sh /app/pkg/start.sh +RUN chmod +x /app/pkg/start.sh && chown cloudron:cloudron /app/pkg/start.sh + +USER cloudron + +# Expose Jenkins port +EXPOSE 8080 + +# Jenkins environment variables +ENV JENKINS_HOME=/app/data/jenkins_home \ + JENKINS_OPTS="--httpPort=8080 --httpListenAddress=0.0.0.0" \ + APP_PORT=8080 + +HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ + CMD curl -fsS http://127.0.0.1:${APP_PORT}/login || exit 1 + +CMD ["/app/pkg/start.sh"] diff --git a/CloudronPackages/Jenkins/README.md b/CloudronPackages/Jenkins/README.md new file mode 100644 index 0000000..3ce754f --- /dev/null +++ b/CloudronPackages/Jenkins/README.md @@ -0,0 +1,33 @@ +# Package Template for Cloudron Apps + +This is a minimal template to package an application for Cloudron. + +## Docker Artifact Naming Convention + +All KNEL Cloudron packages follow the `KNELCloudron-` prefix convention: +- **Development Images**: `:dev` (built locally for testing) +- **Production Images**: `:latest` (final packaged versions) +- **Container Names**: Use descriptive names like `-dev` for development containers + +## Template Usage + +Replace placeholders in files with your app specifics: +- `io.knel.jenkins` (e.g., com.example.myapp) +- `Jenkins CI/CD` (human name) +- `8080` (default internal app port) +- `5.0.0` (Cloudron base image tag, e.g., 5.0.0) + +Files +- `CloudronManifest.json` – base manifest +- `Dockerfile` – uses cloudron/base, non-root user, healthcheck +- `start.sh` – startup script with addon detection examples +- `nginx.conf` (optional) – example reverse proxy +- `supervisord.conf` (optional) – process manager example +- `config.yaml` (optional) – sample app config +- `logo.png` – add your 512x512 PNG icon here (not provided in template) + +Usage +1. Create a new package from this template using `scripts/new-package.sh`: + `scripts/new-package.sh MyApp --id com.example.myapp --title "My App" --port 3000` +2. Adjust Dockerfile and start.sh to run your app. +3. Build and test locally; then commit and push. diff --git a/CloudronPackages/Jenkins/config.yaml b/CloudronPackages/Jenkins/config.yaml new file mode 100644 index 0000000..d1ee6cf --- /dev/null +++ b/CloudronPackages/Jenkins/config.yaml @@ -0,0 +1,11 @@ +# Example configuration template for Jenkins CI/CD +server: + port: 8080 + +data: + dir: /app/data + +database: + # url: ${CLOUDRON_POSTGRESQL_URL} + # redis: ${CLOUDRON_REDIS_URL} + diff --git a/CloudronPackages/Jenkins/nginx.conf b/CloudronPackages/Jenkins/nginx.conf new file mode 100644 index 0000000..6bfb21a --- /dev/null +++ b/CloudronPackages/Jenkins/nginx.conf @@ -0,0 +1,26 @@ +user cloudron; +worker_processes auto; + +error_log /var/log/nginx/error.log warn; +pid /run/nginx.pid; + +events { worker_connections 1024; } + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + access_log /var/log/nginx/access.log main; + sendfile on; + + server { + listen 8080; + server_name _; + + location / { + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://127.0.0.1:8080; + } + } +} + diff --git a/CloudronPackages/Jenkins/start.sh b/CloudronPackages/Jenkins/start.sh new file mode 100644 index 0000000..5636f6b --- /dev/null +++ b/CloudronPackages/Jenkins/start.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash +set -euo pipefail + +log() { echo "[start] $(date -Is) $*"; } +abort() { echo "[start] ERROR: $*" >&2; exit 1; } + +# Defaults +: "${APP_PORT:=8080}" +: "${JENKINS_HOME:=/app/data/jenkins_home}" + +log "Starting Jenkins CI/CD on port ${APP_PORT}" + +# Ensure Jenkins home directory exists and is writable +mkdir -p "${JENKINS_HOME}" +chown -R cloudron:cloudron /app/data || true + +# Set Jenkins environment variables +export JENKINS_HOME="${JENKINS_HOME}" +export JENKINS_OPTS="--httpPort=${APP_PORT} --httpListenAddress=0.0.0.0" + +# Configure Jenkins for Cloudron +log "Configuring Jenkins for Cloudron environment" + +# Create basic Jenkins configuration if not exists +if [[ ! -f "${JENKINS_HOME}/config.xml" ]]; then + log "Creating initial Jenkins configuration" + mkdir -p "${JENKINS_HOME}" + + # Create basic config.xml for Jenkins + cat > "${JENKINS_HOME}/config.xml" <<'XML' + + + 2.450 + 2 + NORMAL + true + + + true + + false + + ${JENKINS_HOME}/workspace/${ITEM_FULLNAME} + ${JENKINS_HOME}/builds/${ITEM_FULLNAME} + + + + + + + + + + + all + false + false + + + + all + 50000 + + JNLP-connect + JNLP2-connect + + + + + +XML +fi + +# Start Jenkins +log "Starting Jenkins WAR file" +exec java -jar /app/pkg/jenkins.war ${JENKINS_OPTS} + diff --git a/CloudronPackages/Jenkins/supervisord.conf b/CloudronPackages/Jenkins/supervisord.conf new file mode 100644 index 0000000..e73a12a --- /dev/null +++ b/CloudronPackages/Jenkins/supervisord.conf @@ -0,0 +1,12 @@ +[supervisord] +logfile=/var/log/supervisor/supervisord.log +pidfile=/run/supervisord.pid +nodaemon=true + +[program:app] +command=/app/pkg/start.sh +autorestart=true +stdout_logfile=/var/log/supervisor/app.stdout.log +stderr_logfile=/var/log/supervisor/app.stderr.log +user=cloudron +