From e671acc594e78d7ebff33a11ff4a32c242087dba Mon Sep 17 00:00:00 2001 From: dat-adi Date: Tue, 8 Feb 2022 16:34:02 +0530 Subject: [PATCH 1/2] 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. --- content/services/interface.md | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/content/services/interface.md b/content/services/interface.md index 73513c4..928a668 100644 --- a/content/services/interface.md +++ b/content/services/interface.md @@ -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. From 46b8347eb4ed637e24eea9686d022c5fc78ba0b6 Mon Sep 17 00:00:00 2001 From: dat-adi Date: Tue, 8 Feb 2022 17:48:52 +0530 Subject: [PATCH 2/2] Added hostname help Addition of a command to help developers to check their machine's hostname. --- content/services/interface.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/content/services/interface.md b/content/services/interface.md index 928a668..77f0ae0 100644 --- a/content/services/interface.md +++ b/content/services/interface.md @@ -35,7 +35,11 @@ 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. +use by another application/service, and that you can find out the hostname for +your system through the following command, +```sh +hostname --fqdn +``` 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,