{"id":15221983,"url":"https://github.com/googlecloudplatform/bank-of-anthos","last_synced_at":"2025-05-14T10:07:34.203Z","repository":{"id":36990767,"uuid":"232396115","full_name":"GoogleCloudPlatform/bank-of-anthos","owner":"GoogleCloudPlatform","description":"Retail banking sample application showcasing Kubernetes and Google Cloud","archived":false,"fork":false,"pushed_at":"2025-03-22T03:20:35.000Z","size":7972,"stargazers_count":1059,"open_issues_count":29,"forks_count":615,"subscribers_count":51,"default_branch":"main","last_synced_at":"2025-04-09T09:56:45.728Z","etag":null,"topics":["fsi","gcp","google-cloud","kubernetes","reference-architecture","sample-app","samples"],"latest_commit_sha":null,"homepage":"https://cymbal-bank.fsi.cymbal.dev","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoogleCloudPlatform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-01-07T19:02:58.000Z","updated_at":"2025-04-04T14:16:15.000Z","dependencies_parsed_at":"2023-12-28T19:24:52.157Z","dependency_job_id":"f3b510ce-3892-4533-a991-6123f413ebd0","html_url":"https://github.com/GoogleCloudPlatform/bank-of-anthos","commit_stats":{"total_commits":1806,"total_committers":61,"mean_commits":29.60655737704918,"dds":"0.46677740863787376","last_synced_commit":"0246d4be61e5b688894d952d06b9baba99b6a75c"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fbank-of-anthos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fbank-of-anthos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fbank-of-anthos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fbank-of-anthos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoogleCloudPlatform","download_url":"https://codeload.github.com/GoogleCloudPlatform/bank-of-anthos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248337234,"owners_count":21086981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fsi","gcp","google-cloud","kubernetes","reference-architecture","sample-app","samples"],"created_at":"2024-09-28T15:09:32.391Z","updated_at":"2025-04-11T03:35:07.632Z","avatar_url":"https://github.com/GoogleCloudPlatform.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bank of Anthos\n\n![GitHub branch check runs](https://img.shields.io/github/check-runs/GoogleCloudPlatform/bank-of-anthos/main)\n[![Website](https://img.shields.io/website?url=https%3A%2F%2Fcymbal-bank.fsi.cymbal.dev%2F\u0026label=live%20demo\n)](https://cymbal-bank.fsi.cymbal.dev)\n\n**Bank of Anthos** is a sample HTTP-based web app that simulates a bank's payment processing network, allowing users to create artificial bank accounts and complete transactions.\n\nGoogle uses this application to demonstrate how developers can modernize enterprise applications using Google Cloud products, including: [Google Kubernetes Engine (GKE)](https://cloud.google.com/kubernetes-engine), [Anthos Service Mesh (ASM)](https://cloud.google.com/anthos/service-mesh), [Anthos Config Management (ACM)](https://cloud.google.com/anthos/config-management), [Migrate to Containers](https://cloud.google.com/migrate/containers), [Spring Cloud GCP](https://spring.io/projects/spring-cloud-gcp), [Cloud Operations](https://cloud.google.com/products/operations), [Cloud SQL](https://cloud.google.com/sql/docs), [Cloud Build](https://cloud.google.com/build), and [Cloud Deploy](https://cloud.google.com/deploy). This application works on any Kubernetes cluster.\n\nIf you are using Bank of Anthos, please ★Star this repository to show your interest!\n\n**Note to Googlers:** Please fill out the form at [go/bank-of-anthos-form](https://goto2.corp.google.com/bank-of-anthos-form).\n\n## Screenshots\n\n| Sign in                                                                                                        | Home                                                                                                    |\n| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |\n| [![Login](/docs/img/login.png)](/docs/img/login.png) | [![User Transactions](/docs/img/transactions.png)](/docs/img/transactions.png) |\n\n\n## Service architecture\n\n![Architecture Diagram](/docs/img/architecture.png)\n\n| Service                                                 | Language      | Description                                                                                                                                  |\n| ------------------------------------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| [frontend](/src/frontend)                              | Python        | Exposes an HTTP server to serve the website. Contains login page, signup page, and home page.                                                |\n| [ledger-writer](/src/ledger/ledgerwriter)              | Java          | Accepts and validates incoming transactions before writing them to the ledger.                                                               |\n| [balance-reader](/src/ledger/balancereader)            | Java          | Provides efficient readable cache of user balances, as read from `ledger-db`.                                                                |\n| [transaction-history](/src/ledger/transactionhistory)  | Java          | Provides efficient readable cache of past transactions, as read from `ledger-db`.                                                            |\n| [ledger-db](/src/ledger/ledger-db)                     | PostgreSQL    | Ledger of all transactions. Option to pre-populate with transactions for demo users.                                                         |\n| [user-service](/src/accounts/userservice)              | Python        | Manages user accounts and authentication. Signs JWTs used for authentication by other services.                                              |\n| [contacts](/src/accounts/contacts)                     | Python        | Stores list of other accounts associated with a user. Used for drop down in \"Send Payment\" and \"Deposit\" forms.                              |\n| [accounts-db](/src/accounts/accounts-db)               | PostgreSQL    | Database for user accounts and associated data. Option to pre-populate with demo users.                                                      |\n| [loadgenerator](/src/loadgenerator)                    | Python/Locust | Continuously sends requests imitating users to the frontend. Periodically creates new accounts and simulates transactions between them.      |\n\n## Interactive quickstart (GKE)\n\nThe following button opens up an interactive tutorial showing how to deploy Bank of Anthos in GKE:\n\n[![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://ssh.cloud.google.com/cloudshell/editor?show=ide\u0026cloudshell_git_repo=https://github.com/GoogleCloudPlatform/bank-of-anthos\u0026cloudshell_workspace=.\u0026cloudshell_tutorial=extras/cloudshell/tutorial.md)\n\n## Quickstart (GKE)\n\n1. Ensure you have the following requirements:\n   - [Google Cloud project](https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project).\n   - Shell environment with `gcloud`, `git`, and `kubectl`.\n\n2. Clone the repository.\n\n   ```sh\n   git clone https://github.com/GoogleCloudPlatform/bank-of-anthos\n   cd bank-of-anthos/\n   ```\n\n3. Set the Google Cloud project and region and ensure the Google Kubernetes Engine API is enabled.\n\n   ```sh\n   export PROJECT_ID=\u003cPROJECT_ID\u003e\n   export REGION=us-central1\n   gcloud services enable container.googleapis.com \\\n     --project=${PROJECT_ID}\n   ```\n\n   Substitute `\u003cPROJECT_ID\u003e` with the ID of your Google Cloud project.\n\n4. Create a GKE cluster and get the credentials for it.\n\n   ```sh\n   gcloud container clusters create-auto bank-of-anthos \\\n     --project=${PROJECT_ID} --region=${REGION}\n   ```\n\n   Creating the cluster may take a few minutes.\n\n5. Deploy Bank of Anthos to the cluster.\n\n   ```sh\n   kubectl apply -f ./extras/jwt/jwt-secret.yaml\n   kubectl apply -f ./kubernetes-manifests\n   ```\n\n6. Wait for the pods to be ready.\n\n   ```sh\n   kubectl get pods\n   ```\n\n   After a few minutes, you should see the Pods in a `Running` state:\n\n   ```\n   NAME                                  READY   STATUS    RESTARTS   AGE\n   accounts-db-6f589464bc-6r7b7          1/1     Running   0          99s\n   balancereader-797bf6d7c5-8xvp6        1/1     Running   0          99s\n   contacts-769c4fb556-25pg2             1/1     Running   0          98s\n   frontend-7c96b54f6b-zkdbz             1/1     Running   0          98s\n   ledger-db-5b78474d4f-p6xcb            1/1     Running   0          98s\n   ledgerwriter-84bf44b95d-65mqf         1/1     Running   0          97s\n   loadgenerator-559667b6ff-4zsvb        1/1     Running   0          97s\n   transactionhistory-5569754896-z94cn   1/1     Running   0          97s\n   userservice-78dc876bff-pdhtl          1/1     Running   0          96s\n   ```\n\n7. Access the web frontend in a browser using the frontend's external IP.\n\n   ```sh\n   kubectl get service frontend | awk '{print $4}'\n   ```\n\n   Visit `http://EXTERNAL_IP` in a web browser to access your instance of Bank of Anthos.\n\n8. Once you are done with it, delete the GKE cluster.\n\n   ```sh\n   gcloud container clusters delete bank-of-anthos \\\n     --project=${PROJECT_ID} --region=${REGION}\n   ```\n\n   Deleting the cluster may take a few minutes.\n\n## Additional deployment options\n\n- **Workload Identity**: [See these instructions.](/docs/workload-identity.md)\n- **Cloud SQL**: [See these instructions](/extras/cloudsql) to replace the in-cluster databases with hosted Google Cloud SQL.\n- **Multi Cluster with Cloud SQL**: [See these instructions](/extras/cloudsql-multicluster) to replicate the app across two regions using GKE, Multi Cluster Ingress, and Google Cloud SQL.\n- **Istio**: [See these instructions](/extras/istio) to configure an IngressGateway.\n- **Anthos Service Mesh**: ASM requires Workload Identity to be enabled in your GKE cluster. [See the workload identity instructions](/docs/workload-identity.md) to configure and deploy the app. Then, apply `extras/istio/` to your cluster to configure frontend ingress.\n- **Java Monolith (VM)**: We provide a version of this app where the three Java microservices are coupled together into one monolithic service, which you can deploy inside a VM (eg. Google Compute Engine). See the [ledgermonolith](/src/ledgermonolith) directory.\n\n## Documentation\n\n\u003c!-- This section is duplicated in the docs/ README: https://github.com/GoogleCloudPlatform/bank-of-anthos/blob/main/docs/README.md --\u003e\n\n- [Development](/docs/development.md) to learn how to run and develop this app locally.\n- [Environments](/docs/environments.md) to learn how to deploy on non-GKE clusters.\n- [Workload Identity](/docs/workload-identity.md) to learn how to set-up Workload Identity.\n- [CI/CD pipeline](/docs/ci-cd-pipeline.md) to learn details about and how to set-up the CI/CD pipeline.\n- [Troubleshooting](/docs/troubleshooting.md) to learn how to resolve common problems.\n\n## Demos featuring Bank of Anthos\n- [Tutorial: Explore Anthos (Google Cloud docs)](https://cloud.google.com/anthos/docs/tutorials/explore-anthos)\n- [Tutorial: Migrating a monolith VM to GKE](https://cloud.google.com/migrate/containers/docs/migrating-monolith-vm-overview-setup)\n- [Tutorial: Running distributed services on GKE private clusters using ASM](https://cloud.google.com/service-mesh/docs/distributed-services-private-clusters)\n- [Tutorial: Run full-stack workloads at scale on GKE](https://cloud.google.com/kubernetes-engine/docs/tutorials/full-stack-scale)\n- [Architecture: Anthos on bare metal](https://cloud.google.com/architecture/ara-anthos-on-bare-metal)\n- [Architecture: Creating and deploying secured applications](https://cloud.google.com/architecture/security-foundations/creating-deploying-secured-apps)\n- [Keynote @ Google Cloud Next '20: Building trust for speedy innovation](https://www.youtube.com/watch?v=7QR1z35h_yc)\n- [Workshop @ IstioCon '22: Manage and secure distributed services with ASM](https://www.youtube.com/watch?v=--mPdAxovfE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecloudplatform%2Fbank-of-anthos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglecloudplatform%2Fbank-of-anthos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecloudplatform%2Fbank-of-anthos/lists"}