From 4817710a102a340b9ca2c04b05e0425d1ac9cb4e Mon Sep 17 00:00:00 2001 From: Charles N Wyble Date: Mon, 21 Apr 2025 15:41:17 -0400 Subject: [PATCH] . --- .../CloudronManifest.json | 0 .../elabftw.knownelement.com/Dockerfile | 0 .../elabftw-BuildNotes.md | 0 .../elabftw.knownelement.com/nginx.conf | 0 .../elabftw.knownelement.com/start.sh | 0 .../elabftw.knownelement.com/supervisord.conf | 0 .../CloudronManifest.json | 0 .../homebox.knownelement.com/Dockerfile | 0 .../homebox.knownelement.com/nginx.conf | 0 .../homebox.knownelement.com/start.sh | 0 .../CloudronManifest.json | 0 .../homechart.knownelement.com/Dockerfile | 0 .../HomeChart-BuildNotes.md | 0 .../homechart.knownelement.com/nginx.conf | 0 .../homechart.knownelement.com/start.sh | 0 .../supervisord.conf | 0 .../CloudronManifest.json | 0 .../inventree.knownelement.com/Dockerfile | 0 .../InventreeBuildNotes.txt | 0 .../inventree.knownelement.com/config.yaml | 0 .../inventree.knownelement.com/nginx.conf | 0 .../inventree.knownelement.com/start.sh | 0 .../supervisord.conf | 0 .../CloudronManifest.json | 40 ++++++++ Cloudron/jenkins.knownelement.com/Dockerfile | 49 ++++++++++ .../JenkinsBulldNotes.md | 97 +++++++++++++++++++ .../casc_templates/default.yaml | 0 .../casc_templates/ldap.yaml | 0 .../casc_templates/oauth.yaml | 0 Cloudron/jenkins.knownelement.com/nginx.conf | 55 +++++++++++ Cloudron/jenkins.knownelement.com/start.sh | 50 ++++++++++ .../jenkins.knownelement.com/supervisor.conf | 18 ++++ .../CloudronManifest.json | 0 .../reviewboard.knownelement.com/Dockerfile | 0 .../ReviewBoard-BuildNotes.md | 0 .../reviewboard.knownelement.com/nginx.conf | 0 .../reviewboard.knownelement.com/start.sh | 0 .../supervisord.conf | 0 .../CloudronManifest.json | 0 .../rundeck.knownelement.com/Dockerfile | 0 .../Rundeck-BuildNotes.md | 0 .../framework.properties | 0 .../rundeck.knownelement.com/jaas-ldap.conf | 0 .../rundeck.knownelement.com/jaas-oidc.conf | 0 .../rundeck.knownelement.com/nginx.conf | 0 .../rundeck.knownelement.com/realm.properties | 0 .../rundeck-config.properties | 0 .../rundeck.knownelement.com/start.sh | 0 .../rundeck.knownelement.com/supervisord.conf | 0 49 files changed, 309 insertions(+) rename {Techops => Cloudron}/elabftw.knownelement.com/CloudronManifest.json (100%) rename {Techops => Cloudron}/elabftw.knownelement.com/Dockerfile (100%) rename {Techops => Cloudron}/elabftw.knownelement.com/elabftw-BuildNotes.md (100%) rename {Techops => Cloudron}/elabftw.knownelement.com/nginx.conf (100%) rename {Techops => Cloudron}/elabftw.knownelement.com/start.sh (100%) rename {Techops => Cloudron}/elabftw.knownelement.com/supervisord.conf (100%) rename {Techops => Cloudron}/homebox.knownelement.com/CloudronManifest.json (100%) rename {Techops => Cloudron}/homebox.knownelement.com/Dockerfile (100%) rename {Techops => Cloudron}/homebox.knownelement.com/nginx.conf (100%) rename {Techops => Cloudron}/homebox.knownelement.com/start.sh (100%) rename {Techops => Cloudron}/homechart.knownelement.com/CloudronManifest.json (100%) rename {Techops => Cloudron}/homechart.knownelement.com/Dockerfile (100%) rename {Techops => Cloudron}/homechart.knownelement.com/HomeChart-BuildNotes.md (100%) rename {Techops => Cloudron}/homechart.knownelement.com/nginx.conf (100%) rename {Techops => Cloudron}/homechart.knownelement.com/start.sh (100%) rename {Techops => Cloudron}/homechart.knownelement.com/supervisord.conf (100%) rename {Techops => Cloudron}/inventree.knownelement.com/CloudronManifest.json (100%) rename {Techops => Cloudron}/inventree.knownelement.com/Dockerfile (100%) rename {Techops => Cloudron}/inventree.knownelement.com/InventreeBuildNotes.txt (100%) rename {Techops => Cloudron}/inventree.knownelement.com/config.yaml (100%) rename {Techops => Cloudron}/inventree.knownelement.com/nginx.conf (100%) rename {Techops => Cloudron}/inventree.knownelement.com/start.sh (100%) rename {Techops => Cloudron}/inventree.knownelement.com/supervisord.conf (100%) create mode 100644 Cloudron/jenkins.knownelement.com/CloudronManifest.json create mode 100644 Cloudron/jenkins.knownelement.com/Dockerfile create mode 100644 Cloudron/jenkins.knownelement.com/JenkinsBulldNotes.md rename {Techops => Cloudron}/jenkins.knownelement.com/casc_templates/default.yaml (100%) rename {Techops => Cloudron}/jenkins.knownelement.com/casc_templates/ldap.yaml (100%) rename {Techops => Cloudron}/jenkins.knownelement.com/casc_templates/oauth.yaml (100%) create mode 100644 Cloudron/jenkins.knownelement.com/nginx.conf create mode 100644 Cloudron/jenkins.knownelement.com/start.sh create mode 100644 Cloudron/jenkins.knownelement.com/supervisor.conf rename {Techops => Cloudron}/reviewboard.knownelement.com/CloudronManifest.json (100%) rename {Techops => Cloudron}/reviewboard.knownelement.com/Dockerfile (100%) rename {Techops => Cloudron}/reviewboard.knownelement.com/ReviewBoard-BuildNotes.md (100%) rename {Techops => Cloudron}/reviewboard.knownelement.com/nginx.conf (100%) rename {Techops => Cloudron}/reviewboard.knownelement.com/start.sh (100%) rename {Techops => Cloudron}/reviewboard.knownelement.com/supervisord.conf (100%) rename {Techops => Cloudron}/rundeck.knownelement.com/CloudronManifest.json (100%) rename {Techops => Cloudron}/rundeck.knownelement.com/Dockerfile (100%) rename {Techops => Cloudron}/rundeck.knownelement.com/Rundeck-BuildNotes.md (100%) rename {Techops => Cloudron}/rundeck.knownelement.com/framework.properties (100%) rename {Techops => Cloudron}/rundeck.knownelement.com/jaas-ldap.conf (100%) rename {Techops => Cloudron}/rundeck.knownelement.com/jaas-oidc.conf (100%) rename {Techops => Cloudron}/rundeck.knownelement.com/nginx.conf (100%) rename {Techops => Cloudron}/rundeck.knownelement.com/realm.properties (100%) rename {Techops => Cloudron}/rundeck.knownelement.com/rundeck-config.properties (100%) rename {Techops => Cloudron}/rundeck.knownelement.com/start.sh (100%) rename {Techops => Cloudron}/rundeck.knownelement.com/supervisord.conf (100%) diff --git a/Techops/elabftw.knownelement.com/CloudronManifest.json b/Cloudron/elabftw.knownelement.com/CloudronManifest.json similarity index 100% rename from Techops/elabftw.knownelement.com/CloudronManifest.json rename to Cloudron/elabftw.knownelement.com/CloudronManifest.json diff --git a/Techops/elabftw.knownelement.com/Dockerfile b/Cloudron/elabftw.knownelement.com/Dockerfile similarity index 100% rename from Techops/elabftw.knownelement.com/Dockerfile rename to Cloudron/elabftw.knownelement.com/Dockerfile diff --git a/Techops/elabftw.knownelement.com/elabftw-BuildNotes.md b/Cloudron/elabftw.knownelement.com/elabftw-BuildNotes.md similarity index 100% rename from Techops/elabftw.knownelement.com/elabftw-BuildNotes.md rename to Cloudron/elabftw.knownelement.com/elabftw-BuildNotes.md diff --git a/Techops/elabftw.knownelement.com/nginx.conf b/Cloudron/elabftw.knownelement.com/nginx.conf similarity index 100% rename from Techops/elabftw.knownelement.com/nginx.conf rename to Cloudron/elabftw.knownelement.com/nginx.conf diff --git a/Techops/elabftw.knownelement.com/start.sh b/Cloudron/elabftw.knownelement.com/start.sh similarity index 100% rename from Techops/elabftw.knownelement.com/start.sh rename to Cloudron/elabftw.knownelement.com/start.sh diff --git a/Techops/elabftw.knownelement.com/supervisord.conf b/Cloudron/elabftw.knownelement.com/supervisord.conf similarity index 100% rename from Techops/elabftw.knownelement.com/supervisord.conf rename to Cloudron/elabftw.knownelement.com/supervisord.conf diff --git a/Techops/homebox.knownelement.com/CloudronManifest.json b/Cloudron/homebox.knownelement.com/CloudronManifest.json similarity index 100% rename from Techops/homebox.knownelement.com/CloudronManifest.json rename to Cloudron/homebox.knownelement.com/CloudronManifest.json diff --git a/Techops/homebox.knownelement.com/Dockerfile b/Cloudron/homebox.knownelement.com/Dockerfile similarity index 100% rename from Techops/homebox.knownelement.com/Dockerfile rename to Cloudron/homebox.knownelement.com/Dockerfile diff --git a/Techops/homebox.knownelement.com/nginx.conf b/Cloudron/homebox.knownelement.com/nginx.conf similarity index 100% rename from Techops/homebox.knownelement.com/nginx.conf rename to Cloudron/homebox.knownelement.com/nginx.conf diff --git a/Techops/homebox.knownelement.com/start.sh b/Cloudron/homebox.knownelement.com/start.sh similarity index 100% rename from Techops/homebox.knownelement.com/start.sh rename to Cloudron/homebox.knownelement.com/start.sh diff --git a/Techops/homechart.knownelement.com/CloudronManifest.json b/Cloudron/homechart.knownelement.com/CloudronManifest.json similarity index 100% rename from Techops/homechart.knownelement.com/CloudronManifest.json rename to Cloudron/homechart.knownelement.com/CloudronManifest.json diff --git a/Techops/homechart.knownelement.com/Dockerfile b/Cloudron/homechart.knownelement.com/Dockerfile similarity index 100% rename from Techops/homechart.knownelement.com/Dockerfile rename to Cloudron/homechart.knownelement.com/Dockerfile diff --git a/Techops/homechart.knownelement.com/HomeChart-BuildNotes.md b/Cloudron/homechart.knownelement.com/HomeChart-BuildNotes.md similarity index 100% rename from Techops/homechart.knownelement.com/HomeChart-BuildNotes.md rename to Cloudron/homechart.knownelement.com/HomeChart-BuildNotes.md diff --git a/Techops/homechart.knownelement.com/nginx.conf b/Cloudron/homechart.knownelement.com/nginx.conf similarity index 100% rename from Techops/homechart.knownelement.com/nginx.conf rename to Cloudron/homechart.knownelement.com/nginx.conf diff --git a/Techops/homechart.knownelement.com/start.sh b/Cloudron/homechart.knownelement.com/start.sh similarity index 100% rename from Techops/homechart.knownelement.com/start.sh rename to Cloudron/homechart.knownelement.com/start.sh diff --git a/Techops/homechart.knownelement.com/supervisord.conf b/Cloudron/homechart.knownelement.com/supervisord.conf similarity index 100% rename from Techops/homechart.knownelement.com/supervisord.conf rename to Cloudron/homechart.knownelement.com/supervisord.conf diff --git a/Techops/inventree.knownelement.com/CloudronManifest.json b/Cloudron/inventree.knownelement.com/CloudronManifest.json similarity index 100% rename from Techops/inventree.knownelement.com/CloudronManifest.json rename to Cloudron/inventree.knownelement.com/CloudronManifest.json diff --git a/Techops/inventree.knownelement.com/Dockerfile b/Cloudron/inventree.knownelement.com/Dockerfile similarity index 100% rename from Techops/inventree.knownelement.com/Dockerfile rename to Cloudron/inventree.knownelement.com/Dockerfile diff --git a/Techops/inventree.knownelement.com/InventreeBuildNotes.txt b/Cloudron/inventree.knownelement.com/InventreeBuildNotes.txt similarity index 100% rename from Techops/inventree.knownelement.com/InventreeBuildNotes.txt rename to Cloudron/inventree.knownelement.com/InventreeBuildNotes.txt diff --git a/Techops/inventree.knownelement.com/config.yaml b/Cloudron/inventree.knownelement.com/config.yaml similarity index 100% rename from Techops/inventree.knownelement.com/config.yaml rename to Cloudron/inventree.knownelement.com/config.yaml diff --git a/Techops/inventree.knownelement.com/nginx.conf b/Cloudron/inventree.knownelement.com/nginx.conf similarity index 100% rename from Techops/inventree.knownelement.com/nginx.conf rename to Cloudron/inventree.knownelement.com/nginx.conf diff --git a/Techops/inventree.knownelement.com/start.sh b/Cloudron/inventree.knownelement.com/start.sh similarity index 100% rename from Techops/inventree.knownelement.com/start.sh rename to Cloudron/inventree.knownelement.com/start.sh diff --git a/Techops/inventree.knownelement.com/supervisord.conf b/Cloudron/inventree.knownelement.com/supervisord.conf similarity index 100% rename from Techops/inventree.knownelement.com/supervisord.conf rename to Cloudron/inventree.knownelement.com/supervisord.conf diff --git a/Cloudron/jenkins.knownelement.com/CloudronManifest.json b/Cloudron/jenkins.knownelement.com/CloudronManifest.json new file mode 100644 index 0000000..1613f17 --- /dev/null +++ b/Cloudron/jenkins.knownelement.com/CloudronManifest.json @@ -0,0 +1,40 @@ +{ + "id": "io.jenkins.cloudron", + "title": "Jenkins", + "author": "Cloudron Packager", + "description": "Jenkins is an open source automation server which enables developers to reliably build, test, and deploy their software.", + "tagline": "The leading open source automation server", + "version": "1.0.0", + "healthCheckPath": "/login", + "httpPort": 8080, + "manifestVersion": 2, + "website": "https://jenkins.io/", + "contactEmail": "support@cloudron.io", + "icon": "file://logo.png", + "dockerImage": "cloudron/jenkins", + "memoryLimit": 2048000000, + "addons": { + "localstorage": { + "title": "Jenkins Data" + } + }, + "optionalAddons": { + "ldap": { + "title": "LDAP Integration", + "description": "Allow users to login with LDAP credentials" + }, + "oauth": { + "title": "OAuth Integration", + "description": "Allow users to login with Cloudron credentials" + } + }, + "tags": [ + "ci", + "cd", + "devops", + "automation" + ], + "postInstallMessage": "Jenkins is now installed. The initial admin password is shown in the logs. You can view it by running 'cloudron logs -f'. The password is displayed after 'Jenkins initial setup is required.' in the logs.", + "minBoxVersion": "5.4.0", + "documentationUrl": "https://jenkins.io/doc/" +} \ No newline at end of file diff --git a/Cloudron/jenkins.knownelement.com/Dockerfile b/Cloudron/jenkins.knownelement.com/Dockerfile new file mode 100644 index 0000000..54bd007 --- /dev/null +++ b/Cloudron/jenkins.knownelement.com/Dockerfile @@ -0,0 +1,49 @@ +FROM cloudron/base:4.2.0 + +# Add Jenkins repository key and repository +RUN apt-get update && \ + apt-get install -y gnupg curl software-properties-common && \ + curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | gpg --dearmor -o /usr/share/keyrings/jenkins-keyring.gpg && \ + echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.gpg] https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list + +# Install Jenkins and required dependencies +RUN apt-get update && \ + apt-get install -y openjdk-17-jdk jenkins fontconfig && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Install required plugins for Cloudron integration +RUN mkdir -p /tmp/data/plugins && \ + cd /tmp/data/plugins && \ + curl -L -o ldap.hpi https://updates.jenkins.io/latest/ldap.hpi && \ + curl -L -o oic-auth.hpi https://updates.jenkins.io/latest/oic-auth.hpi && \ + curl -L -o configuration-as-code.hpi https://updates.jenkins.io/latest/configuration-as-code.hpi && \ + curl -L -o credentials.hpi https://updates.jenkins.io/latest/credentials.hpi && \ + chmod 644 *.hpi + +# Create template for casc.yaml +RUN mkdir -p /tmp/data/casc_configs +COPY casc_templates/ /tmp/data/casc_configs/ + +# Set up directory structure for Cloudron +RUN mkdir -p /app/data && \ + mkdir -p /tmp/data/jenkins_home + +# Copy startup script +COPY start.sh /app/code/ +RUN chmod +x /app/code/start.sh + +# Copy NGINX configuration +COPY nginx.conf /app/code/ + +# Copy supervisor configuration +COPY supervisor.conf /etc/supervisor/conf.d/ + +# Use the cloudron user for Jenkins +RUN usermod -a -G jenkins cloudron && \ + chown -R cloudron:cloudron /tmp/data + +WORKDIR /app/data + +# Entry point +CMD ["/app/code/start.sh"] \ No newline at end of file diff --git a/Cloudron/jenkins.knownelement.com/JenkinsBulldNotes.md b/Cloudron/jenkins.knownelement.com/JenkinsBulldNotes.md new file mode 100644 index 0000000..a7efafd --- /dev/null +++ b/Cloudron/jenkins.knownelement.com/JenkinsBulldNotes.md @@ -0,0 +1,97 @@ +# Jenkins for Cloudron - Build Notes + +This document provides instructions for building, testing, and deploying the Jenkins package to Cloudron. + +## Prerequisites + +- Cloudron server (version 5.4.0 or higher) +- Docker installed on your build machine +- Cloudron CLI tool installed (`npm install -g cloudron`) + +## File Structure + +``` +jenkins-cloudron/ +├── CloudronManifest.json # Package definition +├── Dockerfile # Docker image build instructions +├── start.sh # Initialization script +├── nginx.conf # NGINX configuration +├── supervisor.conf # Supervisor configuration for process management +├── logo.png # App icon (128x128 PNG) +├── casc_templates/ # Jenkins Configuration as Code templates +│ ├── default.yaml # Default authentication config +│ ├── ldap.yaml # LDAP authentication config +│ └── oauth.yaml # OAuth/OIDC authentication config +``` + +## Building the Package + +1. Create a directory for your package and place all files in the appropriate structure. + +2. Download a Jenkins logo (128x128 PNG) and save it as `logo.png` + +3. Build the Docker image: + ```bash + cloudron build + ``` + +4. Test the package locally: + ```bash + cloudron install —image cloudron/jenkins + ``` + +## Authentication Configuration + +The package supports three authentication methods: + +1. **Default (Local)**: Uses Jenkins’ built-in user database +2. **LDAP**: Uses Cloudron’s LDAP server for authentication +3. **OAuth/OIDC**: Uses Cloudron’s OAuth service for single sign-on + +The authentication method is automatically configured based on the presence of environment variables provided by Cloudron. + +## Testing + +After installation, test the following: + +1. **Basic functionality**: + - Access Jenkins through your Cloudron dashboard + - Verify the initial admin password works + - Create a simple pipeline job + +2. **Authentication**: + - Test LDAP integration by enabling the LDAP addon + - Test OAuth/OIDC integration by enabling the OAuth addon + - Verify user permissions are correctly applied + +3. **Persistence**: + - Install plugins through the Jenkins UI + - Restart the app to verify plugins persist + - Check that job configurations are maintained + +## Troubleshooting + +- **Jenkins doesn’t start**: Check logs using `cloudron logs -f` +- **Authentication issues**: Verify the correct addons are enabled and configuration is applied +- **Permission problems**: Check the ownership and permissions of files in `/app/data` + +## Updating Jenkins + +When a new version of Jenkins is released, update the Dockerfile to pull the latest version and rebuild the package. + +## Additional Notes + +- The package uses Jenkins Configuration as Code (JCasC) to automate the setup process +- Jenkins runs as the `cloudron` user for proper permissions +- Files in `/app/data/jenkins_home` are persisted across restarts and updates +- Initial admin password is set to ‘adminpass’ for local authentication + +## Deployment to Cloudron App Store + +If you wish to publish your app to the Cloudron App Store: + +1. Update the CloudronManifest.json with your details +2. Test thoroughly on your own Cloudron instance +3. Follow the Cloudron App Publishing guidelines + +Happy CI/CD with Jenkins on Cloudron! \ No newline at end of file diff --git a/Techops/jenkins.knownelement.com/casc_templates/default.yaml b/Cloudron/jenkins.knownelement.com/casc_templates/default.yaml similarity index 100% rename from Techops/jenkins.knownelement.com/casc_templates/default.yaml rename to Cloudron/jenkins.knownelement.com/casc_templates/default.yaml diff --git a/Techops/jenkins.knownelement.com/casc_templates/ldap.yaml b/Cloudron/jenkins.knownelement.com/casc_templates/ldap.yaml similarity index 100% rename from Techops/jenkins.knownelement.com/casc_templates/ldap.yaml rename to Cloudron/jenkins.knownelement.com/casc_templates/ldap.yaml diff --git a/Techops/jenkins.knownelement.com/casc_templates/oauth.yaml b/Cloudron/jenkins.knownelement.com/casc_templates/oauth.yaml similarity index 100% rename from Techops/jenkins.knownelement.com/casc_templates/oauth.yaml rename to Cloudron/jenkins.knownelement.com/casc_templates/oauth.yaml diff --git a/Cloudron/jenkins.knownelement.com/nginx.conf b/Cloudron/jenkins.knownelement.com/nginx.conf new file mode 100644 index 0000000..9aed400 --- /dev/null +++ b/Cloudron/jenkins.knownelement.com/nginx.conf @@ -0,0 +1,55 @@ +worker_processes 1; +error_log stderr; +pid /run/nginx.pid; +daemon off; + +events { + worker_connections 768; +} + +http { + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + include /etc/nginx/mime.types; + default_type application/octet-stream; + + # Disable access logs to stdout - Cloudron handles these + access_log off; + + server { + listen 8000; + + client_max_body_size 50M; + + location / { + proxy_pass http://127.0.0.1:8080; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + # Required for Jenkins websocket connections + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + proxy_read_timeout 90; + proxy_redirect http://127.0.0.1:8080 $scheme://$host; + + # Fix potential security issues + proxy_cookie_path / "/; HTTPOnly; Secure"; + } + + # Special config for OIDC callback + location /securityRealm/finishLogin { + proxy_pass http://127.0.0.1:8080; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + } +} \ No newline at end of file diff --git a/Cloudron/jenkins.knownelement.com/start.sh b/Cloudron/jenkins.knownelement.com/start.sh new file mode 100644 index 0000000..e775748 --- /dev/null +++ b/Cloudron/jenkins.knownelement.com/start.sh @@ -0,0 +1,50 @@ +#!/bin/bash +set -e + +# Jenkins home directory +JENKINS_HOME=/app/data/jenkins_home + +# Create necessary directories if they don't exist +if [[ ! -d "${JENKINS_HOME}" ]]; then + echo "Initializing Jenkins home directory" + mkdir -p "${JENKINS_HOME}" + cp -r /tmp/data/jenkins_home/* "${JENKINS_HOME}/" || true + # Copy plugins + mkdir -p "${JENKINS_HOME}/plugins" + cp -r /tmp/data/plugins/* "${JENKINS_HOME}/plugins/" || true + # Create directory for JCasC + mkdir -p "${JENKINS_HOME}/casc_configs" +fi + +# Apply proper permissions +chown -R cloudron:cloudron "${JENKINS_HOME}" + +# Set up Jenkins environment variables +export JENKINS_HOME +export JENKINS_OPTS="--httpPort=8080" + +# Disable setup wizard +export JAVA_OPTS="-Djenkins.install.runSetupWizard=false" + +# Setup JCasC configuration based on environment +if [[ -n "${CLOUDRON_OAUTH_CLIENT_ID}" ]]; then + echo "Setting up OAuth authentication" + envsubst < /tmp/data/casc_configs/oauth.yaml > "${JENKINS_HOME}/casc_configs/oauth.yaml" + export CASC_JENKINS_CONFIG="${JENKINS_HOME}/casc_configs/oauth.yaml" +elif [[ -n "${CLOUDRON_LDAP_SERVER}" ]]; then + echo "Setting up LDAP authentication" + envsubst < /tmp/data/casc_configs/ldap.yaml > "${JENKINS_HOME}/casc_configs/ldap.yaml" + export CASC_JENKINS_CONFIG="${JENKINS_HOME}/casc_configs/ldap.yaml" +else + echo "Using default authentication" + envsubst < /tmp/data/casc_configs/default.yaml > "${JENKINS_HOME}/casc_configs/default.yaml" + export CASC_JENKINS_CONFIG="${JENKINS_HOME}/casc_configs/default.yaml" +fi + +# Configure Jenkins URL +JENKINS_URL="${CLOUDRON_APP_ORIGIN}" +echo "Setting Jenkins URL to ${JENKINS_URL}" +export JENKINS_URL + +# Start supervisord, which will start NGINX and Jenkins +exec /usr/bin/supervisord --nodaemon -c /etc/supervisor/supervisord.conf \ No newline at end of file diff --git a/Cloudron/jenkins.knownelement.com/supervisor.conf b/Cloudron/jenkins.knownelement.com/supervisor.conf new file mode 100644 index 0000000..1bf1b0a --- /dev/null +++ b/Cloudron/jenkins.knownelement.com/supervisor.conf @@ -0,0 +1,18 @@ +[program:nginx] +command=nginx -c /app/code/nginx.conf +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +autorestart=true + +[program:jenkins] +command=java -Djava.awt.headless=true -Djenkins.model.Jenkins.slaveAgentPort=50000 -Dhudson.model.UsageStatistics.disabled=true %(ENV_JAVA_OPTS)s -jar /usr/share/java/jenkins.war --httpPort=8080 --webroot=/var/cache/jenkins/war %(ENV_JENKINS_OPTS)s +directory=/app/data/jenkins_home +user=cloudron +environment=HOME="/app/data/jenkins_home",USER="cloudron" +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +autorestart=true \ No newline at end of file diff --git a/Techops/reviewboard.knownelement.com/CloudronManifest.json b/Cloudron/reviewboard.knownelement.com/CloudronManifest.json similarity index 100% rename from Techops/reviewboard.knownelement.com/CloudronManifest.json rename to Cloudron/reviewboard.knownelement.com/CloudronManifest.json diff --git a/Techops/reviewboard.knownelement.com/Dockerfile b/Cloudron/reviewboard.knownelement.com/Dockerfile similarity index 100% rename from Techops/reviewboard.knownelement.com/Dockerfile rename to Cloudron/reviewboard.knownelement.com/Dockerfile diff --git a/Techops/reviewboard.knownelement.com/ReviewBoard-BuildNotes.md b/Cloudron/reviewboard.knownelement.com/ReviewBoard-BuildNotes.md similarity index 100% rename from Techops/reviewboard.knownelement.com/ReviewBoard-BuildNotes.md rename to Cloudron/reviewboard.knownelement.com/ReviewBoard-BuildNotes.md diff --git a/Techops/reviewboard.knownelement.com/nginx.conf b/Cloudron/reviewboard.knownelement.com/nginx.conf similarity index 100% rename from Techops/reviewboard.knownelement.com/nginx.conf rename to Cloudron/reviewboard.knownelement.com/nginx.conf diff --git a/Techops/reviewboard.knownelement.com/start.sh b/Cloudron/reviewboard.knownelement.com/start.sh similarity index 100% rename from Techops/reviewboard.knownelement.com/start.sh rename to Cloudron/reviewboard.knownelement.com/start.sh diff --git a/Techops/reviewboard.knownelement.com/supervisord.conf b/Cloudron/reviewboard.knownelement.com/supervisord.conf similarity index 100% rename from Techops/reviewboard.knownelement.com/supervisord.conf rename to Cloudron/reviewboard.knownelement.com/supervisord.conf diff --git a/Techops/rundeck.knownelement.com/CloudronManifest.json b/Cloudron/rundeck.knownelement.com/CloudronManifest.json similarity index 100% rename from Techops/rundeck.knownelement.com/CloudronManifest.json rename to Cloudron/rundeck.knownelement.com/CloudronManifest.json diff --git a/Techops/rundeck.knownelement.com/Dockerfile b/Cloudron/rundeck.knownelement.com/Dockerfile similarity index 100% rename from Techops/rundeck.knownelement.com/Dockerfile rename to Cloudron/rundeck.knownelement.com/Dockerfile diff --git a/Techops/rundeck.knownelement.com/Rundeck-BuildNotes.md b/Cloudron/rundeck.knownelement.com/Rundeck-BuildNotes.md similarity index 100% rename from Techops/rundeck.knownelement.com/Rundeck-BuildNotes.md rename to Cloudron/rundeck.knownelement.com/Rundeck-BuildNotes.md diff --git a/Techops/rundeck.knownelement.com/framework.properties b/Cloudron/rundeck.knownelement.com/framework.properties similarity index 100% rename from Techops/rundeck.knownelement.com/framework.properties rename to Cloudron/rundeck.knownelement.com/framework.properties diff --git a/Techops/rundeck.knownelement.com/jaas-ldap.conf b/Cloudron/rundeck.knownelement.com/jaas-ldap.conf similarity index 100% rename from Techops/rundeck.knownelement.com/jaas-ldap.conf rename to Cloudron/rundeck.knownelement.com/jaas-ldap.conf diff --git a/Techops/rundeck.knownelement.com/jaas-oidc.conf b/Cloudron/rundeck.knownelement.com/jaas-oidc.conf similarity index 100% rename from Techops/rundeck.knownelement.com/jaas-oidc.conf rename to Cloudron/rundeck.knownelement.com/jaas-oidc.conf diff --git a/Techops/rundeck.knownelement.com/nginx.conf b/Cloudron/rundeck.knownelement.com/nginx.conf similarity index 100% rename from Techops/rundeck.knownelement.com/nginx.conf rename to Cloudron/rundeck.knownelement.com/nginx.conf diff --git a/Techops/rundeck.knownelement.com/realm.properties b/Cloudron/rundeck.knownelement.com/realm.properties similarity index 100% rename from Techops/rundeck.knownelement.com/realm.properties rename to Cloudron/rundeck.knownelement.com/realm.properties diff --git a/Techops/rundeck.knownelement.com/rundeck-config.properties b/Cloudron/rundeck.knownelement.com/rundeck-config.properties similarity index 100% rename from Techops/rundeck.knownelement.com/rundeck-config.properties rename to Cloudron/rundeck.knownelement.com/rundeck-config.properties diff --git a/Techops/rundeck.knownelement.com/start.sh b/Cloudron/rundeck.knownelement.com/start.sh similarity index 100% rename from Techops/rundeck.knownelement.com/start.sh rename to Cloudron/rundeck.knownelement.com/start.sh diff --git a/Techops/rundeck.knownelement.com/supervisord.conf b/Cloudron/rundeck.knownelement.com/supervisord.conf similarity index 100% rename from Techops/rundeck.knownelement.com/supervisord.conf rename to Cloudron/rundeck.knownelement.com/supervisord.conf