All Projects → GoogleCloudPlatform → Bank Of Anthos

GoogleCloudPlatform / Bank Of Anthos

Licence: apache-2.0
Anthos sample application for retail banking

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Bank Of Anthos

Terraform Up And Running Code
Code samples for the book "Terraform: Up & Running" by Yevgeniy Brikman
Stars: ✭ 1,739 (+905.2%)
Mutual labels:  samples
All Our Aggregates Are Wrong Demos
A microservices powered e-commerce shopping cart sample - based on SOA principles. Demos and sample for my "All our Aggregates are Wrong" talk
Stars: ✭ 130 (-24.86%)
Mutual labels:  samples
Add Ons Samples
Sample Google Workspace Add-ons
Stars: ✭ 159 (-8.09%)
Mutual labels:  samples
Go Samples
Go samples for Google Workspace APIs
Stars: ✭ 117 (-32.37%)
Mutual labels:  samples
Scala Samples
There are pieces of scala code that explain Scala syntax and related things - like what you can do with all this
Stars: ✭ 125 (-27.75%)
Mutual labels:  samples
Thinking In Spring Boot Samples
小马哥书籍《Spring Boot 编程思想》示例工程
Stars: ✭ 1,725 (+897.11%)
Mutual labels:  samples
Office Js Snippets
A collection of code snippets built with Script Lab
Stars: ✭ 108 (-37.57%)
Mutual labels:  samples
Azuremapscodesamples
A set of code samples for the Azure Maps web control.
Stars: ✭ 167 (-3.47%)
Mutual labels:  samples
Pnp Officeaddins
Office 365 solution guidance with practices and patterns for Office Add-in development.
Stars: ✭ 128 (-26.01%)
Mutual labels:  samples
Dotnetcore.samples
.NET Core Samples - Code it Yourself...
Stars: ✭ 147 (-15.03%)
Mutual labels:  samples
Android Places Demos
Google Places SDK Demos for Android
Stars: ✭ 118 (-31.79%)
Mutual labels:  samples
Demosify
Create a playground to show the demos of your projects.
Stars: ✭ 121 (-30.06%)
Mutual labels:  samples
Tone.js
A Web Audio framework for making interactive music in the browser.
Stars: ✭ 11,352 (+6461.85%)
Mutual labels:  samples
Animation Samples
Multiple samples showing the best practices in animation on Android.
Stars: ✭ 1,841 (+964.16%)
Mutual labels:  samples
Sweetie Data
This repo contains logstash of various honeypots
Stars: ✭ 163 (-5.78%)
Mutual labels:  samples
Composer Sample Applications
⚠️ ⚠️ ⚠️ Hyperledger Composer has been deprecated ⚠️ ⚠️ ⚠️
Stars: ✭ 110 (-36.42%)
Mutual labels:  samples
Vsphere Automation Sdk Java
Java samples, language bindings, and API reference documentation for vSphere, VMC, and NSX-T using the VMware REST API
Stars: ✭ 132 (-23.7%)
Mutual labels:  samples
Tonejs Instruments
A small instrument sample library with quick-loader for tone.js
Stars: ✭ 172 (-0.58%)
Mutual labels:  samples
Browser Samples
Web samples for Google Workspace APIs
Stars: ✭ 164 (-5.2%)
Mutual labels:  samples
Using Zf3 Book Samples
Samples for the Using Zend Framework 3 book
Stars: ✭ 143 (-17.34%)
Mutual labels:  samples

Continuous Integration

Bank of Anthos

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.

Google uses this application to demonstrate how developers can modernize enterprise applications using GCP products, including: GKE, Anthos Service Mesh, Anthos Config Management, Migrate for Anthos, Spring Cloud GCP, and Cloud Operations. This application works on any Kubernetes cluster.

If you’re using this app, please ★Star the repository to show your interest!

👓 Note to Googlers: Please fill out the form at go/bank-of-anthos-form if you are using this application.

