|
45 | 45 | uses: localstack/[email protected] |
46 | 46 | with: |
47 | 47 | install-awslocal: true |
| 48 | + - name: Verify LocalStack is running |
| 49 | + run: | |
| 50 | + echo "Checking LocalStack status..." |
| 51 | + curl -s http://localhost:4566/_localstack/health | head -10 || echo "LocalStack health check failed" |
| 52 | + # Check if LocalStack container is running |
| 53 | + docker ps | grep localstack || echo "No LocalStack container found" |
| 54 | + # Show LocalStack container network info |
| 55 | + docker ps --format "{{.Names}}" | grep -i localstack | head -1 | xargs -I {} docker inspect {} --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' || echo "Could not get LocalStack IP" |
48 | 56 | - name: Create S3 bucket for tests (host LocalStack) |
49 | 57 | run: | |
50 | 58 | awslocal s3 mb s3://$AWS_STACK_NAME || true |
|
56 | 64 | # No port mapping needed - LocalStack is on host, accessible via host.k3d.internal:4566 |
57 | 65 | k3d cluster create unity-builder --agents 1 --wait |
58 | 66 | kubectl config current-context | cat |
59 | | - - name: Verify cluster readiness |
| 67 | + - name: Verify cluster readiness and LocalStack connectivity |
60 | 68 | timeout-minutes: 2 |
61 | 69 | run: | |
62 | 70 | for i in {1..60}; do |
|
71 | 79 | kubectl get storageclass |
72 | 80 | # Show node resources |
73 | 81 | kubectl describe nodes | grep -A 5 "Allocated resources" || true |
| 82 | + # Test LocalStack connectivity from k3d cluster |
| 83 | + echo "Testing LocalStack connectivity from k3d cluster..." |
| 84 | + echo "From host (should work):" |
| 85 | + curl -s --max-time 5 http://localhost:4566/_localstack/health | head -5 || echo "Host connectivity failed" |
| 86 | + echo "From k3d cluster via host.k3d.internal:" |
| 87 | + kubectl run test-localstack --image=curlimages/curl --rm -i --restart=Never --timeout=10s -- \ |
| 88 | + curl -v --max-time 5 http://host.k3d.internal:4566/_localstack/health 2>&1 | head -20 || \ |
| 89 | + echo "Cluster connectivity test - if this fails, LocalStack may not be accessible from k3d" |
74 | 90 | # Clean up disk space on the k3d node to prevent evictions |
75 | 91 | echo "Cleaning up disk space on k3d nodes..." |
76 | 92 | docker exec k3d-unity-builder-agent-0 sh -c "df -h && docker system prune -af --volumes || true" || true |
|
0 commit comments