This guide walks through setting up cloud-based container testing for PseudoScribe using the pseudoscribe-agent infrastructure, eliminating local Podman virtualization issues.
- Access to Intuit's Jenkins CI/CD environment
- Kubernetes cluster access via Service Paved Road
- Container registry permissions (
docker.intuit.com) - Git repository with appropriate branch permissions
Copy the following files from this setup to your Jenkins pipeline:
# Kubernetes pod configuration
cp pseudoscribe/KubernetesPods-PseudoScribe.yaml .jenkins/
# Jenkins pipeline
cp pseudoscribe/Jenkinsfile-PseudoScribe Jenkinsfile
# Cloud test script
cp pseudoscribe/scripts/test-containers-cloud.sh scripts/
chmod +x scripts/test-containers-cloud.sh-
Update Jenkins Job Configuration:
- Point to
Jenkinsfile-PseudoScribe - Set Kubernetes YAML file path to
KubernetesPods-PseudoScribe.yaml
- Point to
-
Environment Variables:
environment { PSEUDOSCRIBE_ENV = 'test' DATABASE_URL = 'postgresql://test_user:test_password@localhost:5432/pseudoscribe_test' OLLAMA_BASE_URL = 'http://localhost:11434' REDIS_URL = 'redis://localhost:6379' }
Run the pipeline to execute cloud-based container tests:
# Trigger via Jenkins UI or webhook
# Tests will run in Kubernetes pods automaticallyThe cloud testing environment includes:
-
Podman Container:
docker.intuit.com/oicp/standard/podman:latest- Container build and runtime operations
- Isolated container storage (10GB)
- Security capabilities for container operations
-
PostgreSQL Database:
docker.intuit.com/postgres:13- Test database with pre-configured credentials
- Isolated storage (2GB)
- Automatic initialization
-
Ollama AI Service:
docker.intuit.com/ollama/ollama:latest- Local AI model testing
- Model caching (5GB storage)
- API endpoint for AI operations
-
Redis Cache:
docker.intuit.com/redis:7-alpine- Session and cache management
- High-performance in-memory operations
-
Test Runner: Python 3.12 environment
- Test execution and reporting
- Dependency management
- Result collection
Pod Resources:
Total Limits: 12GB RAM, 6 CPU cores
Total Requests: 8GB RAM, 4 CPU cores
Per Container:
- Podman: 4GB RAM, 2 CPU (limits)
- PostgreSQL: 1GB RAM, 500m CPU (limits)
- Ollama: 4GB RAM, 2 CPU (limits)
- Redis: 512MB RAM, 250m CPU (limits)
- Test Runner: 2GB RAM, 1 CPU (limits)- PostgreSQL database connection
- Redis cache connectivity
- Ollama AI service availability
- Network communication between services
- PseudoScribe application container build
- Multi-stage build validation
- Image security scanning
- Build artifact verification
- Container startup and health checks
- API endpoint availability
- Service integration validation
- Container networking tests
- End-to-end workflow testing
- Database integration
- AI model integration
- Cache layer integration
- Container startup time
- API response times
- Resource utilization
- Concurrent request handling
- Container vulnerability scanning
- Dependency security checks
- Runtime security validation
- Access control verification
- Prepare Workspace: Copy code, install dependencies
- Initialize Services: Start PostgreSQL, Redis, Ollama
- Lint: Code style and formatting checks
- Type Check: Static type analysis
- Security Scan: Dependency vulnerability scanning
- Python unit tests with coverage
- Test result publishing
- Coverage reporting
- Build Containers: Application and test containers
- Container Tests: Cloud container test execution
- Service integration validation
- Database connectivity tests
- AI model integration tests
- Load testing
- Performance benchmarking
- Resource utilization analysis
- Full application stack testing
- User workflow validation
- Cross-service communication
- Container image vulnerability scanning
- Runtime security validation
- Container image publishing
- Artifact archiving
Defines the Kubernetes pod specification with all required containers and resources.
Complete Jenkins pipeline with all test stages, parallel execution, and proper error handling.
Cloud-optimized test script that validates all services and runs comprehensive container tests.
- No Virtualization Issues: Eliminates vfkit/gvproxy problems
- Consistent Environment: Same runtime for all developers
- Parallel Execution: Multiple test suites run simultaneously
- Enterprise Security: Hardened container images
- Faster Feedback: Cloud resources provide faster test execution
- No Local Setup: Developers don't need local container runtime
- Shared Results: Test results visible to entire team
- Automatic Cleanup: Resources cleaned up after tests
- Cost Efficiency: Pay-per-use cloud resources
- Scalability: Auto-scaling based on test load
- Reliability: Enterprise-grade infrastructure
- Monitoring: Built-in observability and logging
-
Pod Startup Failures
- Check resource limits and requests
- Verify image pull permissions
- Review Kubernetes events
-
Service Connectivity Issues
- Verify port configurations
- Check service readiness probes
- Review network policies
-
Test Failures
- Check test result artifacts
- Review container logs
- Verify environment variables
# Check pod status
kubectl get pods -l app=pseudoscribe-test
# View pod logs
kubectl logs <pod-name> -c <container-name>
# Describe pod for events
kubectl describe pod <pod-name>
# Access pod for debugging
kubectl exec -it <pod-name> -c test-runner -- /bin/bash- Replace local test scripts with cloud versions
- Update Jenkins pipeline configuration
- Configure Kubernetes pod specifications
- Update connection strings for containerized services
- Modify file paths for cloud environment
- Adjust timeouts for cloud networking
- Ensure all existing tests run in cloud environment
- Verify test results match local execution
- Add cloud-specific tests as needed
- Document new development workflow
- Train team on cloud testing environment
- Establish monitoring and alerting
- Deploy Infrastructure: Apply Kubernetes and Jenkins configurations
- Run Initial Tests: Execute pipeline to validate setup
- Monitor Performance: Track test execution times and resource usage
- Optimize Configuration: Adjust resources based on actual usage
- Team Training: Onboard development team to new workflow
This cloud-based approach provides a robust, scalable, and maintainable solution for PseudoScribe container testing while eliminating local virtualization issues.