Screenshots

Sign in Home
Login User Transactions

Service Architecture

Architecture Diagram

Service Language Description
frontend Python Exposes an HTTP server to serve the website. Contains login page, signup page, and home page.
ledger-writer Java Accepts and validates incoming transactions before writing them to the ledger.
balance-reader Java Provides efficient readable cache of user balances, as read from ledger-db.
transaction-history Java Provides efficient readable cache of past transactions, as read from ledger-db.
ledger-db PostgreSQL Ledger of all transactions. Option to pre-populate with transactions for demo users.
user-service Python Manages user accounts and authentication. Signs JWTs used for authentication by other services.
contacts Python Stores list of other accounts associated with a user. Used for drop down in "Send Payment" and "Deposit" forms.
accounts-db PostgreSQL Database for user accounts and associated data. Option to pre-populate with demo users.
loadgenerator Python/Locust Continuously sends requests imitating users to the frontend. Periodically creates new accounts and simulates transactions between them.

Quickstart (GKE)

Open in Cloud Shell

  1. Create a Google Cloud Platform project or use an existing project. Set the PROJECT_ID environment variable and ensure the Google Kubernetes Engine API is enabled.
PROJECT_ID=""
gcloud services enable container --project ${PROJECT_ID}
  1. Clone this repository.
git clone https://github.com/GoogleCloudPlatform/bank-of-anthos.git
cd bank-of-anthos
  1. Create a GKE cluster.
ZONE=us-central1-b
gcloud beta container clusters create bank-of-anthos \
--project=${PROJECT_ID} --zone=${ZONE} \
--machine-type=e2-standard-2 --num-nodes=4 \
--enable-stackdriver-kubernetes --subnetwork=default \
--tags=bank-of-anthos --labels csm=
  1. Deploy the demo JWT public key to the cluster as a Secret. This key is used for user account creation and authentication.
kubectl apply -f ./extras/jwt/jwt-secret.yaml
  1. Deploy the sample app to the cluster.
kubectl apply -f ./kubernetes-manifests
  1. Wait for the Pods to be ready.
kubectl get pods

After a few minutes, you should see:

NAME                                  READY   STATUS    RESTARTS   AGE
accounts-db-6f589464bc-6r7b7          1/1     Running   0          99s
balancereader-797bf6d7c5-8xvp6        1/1     Running   0          99s
contacts-769c4fb556-25pg2             1/1     Running   0          98s
frontend-7c96b54f6b-zkdbz             1/1     Running   0          98s
ledger-db-5b78474d4f-p6xcb            1/1     Running   0          98s
ledgerwriter-84bf44b95d-65mqf         1/1     Running   0          97s
loadgenerator-559667b6ff-4zsvb        1/1     Running   0          97s
transactionhistory-5569754896-z94cn   1/1     Running   0          97s
userservice-78dc876bff-pdhtl          1/1     Running   0          96s
  1. Access the web frontend in a browser using the frontend's EXTERNAL_IP.
kubectl get service frontend | awk '{print $4}'

Example output - do not copy

EXTERNAL-IP
35.223.69.29

Other Deployment Options

  • Workload Identity: See these instructions.
  • Cloud SQL: See these instructions to replace the in-cluster databases with hosted Google Cloud SQL.
  • Multicluster with Cloud SQL: See these instructions to replicate the app across two regions using GKE, Multi-cluster Ingress, and Google Cloud SQL.
  • Istio: Apply istio-manifests/ to your cluster to access the frontend through the IngressGateway.
  • Anthos Service Mesh: ASM requires Workload Identity to be enabled in your GKE cluster. See the workload identity instructions to configure and deploy the app. Then, apply istio-manifests/ to your cluster to configure frontend ingress.
  • 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 directory.

Troubleshooting

See the Troubleshooting guide for resolving common problems.

Development

See the Development guide to learn how to run and develop this app locally.

Talks/Demos using Bank of Anthos

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].