diff --git a/.version b/.version index 867e5243..589268e6 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -1.2.0 \ No newline at end of file +1.3.0 \ No newline at end of file diff --git a/README.md b/README.md index 767bb2ac..6ed50645 100644 --- a/README.md +++ b/README.md @@ -2,23 +2,38 @@ # Bank of Sirius - -**Bank of Sirius** is a open source fork of [**Bank of Anthos**](https://github.com/nginxinc/bank-of-anthos). This project -improves upon **Bank of Anthos** by adding additional telemetry, instrumentation, performance tuning, upgraded libraries, and more. -The intention is for it to me a more *productionized* example. +**Bank of Sirius** is a open source fork of [**Bank of Anthos**](https://github.com/nginxinc/bank-of-anthos). This +project improves upon **Bank of Anthos** by adding additional telemetry, instrumentation, performance tuning, upgraded +libraries, and more. The intention is for it to me a more *productionized* example. ## Project - -**Bank of Sirius** 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. +**Bank of Sirius** 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. If you’re using this app, please ★Star the repository to show your interest! ## Important Note -This repository is intended to be used with the NGINX Modern Application Architecture (MARA) project [kic-reference-architectures](https://github.com/nginxinc/kic-reference-architectures). This includes modifications to the deployment process, as well as the inclusion of OTEL elements that work with the above project. -If you wish to run this outside of the NGINX MARA project you may run into issues, so it is recommended in this case you either fork this project or the original [Google Bank of Anthos](https://github.com/GoogleCloudPlatform/bank-of-anthos) project. +This repository is intended to be used with the NGINX Modern Application Architecture (MARA) +project [kic-reference-architectures](https://github.com/nginxinc/kic-reference-architectures). This includes +modifications to the deployment process, as well as the inclusion of OTEL elements that work with the above project. + +If you wish to run this outside of the NGINX MARA project you may run into issues, so it is recommended in this case you +either fork this project or the original [Google Bank of Anthos](https://github.com/GoogleCloudPlatform/bank-of-anthos) +project. +### Release Process +This process is intended to be used for releases that are intended to be used with the NGINX Modern Application +Architecture (MARA) project [kic-reference-architectures](https://github.com/nginxinc/kic-reference-architectures). If +you are using a forked version of MARA you will want to examine the [GNUMakefile](./GNUmakefile) and adjust your +repository or other targets as required. + +1. Set the version: `make version-set`. +2. Update the maven files: `make update-maven-versions` +3. Update the manifest files: `make update-manifest-image-versions` +4. Build the docker images: `make docker-all-images` +5. Push the resulting images to the container registry: `make release` ## Screenshots @@ -26,7 +41,6 @@ If you wish to run this outside of the NGINX MARA project you may run into issue | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | | [![Login](./docs/login.png)](./docs/login.png) | [![User Transactions](./docs/transactions.png)](./docs/transactions.png) | - ## Service Architecture ![Architecture Diagram](./docs/architecture.png) diff --git a/docs/development.md b/docs/development.md index 42c0c184..8421ddbb 100644 --- a/docs/development.md +++ b/docs/development.md @@ -1,24 +1,27 @@ # Development Guide -This document describes how to develop and add features to the Bank of Sirius application in your local environment. +This document describes how to develop and add features to the Bank of Sirius application in your local environment. -## Prerequisites +## Prerequisites 1. A clone of this repository. 2. A linux build environment. -## Install Tools +## Install Tools -You can use MacOS or Linux as your dev environment - all these languages and tools support both. +You can use MacOS or Linux as your dev environment - all these languages and tools support both. -1. [Docker](https://www.docker.com/products/docker-desktop) +1. [Docker](https://www.docker.com/products/docker-desktop) 2. [GNU Make 4.x](https://www.gnu.org/software/make/) 5. [JDK **8**](https://www.azul.com/downloads/?package=jdk) (newer versions might cause issues) 6. [Maven **3.6**](https://downloads.apache.org/maven/maven-3/) (newer versions might cause issues) ## Makefile Targets -The following code block shows the valid targets for the make process. Most of these options are self-explanatory, but to completely build the application one can run `make docker-all-images`. To push the new versions to the defined registry, you can run `make release`. Note that this assumes you have the appropriate permissions to push to the defined registry. +The following code block shows the valid targets for the make process. Most of these options are self-explanatory, but +to completely build the application one can run `make docker-all-images`. To push the new versions to the defined +registry, you can run `make release`. Note that this assumes you have the appropriate permissions to push to the defined +registry. ``` checkstyle Run all code style checks @@ -44,26 +47,33 @@ version Outputs the current version version-update Prompts for a new version ``` -## Adding External Packages +## Adding External Packages -### Python +### Python -If you're adding a new feature that requires a new external Python package in one or more services (`frontend`, `contacts`, `userservice`), you must regenerate the `requirements.txt` file using `piptools`. This is what the Python Dockerfiles use to install external packages inside the containers. +If you're adding a new feature that requires a new external Python package in one or more services (`frontend` +, `contacts`, `userservice`), you must regenerate the `requirements.txt` file using `piptools`. This is what the Python +Dockerfiles use to install external packages inside the containers. -To add a package: +To add a package: 1. Add the package name to `requirements.in` within the `src/` directory: -2. Then run the make target `python-preproc-requirements`. This will transform all Python projects' `requirements.in` files to `requirements.txt` if there have been changes to the `requirements.in` file. +2. Then run the make target `python-preproc-requirements`. This will transform all Python projects' `requirements.in` + files to `requirements.txt` if there have been changes to the `requirements.in` file. -3. Re-run `make` with the appropriate target for your build. To build just the python packages you can run `make docker-python-images` +3. Re-run `make` with the appropriate target for your build. To build just the python packages you can + run `make docker-python-images` +### Java -### Java +If you're adding a new feature to one or more of the Java services (`ledgerwriter`, `transactionhistory` +, `balancereader`) and require a new third-party package, do the following: -If you're adding a new feature to one or more of the Java services (`ledgerwriter`, `transactionhistory`, `balancereader`) and require a new third-party package, do the following: - -1. Add the package to the `pom.xml` file in the `src/` directory, under ``. You can find specific package info in [Maven Central](https://search.maven.org/) ([example](https://search.maven.org/artifact/org.postgresql/postgresql/42.2.16.jre7/jar)). Example: +1. Add the package to the `pom.xml` file in the `src/` directory, under ``. You can find specific + package info + in [Maven Central](https://search.maven.org/) ([example](https://search.maven.org/artifact/org.postgresql/postgresql/42.2.16.jre7/jar)) + . Example: ``` @@ -71,9 +81,11 @@ If you're adding a new feature to one or more of the Java services (`ledgerwrite postgresql ``` -3. Re-run `make` with the appropriate target for your build. To build just the java packages you can run `make docker-java-images` +3. Re-run `make` with the appropriate target for your build. To build just the java packages you can + run `make docker-java-images` ## Continuous Integration -Github actions are used for continuous integration (CI) for this project. Due to time constrains we have been unable to reimplement the UI tests and deployment tests in the fork. +Github actions are used for continuous integration (CI) for this project. Due to time constrains we have been unable to +reimplement the UI tests and deployment tests in the fork. diff --git a/kubernetes-manifests/accounts-db.yaml b/kubernetes-manifests/accounts-db.yaml index bbfca07f..3fa25d74 100644 --- a/kubernetes-manifests/accounts-db.yaml +++ b/kubernetes-manifests/accounts-db.yaml @@ -21,7 +21,7 @@ spec: serviceAccountName: default containers: - name: accounts-db - image: ghcr.io/nginxinc/bos-accounts-db:v1.1.0 + image: ghcr.io/nginxinc/bos-accounts-db:v1.3.0 imagePullPolicy: Always env: - name: OTEL_EXPORTER_OTLP_ENDPOINT diff --git a/kubernetes-manifests/balance-reader.yaml b/kubernetes-manifests/balance-reader.yaml index e8641107..67841231 100644 --- a/kubernetes-manifests/balance-reader.yaml +++ b/kubernetes-manifests/balance-reader.yaml @@ -15,7 +15,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: balancereader - image: ghcr.io/nginxinc/bos-balancereader:v1.1.0 + image: ghcr.io/nginxinc/bos-balancereader:v1.3.0 imagePullPolicy: Always volumeMounts: - name: publickey diff --git a/kubernetes-manifests/contacts.yaml b/kubernetes-manifests/contacts.yaml index 10205c10..af95d2c3 100644 --- a/kubernetes-manifests/contacts.yaml +++ b/kubernetes-manifests/contacts.yaml @@ -15,7 +15,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: contacts - image: ghcr.io/nginxinc/bos-contacts:v1.1.0 + image: ghcr.io/nginxinc/bos-contacts:v1.3.0 imagePullPolicy: Always volumeMounts: - name: publickey diff --git a/kubernetes-manifests/frontend.yaml b/kubernetes-manifests/frontend.yaml index d777bca6..2b0b4eaa 100644 --- a/kubernetes-manifests/frontend.yaml +++ b/kubernetes-manifests/frontend.yaml @@ -15,7 +15,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: front - image: ghcr.io/nginxinc/bos-frontend:v1.1.0 + image: ghcr.io/nginxinc/bos-frontend:v1.3.0 imagePullPolicy: Always volumeMounts: - name: publickey diff --git a/kubernetes-manifests/ledger-db.yaml b/kubernetes-manifests/ledger-db.yaml index 56bfc29b..974b48d2 100644 --- a/kubernetes-manifests/ledger-db.yaml +++ b/kubernetes-manifests/ledger-db.yaml @@ -16,7 +16,7 @@ spec: serviceAccountName: default containers: - name: postgres - image: ghcr.io/nginxinc/bos-ledger-db:v1.1.0 + image: ghcr.io/nginxinc/bos-ledger-db:v1.3.0 imagePullPolicy: Always ports: - containerPort: 5432 diff --git a/kubernetes-manifests/ledger-writer.yaml b/kubernetes-manifests/ledger-writer.yaml index 97acc6bf..2f4c1bc2 100644 --- a/kubernetes-manifests/ledger-writer.yaml +++ b/kubernetes-manifests/ledger-writer.yaml @@ -15,7 +15,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: ledgerwriter - image: ghcr.io/nginxinc/bos-ledgerwriter:v1.1.0 + image: ghcr.io/nginxinc/bos-ledgerwriter:v1.3.0 imagePullPolicy: Always volumeMounts: - name: publickey diff --git a/kubernetes-manifests/loadgenerator.yaml b/kubernetes-manifests/loadgenerator.yaml index dd345beb..765dae01 100644 --- a/kubernetes-manifests/loadgenerator.yaml +++ b/kubernetes-manifests/loadgenerator.yaml @@ -19,7 +19,7 @@ spec: restartPolicy: Always containers: - name: loadgenerator - image: ghcr.io/nginxinc/bos-loadgenerator:v1.1.0 + image: ghcr.io/nginxinc/bos-loadgenerator:v1.3.0 imagePullPolicy: Always ports: - containerPort: 8089 diff --git a/kubernetes-manifests/transaction-history.yaml b/kubernetes-manifests/transaction-history.yaml index 568f481b..60340dc0 100644 --- a/kubernetes-manifests/transaction-history.yaml +++ b/kubernetes-manifests/transaction-history.yaml @@ -15,7 +15,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: transactionhistory - image: ghcr.io/nginxinc/bos-transactionhistory:v1.1.0 + image: ghcr.io/nginxinc/bos-transactionhistory:v1.3.0 imagePullPolicy: Always volumeMounts: - name: publickey diff --git a/kubernetes-manifests/userservice.yaml b/kubernetes-manifests/userservice.yaml index 7f38160f..952156fa 100644 --- a/kubernetes-manifests/userservice.yaml +++ b/kubernetes-manifests/userservice.yaml @@ -15,7 +15,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: userservice - image: ghcr.io/nginxinc/bos-userservice:v1.1.0 + image: ghcr.io/nginxinc/bos-userservice:v1.3.0 imagePullPolicy: Always volumeMounts: - name: keys diff --git a/pom.xml b/pom.xml index 69e59112..3424796f 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ com.f5.sirius.samples bank-of-sirius - 1.2.0 + 1.3.0 pom Bank of Sirius Parent Example banking application diff --git a/src/balancereader/pom.xml b/src/balancereader/pom.xml index f3d612fc..fc830031 100644 --- a/src/balancereader/pom.xml +++ b/src/balancereader/pom.xml @@ -23,12 +23,12 @@ jar Balance Reader Balance Reader - 1.2.0 + 1.3.0 com.f5.sirius.samples spring-boot-parent - 1.2.0 + 1.3.0 ../java-common/spring-boot-parent/pom.xml diff --git a/src/java-common/ledger-common/pom.xml b/src/java-common/ledger-common/pom.xml index b90ffa0e..b6a36415 100644 --- a/src/java-common/ledger-common/pom.xml +++ b/src/java-common/ledger-common/pom.xml @@ -5,13 +5,13 @@ 4.0.0 ledger-common - 1.2.0 + 1.3.0 Ledger Common com.f5.sirius.samples bank-of-sirius - 1.2.0 + 1.3.0 ../../../pom.xml diff --git a/src/java-common/security-common/pom.xml b/src/java-common/security-common/pom.xml index 161ca9da..b62db875 100644 --- a/src/java-common/security-common/pom.xml +++ b/src/java-common/security-common/pom.xml @@ -5,13 +5,13 @@ 4.0.0 security-common - 1.2.0 + 1.3.0 Security Common com.f5.sirius.samples bank-of-sirius - 1.2.0 + 1.3.0 ../../../pom.xml diff --git a/src/java-common/spring-boot-parent/pom.xml b/src/java-common/spring-boot-parent/pom.xml index 28e1b34a..b3b034fd 100644 --- a/src/java-common/spring-boot-parent/pom.xml +++ b/src/java-common/spring-boot-parent/pom.xml @@ -19,14 +19,14 @@ 4.0.0 spring-boot-parent - 1.2.0 + 1.3.0 pom Spring Boot Parent com.f5.sirius.samples bank-of-sirius - 1.2.0 + 1.3.0 ../../../pom.xml diff --git a/src/java-common/telemetry-common/pom.xml b/src/java-common/telemetry-common/pom.xml index 7c1ed6a6..abab8b5f 100644 --- a/src/java-common/telemetry-common/pom.xml +++ b/src/java-common/telemetry-common/pom.xml @@ -20,7 +20,7 @@ 4.0.0 sirius.samples.bankofsirius telemetry-common - 1.2.0 + 1.3.0 jar Telemetry Common Addons for customizing tracing with Spring Sleuth @@ -28,7 +28,7 @@ com.f5.sirius.samples bank-of-sirius - 1.2.0 + 1.3.0 ../../../pom.xml diff --git a/src/ledgerwriter/pom.xml b/src/ledgerwriter/pom.xml index 631e1642..53f4fe67 100644 --- a/src/ledgerwriter/pom.xml +++ b/src/ledgerwriter/pom.xml @@ -23,12 +23,12 @@ jar Ledger Writer Ledger Writer - 1.2.0 + 1.3.0 com.f5.sirius.samples spring-boot-parent - 1.2.0 + 1.3.0 ../java-common/spring-boot-parent/pom.xml diff --git a/src/transactionhistory/pom.xml b/src/transactionhistory/pom.xml index 51f2617c..f99a313b 100644 --- a/src/transactionhistory/pom.xml +++ b/src/transactionhistory/pom.xml @@ -23,12 +23,12 @@ jar Transaction History Transaction History - 1.2.0 + 1.3.0 com.f5.sirius.samples spring-boot-parent - 1.2.0 + 1.3.0 ../java-common/spring-boot-parent/pom.xml