Addition of a few development environment docs

- Addition of parameters to be added into the `config/settings.toml` file.
- A note on what API keys refer to.
This commit is contained in:
dat-adi 2022-02-08 16:34:02 +05:30
parent 5b5f0acafa
commit e671acc594

View file

@ -18,3 +18,47 @@ The procedure of the Notification-Event Translation System, works as follows,
1. Upon creation of the Interface, and set up of a forge repository to look for, the interface subscribes to the forge's notifications.
2. Every notification received by the interface from the forges, is then identified and translated into it's respective `Event` model, be it an Issue or PR.
3. Upon conversion into the respective model, Interface processes these `Events`, and converts them into the model required for the destination forge.
## Setting up the Development Environment
In order to test out and utilise the Northstar lookup service, we will need to set
up an interface to be run on the local machine. There are a few configuration
changes that must be made for the interface to be recognized by the lookup service.
Changes to the `config/settings.toml`,
```toml
[default.system]
northstar = "http://computer.domain.com:port"
[default.server]
url = "http://computer.domain.com:port"
```
Note that the port assigned to the interface and northstar must not already be in
use by another application/service.
There are a few more settings to add in, as a means to validate the user who hosts
the interface, this also depends on the forge of your choosing. As of right now,
`interface` supports only gitea, and we can fill up the `config/settings.toml`,
with the same.
```toml
[default]
forge = "gitea"
[default.gitea]
host = "https://gitea.com"
api_key = "generate-the-api-key-from-gitea-and-paste-here"
username = "fluxer101"
password = "flux101"
```
Note that the API key in Gitea is known as an access token, one which can be
generated [here](https://gitea.com/user/settings/applications).
## FAQ
### Why does an integrity error show up?
As ForgeFlux's Interface is an actively developing project, there are a few
errors that are caused by an upgrade to the database, in which case integrity errors
are bound to pop up. In this case, remove the `instance/` directory where the database
for the service would be stored, to rebuild it the next time the application is run.