To test the GCP/GKE implementation, run:
./test-gcp.shThis automated script will guide you through all steps.
If you prefer to test manually:
# Set your GCP project
export PROJECT_ID="your-gcp-project-id"
gcloud config set project $PROJECT_ID
# Authenticate
gcloud auth application-default logingcloud services enable container.googleapis.com
gcloud services enable compute.googleapis.com
gcloud services enable sqladmin.googleapis.com
gcloud services enable redis.googleapis.com
gcloud services enable storage.googleapis.com
gcloud services enable servicenetworking.googleapis.comEdit test-gcp.tfvars and replace all instances of YOUR_GCP_PROJECT_ID with your actual project ID:
sed -i "s/YOUR_GCP_PROJECT_ID/$PROJECT_ID/g" test-gcp.tfvarsEdit .env and set these minimum required variables:
TF_VAR_postgres_password="secure-password-min-8-chars"
TF_VAR_redis_password="secure-password-min-16-chars"
TF_VAR_grafana_admin_password="secure-password-min-12-chars"
TF_VAR_oauth_admin_password="secure-password-min-16-chars"
TF_VAR_jwt_signing_key="random-32-char-string-for-jwt"
TF_VAR_state_encryption_key="random-32-char-string-for-state"
TF_VAR_ipfs_cluster_secret="64-char-hex-string-0123456789abcdef..."
TF_VAR_license_username="test-user"
TF_VAR_license_password="test-pass"
TF_VAR_license_signature="test-sig"
TF_VAR_license_email="test@example.com"
TF_VAR_license_expiration_date="2026-12-31"set -a
source .env
set +aterraform plan -var-file=test-gcp.tfvarsterraform apply -var-file=test-gcp.tfvarsExpected deployment time: 15-20 minutes
# Configure kubectl
gcloud container clusters get-credentials btp-test-cluster \
--region=us-central1 --project=$PROJECT_ID
# Check nodes
kubectl get nodes
# Check namespaces
kubectl get namespaces
# Check pods
kubectl get pods -A
# View outputs
terraform outputThe test configuration deploys a minimal stack:
- GKE Cluster: 1-3 node autoscaling pool (e2-medium instances)
- Cloud SQL PostgreSQL: db-f1-micro instance (smallest tier)
- Memorystore Redis: 1GB BASIC tier
- Cloud Storage: Single bucket with auto-generated name
- cert-manager: For TLS certificate management
- nginx-ingress: For ingress/load balancing
- kube-prometheus-stack: Monitoring (Prometheus, Grafana, AlertManager)
- Loki: Log aggregation
- SettleMint BTP platform (disabled in test config)
Approximate monthly costs for test deployment:
| Resource | Cost/Month (US) |
|---|---|
| GKE cluster (1-3 nodes) | $70-150 |
| Cloud SQL (db-f1-micro) | $15 |
| Memorystore Redis (1GB BASIC) | $30 |
| Cloud Storage | <$1 |
| Networking (egress) | $5-10 |
| Total | ~$120-200/month |
Important: Destroy resources when not in use to avoid charges!
Error: Error creating instance: googleapi: Error 403: Access Not Configured...
Solution: Enable the required API:
gcloud services enable [api-name].googleapis.comError: oauth2: "invalid_grant" "Bad Request"
Solution: Re-authenticate:
gcloud auth application-default loginError: Failed to retrieve project, pid: , err: project: required field is not set
Solution: Update all YOUR_GCP_PROJECT_ID in test-gcp.tfvars with your actual project ID.
Error: Quota '...' exceeded. Limit: X.0
Solution:
- Request quota increase in GCP Console
- Or use a different region with available quota
Error: Error, failed to create service networking connection...
Solution: If using private networking, you need to create a private service connection first. For testing, use public IPs (ipv4_enabled = true).
If you have a real domain, you can test DNS integration:
- Create a Cloud DNS managed zone:
gcloud dns managed-zones create btp-zone \
--dns-name="test-btp.example.com." \
--description="BTP test zone"- Update
test-gcp.tfvars:
dns = {
mode = "gcp"
gcp = {
project = "your-project-id"
managed_zone = "btp-zone"
main_record_value = "LOAD_BALANCER_IP" # Get from: kubectl get svc -n btp-deps ingress-nginx-controller
}
}- Update your domain's nameservers to use Cloud DNS nameservers (from managed zone details).
To destroy all resources:
terraform destroy -var-file=test-gcp.tfvarsWarning: This will delete all resources including:
- GKE cluster and all workloads
- Cloud SQL database (all data lost)
- Cloud Storage bucket (all files lost)
- Redis instance (all cache data lost)
- Enable BTP Platform: Set
btp.enabled = truein config - Configure Production Settings:
- Use larger instance types
- Enable high availability (REGIONAL availability_type)
- Enable private networking
- Set up proper DNS
- Configure OAuth credentials
- Set up CI/CD: Integrate with your deployment pipeline
- Configure Monitoring: Set up alerts in Grafana
- Backup Strategy: Configure automated backups for Cloud SQL
If you encounter issues:
- Check the troubleshooting section above
- Review GCP logs:
gcloud logging read - Check Terraform state:
terraform show - Review GCP Console for resource status