This repository contains ArgoCD manifests and tools for deploying and testing Couchbase on OpenShift with integrated Prometheus monitoring.
A complete GitOps-based Couchbase deployment solution featuring:
- ArgoCD Applications: Declarative deployment using App of Apps pattern
- Couchbase Operator: Automated cluster management
- Multi-bucket Setup: Pre-configured buckets for different workloads
- RBAC Configuration: User management and role bindings
- Prometheus Integration: Full metrics export to user-workload-monitoring
- Performance Testing: Tools and scripts for benchmarking
- Backup & Recovery: Automated backup configurations
couchbase-performance/
βββ argocd/ # ArgoCD deployment manifests
β βββ main/ # Bootstrap: project, app-of-apps, PreSync (cluster-configuration)
β β βββ app-of-apps.yaml # Root application (syncs argocd/main)
β β βββ project.yaml
β β βββ kustomization.yaml
β βββ applications/ # Individual app definitions
β β βββ couchbase-operator-app.yaml
β β βββ couchbase-cluster-app.yaml
β β βββ couchbase-monitoring-app.yaml
β βββ manifests/
β β βββ couchbase/ # Couchbase Kubernetes resources
β β βββ operator/ # Operator installation
β β βββ cluster/ # Cluster configuration
β β βββ monitoring/ # Prometheus integration
β βββ deploy.sh # Deployment script
β βββ cleanup.sh # Cleanup script
β βββ verify.sh # Verification script
β βββ README.md # ArgoCD documentation
β βββ CONFIGURATION.md # Configuration guide
β βββ PROMETHEUS_QUERIES.md # Useful Prometheus queries
βββ performance/ # Performance testing tools
βββ PERFORMANCE_TESTING.md # Testing guide
- OpenShift 4.12+ cluster
- ArgoCD installed on the cluster
kubectlCLI configured (orocon OpenShift)- User Workload Monitoring enabled
-
Clone the repository:
git clone https://github.com/your-org/couchbase-performance.git cd couchbase-performance -
Update repository URL in ArgoCD manifests:
export REPO_URL="https://github.com/your-org/couchbase-performance.git" sed -i "s|repoURL:.*|repoURL: ${REPO_URL}|g" argocd/main/app-of-apps.yaml argocd/applications/*.yaml
-
Deploy using the script:
cd argocd ./deploy.sh -
Verify deployment:
./verify.sh
# Get Admin UI URL
kubectl get ingress -n couchbase
# Default credentials (CHANGE IN PRODUCTION!)
Username: Administrator
Password: P@ssw0rd123!-
OpenShift Console: Navigate to Observe β Metrics
-
Query examples:
# Operations per second rate(couchbase_bucket_ops_total[5m]) # Memory usage couchbase_bucket_mem_used_bytes / 1024 / 1024 / 1024 # Item count couchbase_bucket_item_count -
See more queries: Check
argocd/PROMETHEUS_QUERIES.md
Import the provided dashboard from argocd/manifests/couchbase/monitoring/grafana-dashboard.yaml
- Cluster domain:
apps.ocp.sa-iberia.lab.eng.brq2.redhat.com - Admin UI: https://couchbase-admin.apps.ocp.sa-iberia.lab.eng.brq2.redhat.com (TLS via cert-manager, cluster-issuer: lab-ca-issuer)
- Client (SDK): couchbase-client.apps.ocp.sa-iberia.lab.eng.brq2.redhat.com (passthrough)
Edit argocd/manifests/couchbase/cluster/cluster.yaml:
servers:
- name: data
size: 2 # Data + index + query (change as needed)
- name: analytics
size: 1 # Analytics + eventing (3 replicas total by default)cluster:
dataServiceMemoryQuota: 2Gi # Adjust as needed
indexServiceMemoryQuota: 1GiEdit argocd/manifests/couchbase/cluster/buckets.yaml or add new bucket definitions.
See detailed configuration guide: argocd/CONFIGURATION.md
The repository includes performance testing tools and guides.
See: performance/PERFORMANCE_TESTING.md
# Generate load
kubectl exec -it -n couchbase couchbase-cluster-0000 -- \
cbc-pillowfight \
-U couchbase://localhost/performance \
-u performance-user \
-P P3rf0rm@nce! \
--num-items 100000 \
--num-threads 4| User | Password | Purpose |
|---|---|---|
| Administrator | P@ssw0rd123! | Cluster admin |
| performance-user | P3rf0rm@nce! | Application user |
| readonly-user | R3ad0nly! | Read-only access |
# Update admin password
kubectl create secret generic cb-admin-auth \
--from-literal=username=Administrator \
--from-literal=password=YourNewPassword \
--dry-run=client -o yaml | kubectl apply -n couchbase -f -
# Restart cluster to apply
kubectl rollout restart statefulset -n couchbase -l app=couchbaseConfigured in argocd/manifests/couchbase/cluster/backup.yaml:
- Full backup: Weekly (Sunday 2 AM)
- Incremental backup: Daily (Monday-Saturday 2 AM)
- Retention: 30 days
# Trigger manual backup
kubectl create -f - <<EOF
apiVersion: couchbase.com/v2
kind: CouchbaseBackupRestore
metadata:
name: manual-backup-$(date +%Y%m%d)
namespace: couchbase
spec:
backup: couchbase-backup-plan
action: backup
EOF- ArgoCD README: Deployment guide
- Configuration Guide: Detailed configuration options
- Prometheus Queries: Useful monitoring queries
- Performance Testing: Load testing guide
argocd app get couchbase-cluster# Operator logs
kubectl logs -n couchbase -l app.kubernetes.io/name=couchbase-operator --tail=100
# Couchbase logs
kubectl logs -n couchbase -l app=couchbase --tail=100- Pods not starting: Check storage class availability
- Metrics not showing: Verify user-workload-monitoring is enabled
- Connection refused: Check network policies and routes
See detailed troubleshooting: argocd/CONFIGURATION.md#troubleshooting
Use the ApplicationSet for deploying across multiple environments:
kubectl apply -f argocd/applicationset.yamlThis creates separate deployments for dev, staging, and production with appropriate sizing.
Remove all Couchbase resources:
cd argocd
./cleanup.sh- Fork the repository
- Create a feature branch
- Make your changes
- Test in a dev environment
- Submit a pull request
This project is licensed under the GNU General Public License v2.0 (GPL-2). See LICENSE for the full text.
For issues and questions:
- Open a GitHub issue
- Contact: [your-email@example.com]