feat: CI/CD pipeline + Learning/Medicine/Travel services
- 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
This commit is contained in:
65
backend/deploy/scripts/setup-gitea-runner.sh
Normal file
65
backend/deploy/scripts/setup-gitea-runner.sh
Normal file
@@ -0,0 +1,65 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
|
||||
|
||||
echo "=== Enabling Gitea Actions ==="
|
||||
# Update Gitea config to enable actions
|
||||
kubectl -n gitea exec deploy/gitea -- sh -c '
|
||||
cat >> /data/gitea/conf/app.ini << EOF
|
||||
|
||||
[actions]
|
||||
ENABLED = true
|
||||
DEFAULT_ACTIONS_URL = https://github.com
|
||||
EOF
|
||||
'
|
||||
|
||||
echo "=== Restarting Gitea ==="
|
||||
kubectl -n gitea rollout restart deploy/gitea
|
||||
kubectl -n gitea rollout status deploy/gitea --timeout=120s
|
||||
|
||||
echo "=== Installing Act Runner ==="
|
||||
cd /tmp
|
||||
curl -sL https://gitea.com/gitea/act_runner/releases/download/v0.2.11/act_runner-0.2.11-linux-amd64 -o act_runner
|
||||
chmod +x act_runner
|
||||
mv act_runner /usr/local/bin/
|
||||
|
||||
echo "=== Creating runner service ==="
|
||||
mkdir -p /opt/gitea-runner
|
||||
cd /opt/gitea-runner
|
||||
|
||||
# Create config
|
||||
cat > config.yaml << 'EOF'
|
||||
log:
|
||||
level: info
|
||||
runner:
|
||||
file: .runner
|
||||
capacity: 2
|
||||
timeout: 3h
|
||||
insecure: false
|
||||
fetch_timeout: 5s
|
||||
fetch_interval: 2s
|
||||
labels:
|
||||
- ubuntu-latest:docker://node:20-bullseye
|
||||
- ubuntu-22.04:docker://node:20-bullseye
|
||||
cache:
|
||||
enabled: true
|
||||
dir: /opt/gitea-runner/cache
|
||||
container:
|
||||
network: host
|
||||
privileged: true
|
||||
options:
|
||||
workdir_parent:
|
||||
valid_volumes:
|
||||
- /opt/gitea-runner/cache
|
||||
host:
|
||||
workdir_parent: /opt/gitea-runner/workspace
|
||||
EOF
|
||||
|
||||
echo "=== Runner installed ==="
|
||||
echo ""
|
||||
echo "NEXT STEPS:"
|
||||
echo "1. Go to https://git.gooseek.ru and register/login as admin"
|
||||
echo "2. Go to Site Administration -> Actions -> Runners"
|
||||
echo "3. Click 'Create new Runner' and copy the registration token"
|
||||
echo "4. Run: act_runner register --config /opt/gitea-runner/config.yaml --instance https://git.gooseek.ru --token YOUR_TOKEN"
|
||||
echo "5. Run: act_runner daemon --config /opt/gitea-runner/config.yaml"
|
||||
Reference in New Issue
Block a user