Scaffold Cloudron packaging workspace and automation

This commit is contained in:
2025-10-02 12:07:09 -05:00
parent b4121cc932
commit 482d4ff1b8
414 changed files with 6837 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
{
"manifestVersion": 2,
"id": "com.knel.slurm",
"title": "Slurm",
"author": "Known Element Packaging Team",
"tagline": "TODO: Short one-line pitch",
"description": "TODO: Comprehensive description for the Cloudron App Store entry.",
"changelog": "Initial scaffold",
"website": "https://github.com/SchedMD/slurm",
"supportUrl": "https://projects.knownelement.com/issues/222",
"sourceUrl": "https://github.com/SchedMD/slurm.git",
"version": "0.1.0",
"tags": ["custom", "known-element"],
"healthCheckPath": "/",
"memoryLimit": 536870912,
"httpPort": 3000,
"addons": {
"localstorage": {}
}
}

22
apps/slurm/Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
# syntax=docker/dockerfile:1
FROM cloudron/base:5.0.0
LABEL org.opencontainers.image.source="https://github.com/SchedMD/slurm.git"
LABEL org.opencontainers.image.description="Cloudron package for Slurm"
ARG APP_VERSION
ENV APP_VERSION=${APP_VERSION:-latest}
# Copy application source into image at build time
# Replace this with a multi-stage build if upstream provides Docker images.
COPY ./app /app/code
# Copy start script and make it executable
COPY ./start.sh /app/pkg/start.sh
RUN chmod +x /app/pkg/start.sh
# Cloudron expects all processes to run as cloudron user
USER cloudron
WORKDIR /app/code
CMD ["/app/pkg/start.sh"]

20
apps/slurm/README.md Normal file
View File

@@ -0,0 +1,20 @@
# Slurm on Cloudron
- **Upstream repository**: https://github.com/SchedMD/slurm.git
- **Implementation issue**: https://projects.knownelement.com/issues/222
- **Status**: Draft scaffolding generated on $(date -u +"%Y-%m-%dT%H:%M:%SZ")
## Packaging Checklist
1. Review upstream deployment requirements and map them to Cloudron services (database, cache, object storage, workers).
2. Update `Dockerfile` with the correct build steps and runtime dependencies.
3. Implement `start.sh` to configure the app from Cloudron-provided environment variables and launch the primary process.
4. Edit `CloudronManifest.json` with accurate metadata, permissions, ports, addons, and health checks.
5. Add integration and smoke tests under `test/` to validate the package.
6. Document manual configuration steps, migration requirements, and known gaps in this README.
## Notes
- Replace the placeholder long-running process in `start.sh`.
- Populate the `app/` directory with the application build artefacts or git submodules.
- Use the shared packaging container (`docker/packager`) to run `cloudron build` and `cloudron install` so the host remains clean.

0
apps/slurm/app/.gitkeep Normal file
View File

11
apps/slurm/metadata.json Normal file
View File

@@ -0,0 +1,11 @@
{
"slug": "slurm",
"title": "Slurm",
"issue": "https://projects.knownelement.com/issues/222",
"repo": "https://github.com/SchedMD/slurm.git",
"additionalRepos": [
"https://github.com/giovtorres/slurm-docker-cluster.git"
],
"created": "2025-10-02T16:46:49Z",
"notes": "TODO: capture packaging notes"
}

8
apps/slurm/start.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
set -euo pipefail
# Cloudron injects configuration via environment variables and files under /run
# Use this script to render config files and launch the upstream service.
# TODO: Replace the command below with the correct process supervisor.
exec /bin/sh -c "echo 'Replace start.sh with application startup logic for Slurm' && sleep infinity"

16
apps/slurm/test/smoke.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
set -euo pipefail
# Basic container reachability check executed inside the packaging container.
# Replace curl target with an endpoint exposed by the app once the package is functional.
cloudron_app_url=${CLOUDRON_APP_ORIGIN:-"http://localhost"}
http_code=$(curl -s -o /tmp/smoke.log -w "%{http_code}" "${cloudron_app_url}")
if [[ "${http_code}" != "200" ]]; then
echo "Unexpected HTTP status: ${http_code}" >&2
cat /tmp/smoke.log >&2
exit 1
fi
echo "Smoke test passed"