feat(gitlab): Finish gitlab configuration

Add backup documentation for internal backup management
This commit is contained in:
Tanguy Herbron 2022-10-22 20:43:28 +02:00
parent 574a4b75a4
commit dcc76f2cab
3 changed files with 5 additions and 30 deletions

View File

@ -4,10 +4,10 @@
|-------------------------|--------------------------------------|---------------|--------------|------------|----------------------|----------------------|------------------|------------------------|-----------------------------------| |-------------------------|--------------------------------------|---------------|--------------|------------|----------------------|----------------------|------------------|------------------------|-----------------------------------|
| Traefik | Reverse proxy and load balancer | Public* | Socrates | - | - | - | Configured | Configured | Completed | | Traefik | Reverse proxy and load balancer | Public* | Socrates | - | - | - | Configured | Configured | Completed |
| Vaultwarden | Password manager | Public | Pythagoras-b | MariaDB | - | 4AM K8s CronJob | Configured | Not available | Completed | | Vaultwarden | Password manager | Public | Pythagoras-b | MariaDB | - | 4AM K8s CronJob | Configured | Not available | Completed |
| Gitlab | Version control system | Public | Pythagoras-b | PostgreSQL | User created content | 5AM internal CronJob | Configured | Configured | Completed<sup>4</sup> |
| Adguard | DNS ad blocker and custom DNS server | Private | Socrates | - | - | - | Not configured | Not configured | Pending configuration<sup>1</sup> | | Adguard | DNS ad blocker and custom DNS server | Private | Socrates | - | - | - | Not configured | Not configured | Pending configuration<sup>1</sup> |
| Owncloud Infinity Scale | File hosting webUI | Public | Plato | ? | Drive files | Not configured | Configured | Not available | Pending configuration<sup>2</sup> | | Owncloud Infinity Scale | File hosting webUI | Public | Plato | ? | Drive files | Not configured | Configured | Not available | Pending configuration<sup>2</sup> |
| Synapse | Matrix server - Message centralizer | Public | Pythagoras-b | PostgreSQL | User medias | 4AM K8s CronJob | Configured | Configured | Pending configuration<sup>3</sup> | | Synapse | Matrix server - Message centralizer | Public | Pythagoras-b | PostgreSQL | User medias | 4AM K8s CronJob | Configured | Configured | Pending configuration<sup>3</sup> |
| Gitlab | Version control system | Public | Pythagoras-b | PostgreSQL | User created content | Not configured | Configured | Configured | Pending configuration<sup>4</sup> |
| therbron.com | Personal website | Public | Socrates | - | - | - | Not configured | Not configured | Awaiting configuration | | therbron.com | Personal website | Public | Socrates | - | - | - | Not configured | Not configured | Awaiting configuration |
| Home assistant | Home automation and monitoring | Private | Pythagoras-a | MariaDB | - | Not configured | Not configured | Not configured | Awaiting configuration | | Home assistant | Home automation and monitoring | Private | Pythagoras-a | MariaDB | - | Not configured | Not configured | Not configured | Awaiting configuration |
| Vikunja | To-do and Kanban boards | Public | Pythagoras-b | - | - | - | Not configured | Not configured | Migrate to Gitlab | | Vikunja | To-do and Kanban boards | Public | Pythagoras-b | - | - | - | Not configured | Not configured | Migrate to Gitlab |
@ -31,7 +31,7 @@
<sup>1</sup> Missing automated configuration pipeline for environment variable injection<br> <sup>1</sup> Missing automated configuration pipeline for environment variable injection<br>
<sup>2</sup> Missing configuration for NAS volume mounting (over network)<br> <sup>2</sup> Missing configuration for NAS volume mounting (over network)<br>
<sup>3</sup> Missing Longhorn scheduling for saving media_store and secret management<br> <sup>3</sup> Missing Longhorn scheduling for saving media_store and secret management<br>
<sup>4</sup> Missing `cron` for backup scheduling (require update of the used docker image<br> <sup>4</sup> Backup management is not handled by k3s but by an internal cronjob rule (Change image name when putting to production)<br>
## Backup management ## Backup management
### Databases ### Databases
@ -93,5 +93,5 @@ Add longhorn storage classes
### Convert helm chart to k3s manifest ### Convert helm chart to k3s manifest
`helm template chart stable/chart --output-dir ./chart` `helm template chart stable/chart --output-dir ./chart`
### Gitlab backup command ### Gitlab backup process
`gitlab-backup create SKIP=registry,builds,artifacts` Because gitlab does not offer the possibility to backup a container's data from an external container, a cronjob has been implemented in the custom image used for deployment.

View File

@ -1,25 +0,0 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: backup-job
namespace: gitlab
spec:
schedule: "0 4 * * *" # Every day at 4AM
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
containers:
- name: maria-backup
image: mariadb
command: ["sh", "-c", "echo hi"]
volumeMounts:
- name: gitlab-backup
mountPath: /backup/gitlab
subPath: gitlab
volumes:
- name: gitlab-backup
persistentVolumeClaim:
claimName: gitlab-backup-pvc
restartPolicy: OnFailure

View File

@ -18,7 +18,7 @@ spec:
nodeName: slave-1 nodeName: slave-1
containers: containers:
- name: gitlab - name: gitlab
image: gitlab/gitlab-ce:15.4.2-ce.0 image: git.halia.dev/athens-school/gitlab:15.5.0-amd64
ports: ports:
- containerPort: 80 - containerPort: 80
volumeMounts: volumeMounts: