Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump manifets to version 1.3.0 for BoS #17

Merged
merged 8 commits into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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
Loading