53 lines
2.2 KiB
Markdown
53 lines
2.2 KiB
Markdown
# Deploy memory — rubis
|
|
|
|
## Infra
|
|
- Namespace : `rubis`
|
|
- Deployment : `rubis`
|
|
- Container : `rubis`
|
|
- NodePort : `30109`
|
|
- Image : `git.arthurbarre.fr/ordinarthur/rubis`
|
|
- Domaine : https://rubis.arthurbarre.fr (sous-domaine **temporaire** — domaine définitif pas encore acheté)
|
|
- Manifests : `k3s/` (namespace.yml, deployment.yml, service.yml)
|
|
- Route Traefik : `~/dev/perso/proxmox/ansible/roles/traefik/templates/rubis.yml.j2`
|
|
- Repo Gitea : https://git.arthurbarre.fr/ordinarthur/rubis (remote `gitea`)
|
|
|
|
## Mise à jour (à suivre pour les prochains /deploy)
|
|
|
|
1. **Voie normale — push git, le CI build + rollout auto** :
|
|
```bash
|
|
git push gitea main
|
|
```
|
|
|
|
2. **Voie manuelle** (si Docker Desktop tourne sur le Mac) :
|
|
```bash
|
|
TAG=$(git rev-parse --short HEAD)
|
|
docker build --platform linux/amd64 -t git.arthurbarre.fr/ordinarthur/rubis:$TAG .
|
|
docker push git.arthurbarre.fr/ordinarthur/rubis:$TAG
|
|
kubectl --kubeconfig ~/dev/perso/proxmox/k3s/kubeconfig.yaml \
|
|
-n rubis set image deploy/rubis rubis=git.arthurbarre.fr/ordinarthur/rubis:$TAG
|
|
kubectl --kubeconfig ~/dev/perso/proxmox/k3s/kubeconfig.yaml \
|
|
-n rubis rollout status deploy/rubis
|
|
```
|
|
|
|
3. Si changement route/domaine : `cd ~/dev/perso/proxmox/ansible && ansible-playbook playbooks/gateway.yml`
|
|
|
|
4. Vérif : `curl -I https://rubis.arthurbarre.fr`
|
|
|
|
## Quand le domaine définitif sera acheté
|
|
|
|
1. Créer le record A chez OVH (ou autre registrar) : `<nouveau-domaine>` → `51.38.62.199`
|
|
2. Modifier la rule du fichier `~/dev/perso/proxmox/ansible/roles/traefik/templates/rubis.yml.j2` :
|
|
`Host(\`<nouveau-domaine>\`)`
|
|
3. Relancer le playbook `gateway.yml`
|
|
4. (Optionnel) supprimer le record DNS `rubis.arthurbarre.fr` si plus utilisé
|
|
|
|
## Stack
|
|
Landing statique, servie par **nginx:1.27-alpine** (Dockerfile à la racine, sert `public/`).
|
|
Le rebuild est rapide (pas de bundler).
|
|
|
|
## Déjà fait — NE PAS refaire
|
|
Dockerfile, manifests K3s, route Traefik (`rubis.yml.j2` + tâche dans `tasks/main.yml`),
|
|
DNS OVH (A record `rubis.arthurbarre.fr` id 5413044152), repo Gitea + secrets CI
|
|
(`KUBECONFIG`, `REGISTRY_PASSWORD`), namespace + secret registry K3s.
|
|
Les prochains `/deploy` font uniquement build + rollout via push git.
|