Skip to content

Commit

Permalink
chore: bump manifets to version 1.3.0 for BoS (#17)
Browse files Browse the repository at this point in the history
* fix: wrong app name in frontend service yaml

* chore: update manifests for 1.3.0 release

* chore: update all necessary files for v1.3.0

* fix: remove backup files from commit

* chore: update all necessary files for v1.3.0

* fix: remove backup files from commit
  • Loading branch information
Jason Schmidt authored Feb 25, 2022
1 parent c986117 commit fe2bb0a
Show file tree
Hide file tree
Showing 20 changed files with 78 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.0
1.3.0
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,45 @@

# 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

| Sign in | Home |
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [![Login](./docs/login.png)](./docs/login.png) | [![User Transactions](./docs/transactions.png)](./docs/transactions.png) |


## Service Architecture

![Architecture Diagram](./docs/architecture.png)
Expand Down
48 changes: 30 additions & 18 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -44,36 +47,45 @@ 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/<service>` 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/<service>` directory, under `<dependencies>`. 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/<service>` directory, under `<dependencies>`. 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:

```
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
```
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.
2 changes: 1 addition & 1 deletion kubernetes-manifests/accounts-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/balance-reader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/contacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/ledger-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/ledger-writer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/loadgenerator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/transaction-history.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/userservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<groupId>com.f5.sirius.samples</groupId>
<artifactId>bank-of-sirius</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
<packaging>pom</packaging>
<name>Bank of Sirius Parent</name>
<description>Example banking application</description>
Expand Down
4 changes: 2 additions & 2 deletions src/balancereader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
<packaging>jar</packaging>
<name>Balance Reader</name>
<description>Balance Reader</description>
<version>1.2.0</version>
<version>1.3.0</version>

<parent>
<groupId>com.f5.sirius.samples</groupId>
<artifactId>spring-boot-parent</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
<relativePath>../java-common/spring-boot-parent/pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions src/java-common/ledger-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>ledger-common</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
<name>Ledger Common</name>

<parent>
<groupId>com.f5.sirius.samples</groupId>
<artifactId>bank-of-sirius</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
<relativePath>../../../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions src/java-common/security-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>security-common</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
<name>Security Common</name>

<parent>
<groupId>com.f5.sirius.samples</groupId>
<artifactId>bank-of-sirius</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
<relativePath>../../../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions src/java-common/spring-boot-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>spring-boot-parent</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
<packaging>pom</packaging>
<name>Spring Boot Parent</name>

<parent>
<groupId>com.f5.sirius.samples</groupId>
<artifactId>bank-of-sirius</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
<relativePath>../../../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions src/java-common/telemetry-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
<modelVersion>4.0.0</modelVersion>
<groupId>sirius.samples.bankofsirius</groupId>
<artifactId>telemetry-common</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
<packaging>jar</packaging>
<name>Telemetry Common</name>
<description>Addons for customizing tracing with Spring Sleuth</description>

<parent>
<groupId>com.f5.sirius.samples</groupId>
<artifactId>bank-of-sirius</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
<relativePath>../../../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions src/ledgerwriter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
<packaging>jar</packaging>
<name>Ledger Writer</name>
<description>Ledger Writer</description>
<version>1.2.0</version>
<version>1.3.0</version>

<parent>
<groupId>com.f5.sirius.samples</groupId>
<artifactId>spring-boot-parent</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
<relativePath>../java-common/spring-boot-parent/pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions src/transactionhistory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
<packaging>jar</packaging>
<name>Transaction History</name>
<description>Transaction History</description>
<version>1.2.0</version>
<version>1.3.0</version>

<parent>
<groupId>com.f5.sirius.samples</groupId>
<artifactId>spring-boot-parent</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
<relativePath>../java-common/spring-boot-parent/pom.xml</relativePath>
</parent>

Expand Down

0 comments on commit fe2bb0a

Please sign in to comment.