realArcherL / skaffold-remote-configs-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

This fork modifies the original Bank of Anthos into a multi-repository microservices design to demonstrate how to integrate with skaffold's remote config dependency feature.

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

Follow the Google Cloud Shell tutorial:

Open in Cloud Shell

Alternately,

  1. Setup a Kubernetes cluster of choice (GKE, minikube, kind, etc.)

  2. Install skaffold v1.20.0 or newer

  • Linux:
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v1.20.0/skaffold-linux-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin
  • macOS:
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v1.20.0/skaffold-darwin-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin
  1. Build and deploy the app (no need to clone this repo).
skaffold run -f https://raw.githubusercontent.com/gsquared94/skaffold-remote-configs-demo/main/skaffold.yaml --port-forward
  1. Delete the deployment.
skaffold delete -f https://raw.githubusercontent.com/gsquared94/skaffold-remote-configs-demo/main/skaffold.yaml
  1. Iterate on only selected modules by passing the -m flag.
skaffold run -f https://raw.githubusercontent.com/gsquared94/skaffold-remote-configs-demo/main/skaffold.yaml -m frontend-svc --port-forward

About

License:Apache License 2.0


Languages

Language:Go 98.8%Language:Shell 0.7%Language:Makefile 0.2%Language:Dockerfile 0.2%