mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 15:27:01 +00:00
Added README for Akka setup
This commit is contained in:
parent
d291c22d2e
commit
7c9acda315
60
README.Akka.md
Normal file
60
README.Akka.md
Normal file
@ -0,0 +1,60 @@
|
||||
# Intro
|
||||
|
||||
Akka is a toolkit and runtime for building highly concurrent, distributed, and resilient message-driven applications on the JVM.
|
||||
See http://akka.io
|
||||
|
||||
|
||||
To use Akka, you want to have two different machines:
|
||||
- One considered `remote` which stores the data
|
||||
- One considered `local` which is the public facing side of the API, where your users will connect
|
||||
|
||||
Both run current versions of the Open Bank Project API, but configured and run differently.
|
||||
|
||||
|
||||
# Remote side
|
||||
|
||||
- Configure `src/main/resources/default.props`:
|
||||
|
||||
```ini
|
||||
# Remote end gets data 'locally'
|
||||
remotedata.enable=false
|
||||
# Your remote's external IP address
|
||||
remotedata.hostname=10.0.0.19
|
||||
# Arbitrary port of your choosing
|
||||
remotedata.port=5448
|
||||
|
||||
# Optionally configure postgres, otherwise file-based H2 will be used
|
||||
remotedata.db.driver=org.postgresql.Driver
|
||||
remotedata.db.url=jdbc:postgresql://localhost:5432/dbname?user=user&password=password
|
||||
```
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
#!/bin/sh
|
||||
|
||||
cd ${HOME}/OBP-API/ && /usr/bin/nohup /usr/bin/mvn compile exec:java -Dexec.mainClass="code.remotedata.RemotedataActors" -Dexec.args="standalone" > ${HOME}/akka_remote_api.log &
|
||||
```
|
||||
|
||||
|
||||
|
||||
# Local OBP API side
|
||||
|
||||
- Configure `src/main/resources/default.props`:
|
||||
|
||||
```ini
|
||||
# Local end gets data remotely
|
||||
remotedata.enable=true
|
||||
# Your remote's public IP address
|
||||
remotedata.hostname=10.0.0.19
|
||||
# Arbitrary port of your choosing, has to match remote above
|
||||
remotedata.port=5448
|
||||
```
|
||||
|
||||
# Run
|
||||
|
||||
```bash
|
||||
#!/bin/sh
|
||||
|
||||
cd ${HOME}/OBP-API/ && /usr/bin/nohup /usr/bin/mvn jetty:run -Djetty.port=8080 -DskipTests > ${HOME}/akka_local_api.log &
|
||||
```
|
||||
Loading…
Reference in New Issue
Block a user