Files
flowfish/scripts/test-local-neo4j.sh
taylanbakircioglu 6e503368f7 feat: L7 (Application Level) observability — Service Map, Trace Explorer, APM, Beyla
- Grafana Beyla DaemonSet for kernel-level HTTP/gRPC/DNS capture (passive,
  zero application changes, W3C traceparent header propagation)
- flowfish-l7-collector in-cluster bridge: OTLP receiver + buffered pull API
- L7 Ingestion Service: K8s service-proxy poll → enrich → RabbitMQ
- ClickHouse l7_http_flows / l7_grpc_flows / l7_dns_flows + APM RED MVs
- Neo4j L7Workload nodes + SAME_WORKLOAD cross-cluster bridges
- New pages: Service Map, Trace Explorer, APM Services List, APM Service Detail
- Analysis Wizard now supports L4 / L7 / Both modes with HTTP/gRPC/DNS picks
- Integration Hub gains L7 dependency summary + tree-summary integrations
- Multi-Cluster Management: dual-agent install (Inspector Gadget L4 + Beyla L7),
  runtime OpenShift detection so SCCs auto-install with kubectl too
- ServiceMap edge → Trace Explorer drill-down with virtual_trace_id correlation
- Docs: new L7 architecture diagram, README L7 sections, 3 new screenshots
2026-05-14 10:09:15 +03:00

131 lines
3.5 KiB
Bash
Executable File

#!/bin/bash
set -e
echo "================================================"
echo "Testing Neo4j on Local Kubernetes"
echo "================================================"
# Test namespace
NAMESPACE="test-flowfish"
# Detect default StorageClass
STORAGE_CLASS=$(kubectl get storageclass -o jsonpath='{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io/is-default-class=="true")].metadata.name}')
if [ -z "$STORAGE_CLASS" ]; then
# Fallback: get first available StorageClass
STORAGE_CLASS=$(kubectl get storageclass -o jsonpath='{.items[0].metadata.name}')
fi
echo "Using StorageClass: $STORAGE_CLASS"
echo "Creating test namespace..."
kubectl create namespace $NAMESPACE --dry-run=client -o yaml | kubectl apply -f -
echo ""
echo "Preparing manifests..."
TEMP_DIR="/tmp/flowfish-neo4j-test"
mkdir -p $TEMP_DIR
# Copy manifests
cp deployment/kubernetes-manifests/07-neo4j.yaml $TEMP_DIR/
cp deployment/kubernetes-manifests/08-neo4j-init.yaml $TEMP_DIR/
# Create test secret
cat > $TEMP_DIR/secrets.yaml << 'EOF'
apiVersion: v1
kind: Secret
metadata:
name: flowfish-secrets
namespace: {{NAMESPACE}}
type: Opaque
stringData:
NEO4J_AUTH: "neo4j/testpassword123"
EOF
# Replace namespace in secret
sed -i '' "s/{{NAMESPACE}}/$NAMESPACE/g" $TEMP_DIR/secrets.yaml
# Replace placeholders
cd $TEMP_DIR
sed -i '' "s/{{OPENSHIFT_NAMESPACE}}/$NAMESPACE/g" *.yaml
sed -i '' "s/{{STORAGE_CLASS}}/$STORAGE_CLASS/g" *.yaml
echo ""
echo "Deploying Neo4j..."
kubectl apply -f secrets.yaml
kubectl apply -f 07-neo4j.yaml
echo ""
echo "================================================"
echo "Waiting for Neo4j to be ready..."
echo "================================================"
echo ""
echo "Waiting for Neo4j pod (this may take 60-90 seconds)..."
kubectl wait --for=condition=ready pod -l app=neo4j -n $NAMESPACE --timeout=5m || {
echo "❌ Neo4j failed to start!"
echo ""
echo "Pod status:"
kubectl get pods -n $NAMESPACE -l app=neo4j
echo ""
echo "Pod describe:"
kubectl describe pod -n $NAMESPACE -l app=neo4j
echo ""
echo "Neo4j logs:"
kubectl logs -n $NAMESPACE -l app=neo4j --tail=100 || true
exit 1
}
echo "✅ Neo4j is ready!"
echo ""
echo "Deploying Neo4j init job..."
kubectl apply -f 08-neo4j-init.yaml
echo ""
echo "Waiting for init job to complete..."
kubectl wait --for=condition=complete job/neo4j-init -n $NAMESPACE --timeout=3m || {
echo "❌ Init job failed!"
echo ""
echo "Job status:"
kubectl get job -n $NAMESPACE
echo ""
echo "Init logs:"
kubectl logs -n $NAMESPACE job/neo4j-init --tail=100 || true
exit 1
}
echo "✅ Init job completed!"
echo ""
echo "================================================"
echo "✅ NEO4J SUCCESSFULLY DEPLOYED!"
echo "================================================"
echo ""
echo "Pod Status:"
kubectl get pods -n $NAMESPACE -l app=neo4j
echo ""
echo "Service:"
kubectl get svc -n $NAMESPACE neo4j
echo ""
echo "================================================"
echo "Test Neo4j Connection:"
echo "================================================"
echo ""
echo "Port forward:"
echo " kubectl port-forward -n $NAMESPACE svc/neo4j 7474:7474 7687:7687"
echo ""
echo "Then open browser:"
echo " http://localhost:7474"
echo " Username: neo4j"
echo " Password: testpassword123"
echo ""
echo "Or use cypher-shell:"
echo " kubectl exec -it -n $NAMESPACE neo4j-0 -- cypher-shell -u neo4j -p testpassword123"
echo ""
echo "Cleanup:"
echo " kubectl delete namespace $NAMESPACE"
echo "================================================"