infrastructure/README.md

40 lines
930 B
Markdown
Raw Normal View History

2022-12-09 17:12:09 +01:00
# Infrastructure
2023-12-08 18:12:01 +01:00
2023-12-18 17:52:30 +01:00
## Setting up server
- install docker
- install k3s
2024-01-24 17:39:45 +01:00
- apt-get install tmate
2023-12-18 17:52:30 +01:00
2023-12-08 18:12:01 +01:00
## Backups
### Longhorn
```
apt-get -y install open-iscsi nfs-common jq
curl -sSfL https://raw.githubusercontent.com/longhorn/longhorn/v1.5.3/scripts/environment_check.sh | bash
```
### Velero
```
velero install \
--use-node-agent \
--privileged-node-agent \
--uploader-type=restic \
--features=EnableCSI \
--provider aws \
--plugins velero/velero-plugin-for-aws:v1.2.1 \
--bucket velero \
--secret-file ./secrets/credentials-velero \
--use-volume-snapshots=true \
--backup-location-config region=eu,s3ForcePathStyle="true",s3Url=https://eu2.contabostorage.com \
--wait
```
If there's an issue with the credentials:
```
kubectl create secret generic cloud-credentials --namespace velero --from-file=cloud=./secrets/credentials-velero --dry-run=client -o yaml | kubectl apply -f -
```