DamageDetector/README.md

105 lines
4.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p align="center">
<img src="docs/img/masterplan.png" width="300" alt="Masterplan Nahmobilität" />
</p>
<details>
<summary>Translations:</summary>
- [German / Deutsch](LIESMICH.md)
</details></br>
**Bike Defect Notifier** is a cloud-native microservices application for people who like to share defects in local bike infrastructure.
Bike Defect Notifier consists of a 2-tier microservices application. The application is a
web-based OpenAPI where users can report faults on public infrastructure.
With this application we would like to demonstrate the use of **microservices** in a cloud world **without** vendor lock-in.
This application works on all **Docker** hosts, but can also be rolled out on standard **Kubernetes** clusters.
> Please note that in this project there is no explicit protection of the target system in terms of cyber security. The protection of the work node on which the application is executed is the responsibility of the system operator.
If youre using this application, please **★Star** this repository to show your interest!
Collaboration on this repo is expressly encouraged.
## Before You Begin
To successfully deploy this microservice to your target system, please ensure that you have successfully completed the installation of Docker.
### Install Docker
To install Docker Engine, follow the instructions within one of the guides below:
- [Installing and Using Docker Engine](https://docs.docker.com/engine/install/)
### Install Docker Compose
In addition to the Docker Engine, Docker Compose must also be installed on the target system.
- [Installing and Using Docker Compose](https://docs.docker.com/compose/install/)
## Quickstart (Docker)
1. **Clone this repository.**
```
git clone https://git.masasana.ai/DamageDetector/DamageDetector.git
cd DamageDetector
```
2. **Deploy the app to your local cluster.**
```
bash ./scripts/local_deploy.sh
```
3. **Wait for the stack to be ready.**
```
docker stack ps DamageDetector
```
After a few minutes, you should see:
```
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
xy5n7qwqrhp6 DamageDetector_mongo.1 mongo:5.0 .3 localhost Running Running 1 minute ago
x8inapxrfsc7 DamageDetector_frontend.1 frontend:latest localhost Running Running 1 minute ago
```
5. **Access the web frontend in a browser** using the frontend's `EXTERNAL_IP`.
```
http://localhost:8080/ui
```
## Other Deployment Options
- **Istio**: [See these instructions.](docs/service-mesh.md)
- **Minikube**: see the [Development Guide](docs/development-guide.md)
## Architecture
**DamageDetector** is composed of 2 microservices written in different
languages that talk to each other.
[![Architecture of docker
microservices](./docs/img/DemageDetector_Docker_Architecture.png)](./docs/img/architecture-diagram.png)
The cloud architecture shown here represents an exemplary network infrastructure that can be adapted by the operator as desired. It makes no claim to completeness or correctness.
[![Architecture of cloud
microservices](./docs/img/DemageDetector_Cloud_Architecture.png)](./docs/img/architecture-diagram.png)
| Service | Language | Description |
| ---------------------------------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| [frontend](./source/frontend) | Python | Exposes an HTTP server to serve the website. Does require basicAuth signup/login to interact with the API |
| [mongodb](./source/mongodb) | C++ | Stores demage notifications from user's. |
## Features
- **[CNCF - Cloud Nativ Computing Foundation](https://www.cncf.io):** This application is developed according to the recommendations of the CNCF.
- **[Kubernetes](https://kubernetes.io)/[Docker](https://www.docker.com):**
The app is designed to run on Kubernetes (both locally on "Docker for
Desktop", as well as on the cloud).
- **[Istio](https://istio.io):** Application works on Istio service mesh.
## Local Development
If you would like to contribute features or fixes to this app, see the [Development Guide](./docs/development-guide.md) on how to build this demo locally.