A complete deployment solution for the Bank of Anthos application, featuring automated CI/CD pipeline and GitOps-based Kubernetes deployment. This project consists of two repositories working together to provide a full development to deployment workflow.
The project is split across two repositories:
-
Bank of Anthos Application Build
- Handles CI/CD pipeline
- Builds Docker images
- Automated using Jenkins
- Pushes images to Docker Hub
-
Bank of Anthos Kubernetes Deployment
- Contains Kubernetes manifests
- Uses GitOps with ArgoCD
- Manages environment configurations
- Handles automatic image updates
- Frontend: Web UI interface
- Account Services:
- Userservice: Authentication & user management
- Contacts: Contact management
- Transaction Services:
- Ledgerwriter: Writes transactions
- Balancereader: Checks balances
- Transactionhistory: Shows transaction history
- Databases:
- Accountsdb: Stores user data
- Ledgerdb: Stores transactions
- Code changes pushed to app repository
- Jenkins triggers automated build
- Docker images built and pushed to Docker Hub
- ArgoCD detects new images
- Automatic deployment to Kubernetes cluster
- Kubernetes cluster (1.19+)
- kubectl configured
- ArgoCD installed
- Jenkins server (for CI/CD)
- Docker Hub account
- Setup Jenkins Pipeline:
# Configure Jenkins with repository credentials # Set up Docker Hub authentication # Create pipeline using Jenkinsfile
- Create Kubernetes Namespace:
- kubectl create namespace dev
- Create JWT Secret:
- kubectl create secret generic jwt-key \ --from-file=k8-Application/jwtRS256.key \ --from-file=k8-Application/jwtRS256.key.pub \ -n dev
- Deploy via ArgoCD:
- kubectl apply -f k8-Application/application-dev.yaml
Configuration Key ConfigMaps
- environment-config: Basic settings
- service-api-config: Service endpoints
- demo-data-config: Demo user data
- gcp-settings: GCP features
- jwt-key: Authentication
Important Environment Variables
- ENABLE_TRACING: Toggle tracing
- ENABLE_METRICS: Toggle metrics
- LOCAL_ROUTING_NUM: Bank routing number
- PUB_KEY_PATH: JWT public key path
Troubleshooting Common issues and solutions:
- Pod startup failures: Check JWT secret
- Image pull errors: Verify Docker Hub access
- Service connection issues: Check ConfigMaps