Adds chamilo app.
This commit is contained in:
5
chamilo/app.yaml
Normal file
5
chamilo/app.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
name: chamilo
|
||||||
|
is: chamilo
|
||||||
|
description: Chamilo is a free and open-source e-learning platform (LMS) for course management, assessments, and online education.
|
||||||
|
icon: https://raw.githubusercontent.com/chamilo/chamilo-lms/master/public/img/logo.png
|
||||||
|
latest: "1"
|
||||||
39
chamilo/versions/1/README.md
Normal file
39
chamilo/versions/1/README.md
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# Chamilo
|
||||||
|
|
||||||
|
Chamilo is an open-source Learning Management System (LMS) for creating and delivering online courses.
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
- **MySQL** - Database for storing courses, users, and activity
|
||||||
|
- **SMTP** - For account verification and course notifications
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Key settings in `config.yaml`:
|
||||||
|
|
||||||
|
- **domain** - Where Chamilo will be accessible
|
||||||
|
- **storage** - Persistent volume size (default: `2Gi`)
|
||||||
|
- **siteName** - Display name for the LMS (default: `Chamilo LMS`)
|
||||||
|
- **adminUser** - Admin account username (default: `admin`)
|
||||||
|
- **adminEmail** - Admin account email (defaults to your operator email)
|
||||||
|
- **smtp** - Email settings inherited from your Wild Cloud SMTP service
|
||||||
|
|
||||||
|
## First-Time Setup
|
||||||
|
|
||||||
|
1. Add and deploy the app:
|
||||||
|
```bash
|
||||||
|
wild app add chamilo
|
||||||
|
wild app deploy chamilo
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Log in with:
|
||||||
|
- **Username**: value of `adminUser` in your config (default: `admin`)
|
||||||
|
- **Password**: value of `adminPassword` in your `secrets.yaml`
|
||||||
|
|
||||||
|
3. From the admin panel, create courses, enroll learners, and configure the LMS settings.
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- The admin panel is accessible via **Administration** in the top navigation after logging in
|
||||||
|
- Courses can be assigned to categories, and users can self-enroll or be enrolled by teachers
|
||||||
|
- SMTP is needed for sending course completion certificates and user notifications
|
||||||
64
chamilo/versions/1/db-init-job.yaml
Normal file
64
chamilo/versions/1/db-init-job.yaml
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: chamilo-db-init
|
||||||
|
labels:
|
||||||
|
component: db-init
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
component: db-init
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
securityContext:
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 999
|
||||||
|
runAsGroup: 999
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
containers:
|
||||||
|
- name: mysql-init
|
||||||
|
image: mysql:9.1.0
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
readOnlyRootFilesystem: false
|
||||||
|
env:
|
||||||
|
- name: MYSQL_ROOT_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: chamilo-secrets
|
||||||
|
key: mysql.rootPassword
|
||||||
|
- name: DB_HOSTNAME
|
||||||
|
value: {{ .db.host }}
|
||||||
|
- name: DB_PORT
|
||||||
|
value: "{{ .db.port }}"
|
||||||
|
- name: DB_DATABASE_NAME
|
||||||
|
value: {{ .db.name }}
|
||||||
|
- name: DB_USERNAME
|
||||||
|
value: {{ .db.user }}
|
||||||
|
- name: DB_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: chamilo-secrets
|
||||||
|
key: dbPassword
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
set -e
|
||||||
|
until mysql -h ${DB_HOSTNAME} -P ${DB_PORT} -u root -p${MYSQL_ROOT_PASSWORD} -e "SELECT 1" 2>/dev/null; do
|
||||||
|
echo "Waiting for MySQL..."
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
mysql -h ${DB_HOSTNAME} -P ${DB_PORT} -u root -p${MYSQL_ROOT_PASSWORD} <<EOF
|
||||||
|
CREATE DATABASE IF NOT EXISTS ${DB_DATABASE_NAME} CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
CREATE USER IF NOT EXISTS '${DB_USERNAME}'@'%' IDENTIFIED BY '${DB_PASSWORD}';
|
||||||
|
ALTER USER '${DB_USERNAME}'@'%' IDENTIFIED BY '${DB_PASSWORD}';
|
||||||
|
GRANT ALL PRIVILEGES ON ${DB_DATABASE_NAME}.* TO '${DB_USERNAME}'@'%';
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
EOF
|
||||||
|
echo "Done"
|
||||||
76
chamilo/versions/1/deployment.yaml
Normal file
76
chamilo/versions/1/deployment.yaml
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: chamilo
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
component: web
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
component: web
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
runAsNonRoot: false
|
||||||
|
runAsUser: 0
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
containers:
|
||||||
|
- name: chamilo
|
||||||
|
image: ipeos/chamilo:1.11.28
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: PHP_TIMEZONE
|
||||||
|
value: UTC
|
||||||
|
- name: PHP_MEMORY_LIMIT
|
||||||
|
value: 256M
|
||||||
|
- name: PHP_MAX_EXECUTION_TIME
|
||||||
|
value: "300"
|
||||||
|
- name: PHP_UPLOAD_MAX_FILESIZE
|
||||||
|
value: 100M
|
||||||
|
- name: PHP_POST_MAX_SIZE
|
||||||
|
value: 100M
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "1"
|
||||||
|
ephemeral-storage: 1Gi
|
||||||
|
memory: 512Mi
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
ephemeral-storage: 50Mi
|
||||||
|
memory: 256Mi
|
||||||
|
volumeMounts:
|
||||||
|
- name: chamilo-data
|
||||||
|
mountPath: /var/www/html
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: 80
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
timeoutSeconds: 10
|
||||||
|
periodSeconds: 30
|
||||||
|
failureThreshold: 6
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: 80
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
timeoutSeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
failureThreshold: 3
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: true
|
||||||
|
readOnlyRootFilesystem: false
|
||||||
|
volumes:
|
||||||
|
- name: chamilo-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: chamilo-data
|
||||||
|
restartPolicy: Always
|
||||||
26
chamilo/versions/1/ingress.yaml
Normal file
26
chamilo/versions/1/ingress.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: chamilo
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
annotations:
|
||||||
|
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false"
|
||||||
|
external-dns.alpha.kubernetes.io/target: {{ .externalDnsDomain }}
|
||||||
|
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||||
|
spec:
|
||||||
|
ingressClassName: traefik
|
||||||
|
rules:
|
||||||
|
- host: {{ .domain }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: chamilo
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- {{ .domain }}
|
||||||
|
secretName: {{ .tlsSecretName }}
|
||||||
16
chamilo/versions/1/kustomization.yaml
Normal file
16
chamilo/versions/1/kustomization.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
labels:
|
||||||
|
- includeSelectors: true
|
||||||
|
pairs:
|
||||||
|
app: chamilo
|
||||||
|
managedBy: kustomize
|
||||||
|
partOf: wild-cloud
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- db-init-job.yaml
|
||||||
|
- deployment.yaml
|
||||||
|
- service.yaml
|
||||||
|
- ingress.yaml
|
||||||
|
- pvc.yaml
|
||||||
29
chamilo/versions/1/manifest.yaml
Normal file
29
chamilo/versions/1/manifest.yaml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
version: 1.11.28-1
|
||||||
|
requires:
|
||||||
|
- name: mysql
|
||||||
|
- name: smtp
|
||||||
|
defaultConfig:
|
||||||
|
namespace: chamilo
|
||||||
|
externalDnsDomain: '{{ .cloud.domain }}'
|
||||||
|
domain: chamilo.{{ .cloud.domain }}
|
||||||
|
tlsSecretName: wildcard-wild-cloud-tls
|
||||||
|
storage: 2Gi
|
||||||
|
siteName: Chamilo LMS
|
||||||
|
adminUser: admin
|
||||||
|
adminEmail: '{{ .operator.email }}'
|
||||||
|
db:
|
||||||
|
host: '{{ .apps.mysql.host }}'
|
||||||
|
port: "3306"
|
||||||
|
name: chamilo
|
||||||
|
user: chamilo
|
||||||
|
smtp:
|
||||||
|
host: '{{ .apps.smtp.host }}'
|
||||||
|
port: '{{ .apps.smtp.port }}'
|
||||||
|
from: '{{ .apps.smtp.from }}'
|
||||||
|
user: '{{ .apps.smtp.user }}'
|
||||||
|
defaultSecrets:
|
||||||
|
- key: adminPassword
|
||||||
|
- key: dbPassword
|
||||||
|
- key: smtpPassword
|
||||||
|
requiredSecrets:
|
||||||
|
- mysql.rootPassword
|
||||||
4
chamilo/versions/1/namespace.yaml
Normal file
4
chamilo/versions/1/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: {{ .namespace }}
|
||||||
11
chamilo/versions/1/pvc.yaml
Normal file
11
chamilo/versions/1/pvc.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: chamilo-data
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .storage }}
|
||||||
13
chamilo/versions/1/service.yaml
Normal file
13
chamilo/versions/1/service.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: chamilo
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
component: web
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: 80
|
||||||
|
protocol: TCP
|
||||||
Reference in New Issue
Block a user