Skip to content

Commit

Permalink
Create infra for demo.library.kiwix.org
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed Aug 13, 2024
1 parent 5e9abc5 commit e39bb96
Show file tree
Hide file tree
Showing 11 changed files with 1,010 additions and 0 deletions.
Binary file added zim/demo-library/dead-kiwix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions zim/demo-library/dead.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kiwix demo library</title>
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
<style>
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
font-family: 'Roboto', sans-serif;
background-color: #f4f4f4;
text-align: center;
}
.content {
max-width: 600px;
padding: 20px;
}
img {
max-width: 100%;
height: auto;
}
p {
margin-top: 20px;
font-size: 18px;
color: #333;
}
</style>
</head>
<body>
<div class="content">
<img src="/home/dead-kiwix.png" alt="Image">
<p>There is nothing here, your URL is probably wrong.</p>
</div>
</body>
</html>
51 changes: 51 additions & 0 deletions zim/demo-library/demo-generator.cronjob.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: demo-generator
namespace: zim
spec:
schedule: "0 * * * *"
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
concurrencyPolicy: Forbid
jobTemplate:
spec:
backoffLimit: 1
template:
spec:
containers:
- name: debian
image: ghcr.io/kiwix/maintenance:latest
imagePullPolicy: Always
env:
- name: INSTALL_SCRIPTS
value: "demo-generator#github://kiwix/k8s/zim/library-mgmt/demo-generator.py\n"
volumeMounts:
- mountPath: "/data/demo"
subPath: demo
name: library-volume
- mountPath: "/data/zim"
subPath: zim
name: download-volume
readOnly: true
- mountPath: "/data/hidden-zim"
name: hidden-volume
readOnly: true
args: ["demo-generator"]
resources:
limits:
cpu: 200m
memory: 256Mi
volumes:
- name: library-volume
persistentVolumeClaim:
claimName: kiwix-library-pvc
- name: download-volume
persistentVolumeClaim:
claimName: kiwix-download-pvc
- name: hidden-volume
persistentVolumeClaim:
claimName: hidden-zim-pvc
restartPolicy: Never
nodeSelector:
k8s.kiwix.org/role: "storage"
Loading

0 comments on commit e39bb96

Please sign in to comment.