athena-test/Dipal/Backend/Kaiser/Installation.md
2023-03-09 19:59:42 +03:00

39 lines
1.4 KiB
Markdown

# Installation
If you install Kaiser project completely on your system, you need also to run third party services. You can use docker-compose files from our DevOps repos.
* [Keycloak](http://194.226.0.195:32127/). Account management system.
* [Kafka](http://194.226.0.195:32127/). Message broker with many features.
* [Redis](http://194.226.0.195:32127/). Data cache system.
Configure enviroment varibles in `.env` files of your microservices.
### Microservice common runbook
To run microservice is simple:
```bash
npm install
npm run start
```
If you have `node_modules` or `dist` directories:
```bash
rm ./node_modules -R
rm ./dist -R
npm cache clean --force
npm install
npm run start
```
### Get AUTH\_KEY for gateways
To get security key get it from Keycloak panel or ask it from your supervisor:
Choose realm (for example dipal\_develop or master). Realm Settings -> Keys -> Get `Public key` provided by `rsa-generated`. Set it in your `.env` file as `AUTH_KEY`.
### Get SECURITY\_KEY
In some services, we need a security key to enccrypt and decrypt secrets (for example `e87fb5065e795ea8eb6c71a5756e31c6`). If you connect to a shared MongoDB and Keycloak, ask your supervisor to give you a SECURITY\_KEY. If you work with the system on your machine, generate it [by yourself](https://onlinehashtools.com/generate-random-md5-hash). After that set it in your `.env` file.