- Add Gitea Actions workflow for automated build & deploy - Add K8s manifests: webui, travel-svc, medicine-svc, sandbox-svc - Update kustomization for localhost:5000 registry - Add ingress for gooseek.ru and api.gooseek.ru - Learning cabinet with onboarding, courses, sandbox integration - Medicine service with symptom analysis and doctor matching - Travel service with itinerary planning - Server setup scripts (NVIDIA/CUDA, K3s, Gitea runner) Made-with: Cursor
56 lines
1.6 KiB
Bash
56 lines
1.6 KiB
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
echo "=== Installing Helm ==="
|
|
cd /tmp
|
|
curl -fsSL https://get.helm.sh/helm-v3.17.0-linux-amd64.tar.gz -o helm.tar.gz
|
|
tar -zxf helm.tar.gz
|
|
mv linux-amd64/helm /usr/local/bin/helm
|
|
rm -rf linux-amd64 helm.tar.gz
|
|
helm version
|
|
|
|
echo "=== Adding Helm repos ==="
|
|
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
|
|
helm repo add jetstack https://charts.jetstack.io
|
|
helm repo update
|
|
|
|
echo "=== Installing Nginx Ingress Controller ==="
|
|
helm upgrade --install ingress-nginx ingress-nginx/ingress-nginx \
|
|
--namespace ingress-nginx --create-namespace \
|
|
--set controller.hostNetwork=true \
|
|
--set controller.kind=DaemonSet \
|
|
--set controller.service.type=ClusterIP \
|
|
--wait --timeout 300s
|
|
|
|
echo "=== Installing Cert-Manager ==="
|
|
helm upgrade --install cert-manager jetstack/cert-manager \
|
|
--namespace cert-manager --create-namespace \
|
|
--set crds.enabled=true \
|
|
--wait --timeout 300s
|
|
|
|
echo "=== Creating Let's Encrypt ClusterIssuer ==="
|
|
cat <<'EOF' | kubectl apply -f -
|
|
apiVersion: cert-manager.io/v1
|
|
kind: ClusterIssuer
|
|
metadata:
|
|
name: letsencrypt-prod
|
|
spec:
|
|
acme:
|
|
server: https://acme-v02.api.letsencrypt.org/directory
|
|
email: admin@gooseek.ru
|
|
privateKeySecretRef:
|
|
name: letsencrypt-prod
|
|
solvers:
|
|
- http01:
|
|
ingress:
|
|
class: nginx
|
|
EOF
|
|
|
|
echo "=== Creating namespaces ==="
|
|
kubectl create namespace gooseek --dry-run=client -o yaml | kubectl apply -f -
|
|
kubectl create namespace gitea --dry-run=client -o yaml | kubectl apply -f -
|
|
|
|
echo "=== Done! Checking status ==="
|
|
kubectl get nodes
|
|
kubectl get pods -A
|