docs/Interface/about/index.html

299 lines
9.6 KiB
HTML
Raw Permalink Normal View History

2023-10-01 23:36:07 +05:30
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://docs.forgeflux.org/main.css">
<link rel="icon" href="https://forgeflux.org/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title> Docs | About Interface </title>
</head>
<body>
<main>
<nav>
<a href="https:&#x2F;&#x2F;docs.forgeflux.org">
<img src="/logo.svg" alt="" />
</a>
<a href="javascript:void(0);" onclick="burger()" id="mobile" class="ms-Icon--GlobalNavButton"></a>
<div id="trees">
2023-10-02 00:28:03 +05:30
<input class="tree-toggle" type="checkbox" id="ftest"
/>
<label class="tree-toggle-label" for="ftest">ftest</label>
<ul class="subtree">
<li >
2023-10-05 02:48:19 +05:30
<a href="https://docs.forgeflux.org/ftest/introduction/">Introducing ftest</a>
</li>
<li >
<a href="https://docs.forgeflux.org/ftest/cli/">Using ftest CLI</a>
2023-10-02 00:28:03 +05:30
</li>
<li >
<a href="https://docs.forgeflux.org/ftest/terminology/">Terminology</a>
</li>
<li >
<a href="https://docs.forgeflux.org/ftest/quick-links/">Quick Links</a>
</li>
<li >
<a href="https://docs.forgeflux.org/ftest/ftest-toml/">ftest.toml</a>
</li>
<li >
<a href="https://docs.forgeflux.org/ftest/tests/">Tests</a>
</li>
<li >
<a href="https://docs.forgeflux.org/ftest/tutorial-new-specimen/">[Tutorial] Add new specimen</a>
</li>
</ul>
2023-10-01 23:36:07 +05:30
<input class="tree-toggle" type="checkbox" id="interface"
checked />
<label class="tree-toggle-label" for="interface">Interface</label>
<ul class="subtree">
<li class="active">
<a href="https://docs.forgeflux.org/Interface/about/">About Interface</a>
</li>
</ul>
<input class="tree-toggle" type="checkbox" id="northstar"
/>
<label class="tree-toggle-label" for="northstar">Northstar</label>
<ul class="subtree">
<li >
<a href="https://docs.forgeflux.org/Northstar/about/">About Northstar</a>
</li>
</ul>
<input class="tree-toggle" type="checkbox" id="updates"
/>
<label class="tree-toggle-label" for="updates">Updates</label>
<ul class="subtree">
<li >
<a href="https://docs.forgeflux.org/updates/december2020/">December 2020</a>
</li>
<li >
<a href="https://docs.forgeflux.org/updates/november2020/">November 2020</a>
</li>
<li >
<a href="https://docs.forgeflux.org/updates/october2020/">October 2020</a>
</li>
<li >
<a href="https://docs.forgeflux.org/updates/september2020/">September 2020</a>
</li>
</ul>
</div>
</nav>
<article>
<div id="on_right">
<span id="search-ico" class="ms-Icon--Search"></span>
</div>
<div class="search-container">
<input id="search" type="search" placeholder="Search as you type...">
<div class="search-results">
<div class="search-results__header"></div>
<ul class="search-results__items"></ul>
</div>
</div>
<div id="wrap">
<h1 id="interface">Interface</h1>
<p>Interface is a service that acts as a connecting end of the bridge, listening
in for Notifications from a particular forge repository.</p>
<p>These notifications, which may be in the form of a Comment, Issue, or Pull Request,
are then further defined into Events to create
a workable unit set, that the interface can use to translate operations from
one forge to another forge.</p>
<p>The procedure of the Notification-Event Translation System, works as follows,</p>
<ol>
<li>Upon creation of the Interface, and set up of a forge repository to look for, the interface subscribes to the forge's notifications.</li>
<li>Every notification received by the interface from the forges, is then identified and translated into it's respective <code>Event</code> model, be it an Issue or PR.</li>
<li>Upon conversion into the respective model, Interface processes these <code>Events</code>, and converts them into the model required for the destination forge.</li>
</ol>
<h2 id="setting-up-the-development-environment">Setting up the Development Environment</h2>
<p>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.</p>
<p>Changes to the <code>config/settings.toml</code>,</p>
<pre data-lang="toml" style="background-color:#eff1f5;color:#4f5b66;" class="language-toml "><code class="language-toml" data-lang="toml"><span>[default.system]
</span><span style="color:#bf616a;">northstar </span><span>= &quot;</span><span style="color:#a3be8c;">http://computer.domain.com:port</span><span>&quot;
</span><span>
</span><span>[default.server]
</span><span style="color:#bf616a;">url </span><span>= &quot;</span><span style="color:#a3be8c;">http://computer.domain.com:port</span><span>&quot;
</span></code></pre>
<p>Note that the port assigned to the interface and northstar must not already be in
use by another application/service, and that you can find out the hostname for
your system through the following command,</p>
<pre data-lang="sh" style="background-color:#eff1f5;color:#4f5b66;" class="language-sh "><code class="language-sh" data-lang="sh"><span style="color:#bf616a;">hostname --fqdn
</span></code></pre>
<p>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,
<code>interface</code> supports only gitea, and we can fill up the <code>config/settings.toml</code>,
with the same.</p>
<pre data-lang="toml" style="background-color:#eff1f5;color:#4f5b66;" class="language-toml "><code class="language-toml" data-lang="toml"><span>[default]
</span><span style="color:#bf616a;">forge </span><span>= &quot;</span><span style="color:#a3be8c;">gitea</span><span>&quot;
</span><span>
</span><span>[default.gitea]
</span><span style="color:#bf616a;">host </span><span>= &quot;</span><span style="color:#a3be8c;">https://gitea.com</span><span>&quot;
</span><span style="color:#bf616a;">api_key </span><span>= &quot;</span><span style="color:#a3be8c;">generate-the-api-key-from-gitea-and-paste-here</span><span>&quot;
</span><span style="color:#bf616a;">username </span><span>= &quot;</span><span style="color:#a3be8c;">fluxer101</span><span>&quot;
</span><span style="color:#bf616a;">password </span><span>= &quot;</span><span style="color:#a3be8c;">flux101</span><span>&quot;
</span></code></pre>
<p>Note that the API key in Gitea is known as an access token, one which can be
generated <a href="https://gitea.com/user/settings/applications">here</a>.</p>
<h2 id="faq">FAQ</h2>
<h3 id="why-does-an-integrity-error-show-up">Why does an integrity error show up?</h3>
<p>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 <code>instance/</code> directory where the database
for the service would be stored, to rebuild it the next time the application is run.</p>
</div>
</article>
</main>
<script type="text/javascript" src="https://docs.forgeflux.org/elasticlunr.min.js" defer></script>
<script type="text/javascript" src="https://docs.forgeflux.org/search_index.en.js" defer></script>
<script type="text/javascript" src="https://docs.forgeflux.org/js.js" defer></script>
</body>
</html>