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

  1. stocktrader-operator stocktrader-operator Public

    Umbrella operator that installs/configures the IBM Stock Trader sample

    Makefile 6 16

  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 44

Repositories

Showing 10 of 23 repositories
  • account Public

    Account microservice for the IBM Stock Trader sample

    Java 0 Apache-2.0 8 2 0 Updated Apr 27, 2024
  • stocktrader-gitops Public

    GitOps repo holding the StockTrader CR applied via the operator

    1 4 0 1 Updated Apr 27, 2024
  • broker Public

    Controller microservice coordinating downstream microservices

    Java 0 Apache-2.0 6 2 0 Updated Apr 27, 2024
  • stocktrader-operator Public

    Umbrella operator that installs/configures the IBM Stock Trader sample

    Makefile 6 16 4 0 Updated Apr 27, 2024
  • looper Public

    Performance/stress test for IBM Stock Trader

    Java 0 Apache-2.0 12 2 0 Updated Mar 27, 2024
  • portfolio Public

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

    Java 7 Apache-2.0 61 9 3 Updated Feb 23, 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.

    Java 1 Apache-2.0 2 0 0 Updated Feb 21, 2024
  • .github Public

    IBMStockTrader org-level readme

    0 2 0 0 Updated Jan 18, 2024
  • cash-account-cobol Public

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

    COBOL 0 Apache-2.0 2 3 1 Updated Jan 18, 2024
  • stock-quote Public

    Microservice to retrieve stock quotes

    HTML 17 Apache-2.0 47 1 0 Updated Jan 11, 2024

Top languages

Loading…

Most used topics

Loading…