first commit
This commit is contained in:
66
README.md
Normal file
66
README.md
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
# Linux App Store - Kubernetes Deployment
|
||||||
|
|
||||||
|
## Deploy
|
||||||
|
|
||||||
|
### Prerequisiti
|
||||||
|
|
||||||
|
- Cluster Kubernetes attivo
|
||||||
|
- kubectl configurato
|
||||||
|
- Container registry accessibile (Docker Hub o privato)
|
||||||
|
|
||||||
|
### Build e Deploy
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Build l'immagine
|
||||||
|
docker build -t linux-app-store:latest .
|
||||||
|
|
||||||
|
# Tagga per il push
|
||||||
|
docker tag linux-app-store:latest <username>/linux-app-store:latest
|
||||||
|
|
||||||
|
# Push su registry
|
||||||
|
docker push <username>/linux-app-store:latest
|
||||||
|
|
||||||
|
# Deploy su Kubernetes
|
||||||
|
kubectl apply -f k8s/deployment.yaml
|
||||||
|
kubectl apply -f k8s/service.yaml
|
||||||
|
kubectl apply -f k8s/ingress.yaml
|
||||||
|
|
||||||
|
# Verifica
|
||||||
|
kubectl get pods
|
||||||
|
kubectl get svc
|
||||||
|
kubectl get ingress
|
||||||
|
|
||||||
|
# Log
|
||||||
|
kubectl logs -l app=linux-app-store -f
|
||||||
|
```
|
||||||
|
|
||||||
|
### File struttura
|
||||||
|
|
||||||
|
```
|
||||||
|
infrastructure/
|
||||||
|
├── Dockerfile # Dockerfile multi-stage (Nginx)
|
||||||
|
├── Dockerfile.simple # Dockerfile semplificato
|
||||||
|
├── nginx.conf # Configurazione Nginx
|
||||||
|
├── frontend/
|
||||||
|
│ ├── index.html # Pagina principale
|
||||||
|
│ ├── script.js # Logica dell'app
|
||||||
|
│ └── apps.json # Database applicazioni
|
||||||
|
└── k8s/
|
||||||
|
├── deployment.yaml # Kubernetes Deployment (2.repliche)
|
||||||
|
├── service.yaml # Service (ClusterIP)
|
||||||
|
└── ingress.yaml # Ingress (dominio apps.local)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Customizzazione
|
||||||
|
|
||||||
|
1. Modificare `frontend/apps.json` per aggiungere rimuovere applicazioni
|
||||||
|
2. Aggiornare `nginx.conf` per personalizzare le regole di routing
|
||||||
|
3. Modificare `k8s/deployment.yaml` per aggiornare le risorse o le immagini
|
||||||
|
|
||||||
|
### Rimozione
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl delete -f k8s/ingress.yaml
|
||||||
|
kubectl delete -f k8s/service.yaml
|
||||||
|
kubectl delete -f k8s/deployment.yaml
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user