- React-style static web portal with Tailwind CSS - OS detection (Debian/Ubuntu, Fedora, Arch, Generic) - Dynamic install commands (apt://, appstream://, flatpak) - 9 pre-configured applications - Kubernetes: 2 replicas, LoadBalancer service, Nginx ingress - GitLab Container Registry (git.giaco.net/capitano/webapplinux) - Namespace: linuxwebapp - Added Dockerfile, nginx.conf, deploy.sh, docker-compose.yml - Updated README.md with deployment instructions
2.5 KiB
2.5 KiB
Linux App Store - Kubernetes Deployment
Deploy
Prerequisiti
- Cluster Kubernetes attivo (es.
10.66.200.x/24) - kubectl configurato
- Container registry privato (GitLab:
git.giaco.net) - Personal Access Token per il registry
Build e Deploy
# Login al registry GitLab
echo "<GITLAB_TOKEN>" | docker login git.giaco.net -u capitano --password-stdin
# Build l'immagine
docker build -t git.giaco.net/capitano/webapplinux:latest .
# Push su registry
docker push git.giaco.net/capitano/webapplinux:latest
# Deploy su Kubernetes
kubectl apply -f k8s/namespace.yaml
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yaml
kubectl apply -f k8s/ingress.yaml
# Verifica
kubectl get pods -n linuxwebapp
kubectl get svc -n linuxwebapp
kubectl get ingress -n linuxwebapp
# Log
kubectl logs -l app=linux-app-store -n linuxwebapp -f
Accesso al portale
Il portale è accessibile tramite ingress nginx all'indirizzo:
- URL:
http://apps.local/
Per raggiungerlo localmente, aggiungi una entry nel file /etc/hosts:
10.66.200.211 apps.local
(sostituisci 10.66.200.211 con l'IP del tuo Ingress controller)
File struttura
webapplinux/
├── Dockerfile # Dockerfile Nginx
├── docker-compose.yml # Compose per sviluppo locale
├── nginx.conf # Configurazione Nginx
├── README.md # Questo file
├── frontend/
│ ├── index.html # Pagina principale
│ ├── script.js # Logica OS detection & install
│ └── apps.json # Database applicazioni
└── k8s/
├── namespace.yaml # Namespace linuxwebapp
├── deployment.yaml # Deployment (2 repliche, git registry)
├── service.yaml # Service (ClusterIP)
└── ingress.yaml # Ingress (dominio apps.local)
Customizzazione
- Applicazioni: Modifica
frontend/apps.jsonper aggiungere/rimuovere app - Nginx: Aggiorna
nginx.confper routing personalizzato - Risorse: Modifica
k8s/deployment.yamlper cpu/memory - Immagine: Cambia
imagenel deployment per usare un altro registry
Rimozione
kubectl delete -f k8s/ingress.yaml
kubectl delete -f k8s/service.yaml
kubectl delete -f k8s/deployment.yaml
kubectl delete -f k8s/namespace.yaml
CI/CD
Usa il file .gitlab-ci.yml (da creare) per automatizzare:
- Build dell'immagine
- Push su GitLab registry
- Deploy automatico in Kubernetes