Skip to content
@IBMStockTrader

IBM/Kyndryl Stock Trader

Org containing a repository per microservice in the IBM/Kyndryl Stock Trader cloud-native sample application

The IBMStockTrader application demonstrates how to build a cloud-native application out of a set of containerized microservices (each in their own repo under this org) that will run in Kubernetes. It was initially created at IBM, and now is primarily maintained by Kyndryl (by the ex-IBMers that created it). An intro article (that is a bit dated, but still useful) is at https://medium.com/hybrid-cloud-engineering/introducing-the-ibm-stock-trader-sample-b9b1ad6749e6 (and there are many other articles under https://medium.com/hybrid-cloud-engineering and https://medium.com/cloud-journey-optimization that use Stock Trader as their example). There is also a recently published book (in paperback and Kindle) that uses Stock Trader as its example throughout, available at https://www.amazon.com/Practical-Cloud-Native-Java-Development-MicroProfile/dp/1801078807.

It originally ran in the (now-defunct) IBM Cloud Private product as its Kube implementation, but has since been successfully tested in the IBM Kubernetes Service (IKS), the Elastic Kubernetes Service (EKS) in AWS, the Azure Kubernetes Service (AKS), the Google Kubernetes Engine (GKE), the Tanzu Kubernetes Grid (TKG), and in the OpenShift Container Platform (in both IBM Cloud and in AWS). Most of the microservices are Java-based, running in the Open Liberty application server. Discussion occurs on Gitter, at https://gitter.im/IBMStockTrader/community - feel free to sign up and join in on the discussion!

This diagram shows how the microservices fit together, and what external services (databases, messaging products, API/function services, etc.) they utilize. Note that only the ones with a solid border are mandatory - the rest are all optional, only installed when you want to enable additional bells and whistles.

Architectural Diagram

A composite operator for the application as a whole exists, in the stocktrader-operator repo. See its readme for information on how to install the operator into your cluster's OperatorHub, how to deploy the operator from there, and how to create an instance of the StockTrader CRD that it manages, and then how to run the application. See each microservice's repository readme for details about what each does.

Note that there is an automated CI/CD pipeline that will automatically run a GitHub Action whenever there is a commit to one of the microservice repos, which will build the microservice and push the resulting image to the appropriate subdirectory of quay.io/ibmstocktrader (for example, if a change is made to the portfolio microservice, an image will get built and pushed to quay.io/ibmstocktrader/portfolio). This GitHub Action will also update the image tag for that microservice in the CR yaml in the stocktrader-gitops repo to point to that newly pushed image. Then a GitHub Action in that stocktrader-gitops repo will automatically do a kubectl apply -f of that yaml to the configured Kube cluster (such configuration is done via GitHub secrets at both the org-level and at the repo-level for the stocktrader-gitops repo). The net is that, within a minute or so of committing a change, the updated code will be running in your cluster.

CI/CD Pipeline

If any problems are encountered, open an issue against the appropriate microservice repo under this org. For example, for an issue with the stock-quote microservice, go to https://github.com/IBMStockTrader/stock-quote/issues. Pull requests are also very welcome (such as at https://github.com/IBMStockTrader/stock-quote/pulls).

Pinned Loading

  1. stocktrader-operator stocktrader-operator Public

    Umbrella operator that installs/configures the IBM Stock Trader sample

    Makefile 7 17

  2. stocktrader-gitops stocktrader-gitops Public

    GitOps repo holding the StockTrader CR applied via the operator

    1 4

  3. stocktrader-helm stocktrader-helm Public

    Umbrella helm chart that installs/configures the IBM Stock Trader sample

    Shell 8 43

Repositories

Showing 10 of 23 repositories
  • portfolio Public

    Microservice implemented with MicroProfile that persists stock portfolios to JDBC (such as DB2)

    IBMStockTrader/portfolio’s past year of commit activity
    Java 7 Apache-2.0 60 8 3 Updated Nov 19, 2024
  • looper Public

    Performance/stress test for IBM Stock Trader

    IBMStockTrader/looper’s past year of commit activity
    Java 0 Apache-2.0 12 3 0 Updated Oct 14, 2024
  • cash-account-cobol Public

    CICS/COBOL implementation of Cash Account, for use in mainframe modernization scenarios. Uses DB2 for z/OS and VSAM

    IBMStockTrader/cash-account-cobol’s past year of commit activity
    COBOL 2 Apache-2.0 2 3 1 Updated Oct 4, 2024
  • account Public

    Account microservice for the IBM Stock Trader sample

    IBMStockTrader/account’s past year of commit activity
    Java 0 Apache-2.0 7 3 0 Updated Sep 24, 2024
  • stocktrader-operator Public

    Umbrella operator that installs/configures the IBM Stock Trader sample

    IBMStockTrader/stocktrader-operator’s past year of commit activity
    Makefile 7 17 5 0 Updated Sep 23, 2024
  • trader Public

    UI microservice for the Stock Trader app

    IBMStockTrader/trader’s past year of commit activity
    Java 24 Apache-2.0 63 3 1 Updated Sep 3, 2024
  • stocktrader-gitops Public

    GitOps repo holding the StockTrader CR applied via the operator

    IBMStockTrader/stocktrader-gitops’s past year of commit activity
    1 4 0 1 Updated May 13, 2024
  • broker Public

    Controller microservice coordinating downstream microservices

    IBMStockTrader/broker’s past year of commit activity
    Java 0 Apache-2.0 5 2 0 Updated May 13, 2024
  • trade-history Public

    Microservice that keeps a detailed history of all stock trades

    IBMStockTrader/trade-history’s past year of commit activity
    Java 1 Apache-2.0 19 9 2 Updated May 2, 2024
  • cash-account Public

    Spring-based microservice for the cash account associated with a portfolio, debiting from it when stock is purchased, and crediting it when stock is sold. Handles currency exchange rate conversions.

    IBMStockTrader/cash-account’s past year of commit activity
    Java 1 Apache-2.0 2 0 0 Updated Feb 21, 2024

Most used topics

Loading…