feat(jenkins): add Jenkins CI/CD Platform Cloudron package
- Complete Jenkins package with Java 17 and WAR file download - Proper CloudronManifest.json with correct metadata - Custom start.sh script with Jenkins configuration - Health check endpoint configured for /login - Follows KNELCloudron- naming convention - Added comprehensive packaging shortlist with 56 applications prioritized by phase
This commit is contained in:
113
CLOUDRON_PACKAGING_SHORTLIST.md
Normal file
113
CLOUDRON_PACKAGING_SHORTLIST.md
Normal file
@@ -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 <app>:dev CloudronPackages/<AppName>`
|
||||
- ✅ 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(<app>): 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
|
11
CloudronPackages/Jenkins/.dockerignore
Normal file
11
CloudronPackages/Jenkins/.dockerignore
Normal file
@@ -0,0 +1,11 @@
|
||||
# Ignore typical build context clutter
|
||||
.git
|
||||
.gitignore
|
||||
node_modules
|
||||
npm-debug.log
|
||||
*.log
|
||||
dist
|
||||
build
|
||||
Dockerfile.*
|
||||
.DS_Store
|
||||
|
19
CloudronPackages/Jenkins/CloudronManifest.json
Normal file
19
CloudronPackages/Jenkins/CloudronManifest.json
Normal file
@@ -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"
|
||||
}
|
||||
|
50
CloudronPackages/Jenkins/Dockerfile
Normal file
50
CloudronPackages/Jenkins/Dockerfile
Normal file
@@ -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"]
|
33
CloudronPackages/Jenkins/README.md
Normal file
33
CloudronPackages/Jenkins/README.md
Normal file
@@ -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**: `<appname>:dev` (built locally for testing)
|
||||
- **Production Images**: `<appname>:latest` (final packaged versions)
|
||||
- **Container Names**: Use descriptive names like `<appname>-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.
|
11
CloudronPackages/Jenkins/config.yaml
Normal file
11
CloudronPackages/Jenkins/config.yaml
Normal file
@@ -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}
|
||||
|
26
CloudronPackages/Jenkins/nginx.conf
Normal file
26
CloudronPackages/Jenkins/nginx.conf
Normal file
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
77
CloudronPackages/Jenkins/start.sh
Normal file
77
CloudronPackages/Jenkins/start.sh
Normal file
@@ -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'
|
||||
<?xml version='1.1' encoding='UTF-8'?>
|
||||
<hudson>
|
||||
<version>2.450</version>
|
||||
<numExecutors>2</numExecutors>
|
||||
<mode>NORMAL</mode>
|
||||
<useSecurity>true</useSecurity>
|
||||
<authorizationStrategy class="hudson.security.FullControlOnceLoggedInAuthorizationStrategy"/>
|
||||
<securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
|
||||
<disableSignup>true</disableSignup>
|
||||
</securityRealm>
|
||||
<disableRememberMe>false</disableRememberMe>
|
||||
<projectNamingStrategy class="jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"/>
|
||||
<workspaceDir>${JENKINS_HOME}/workspace/${ITEM_FULLNAME}</workspaceDir>
|
||||
<buildsDir>${JENKINS_HOME}/builds/${ITEM_FULLNAME}</buildsDir>
|
||||
<markupFormatter class="hudson.markup.RawHtmlMarkupFormatter" plugin="antisamy-markup-formatter@3.1"/>
|
||||
<jdks/>
|
||||
<viewsTabBar class="hudson.views.DefaultViewsTabBar"/>
|
||||
<myViewsTabBar class="hudson.views.DefaultMyViewsTabBar"/>
|
||||
<clouds/>
|
||||
<slaves/>
|
||||
<scm class="hudson.scm.NullSCM"/>
|
||||
<views>
|
||||
<hudson.model.AllView>
|
||||
<owner class="hudson" reference="../../.."/>
|
||||
<name>all</name>
|
||||
<filterExecutors>false</filterExecutors>
|
||||
<filterQueue>false</filterQueue>
|
||||
<properties class="hudson.model.View$PropertyList"/>
|
||||
</hudson.model.AllView>
|
||||
</views>
|
||||
<primaryView>all</primaryView>
|
||||
<slaveAgentPort>50000</slaveAgentPort>
|
||||
<disabledAgentProtocols>
|
||||
<string>JNLP-connect</string>
|
||||
<string>JNLP2-connect</string>
|
||||
</disabledAgentProtocols>
|
||||
<label></label>
|
||||
<nodeProperties/>
|
||||
<globalNodeProperties/>
|
||||
</hudson>
|
||||
XML
|
||||
fi
|
||||
|
||||
# Start Jenkins
|
||||
log "Starting Jenkins WAR file"
|
||||
exec java -jar /app/pkg/jenkins.war ${JENKINS_OPTS}
|
||||
|
12
CloudronPackages/Jenkins/supervisord.conf
Normal file
12
CloudronPackages/Jenkins/supervisord.conf
Normal file
@@ -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
|
||||
|
Reference in New Issue
Block a user