From a02e32aac7db9335e6b05bf6bec21cba92d9e5d0 Mon Sep 17 00:00:00 2001
From: brad-dow <162852233+brad-dow@users.noreply.github.com>
Date: Fri, 6 Dec 2024 15:42:16 -0600
Subject: [PATCH] docs: peering integration guide
Initial draft (repurposed the manging peering relationships admin page into a technical integration guide)
Completed a few tasks from https://github.com/interledger/rafiki/issues/3139 as well, including the following:
- Place the peering integration doc within the Integration > Requirements section.
- Create a new section in Integration, called Deployment, and move the "Docker Compose" and "Helm and Kubernetes" pages into the section.
- Move Integration > Services so that it's a subsection of Deployment (e.g., Integration > Deployment > Services > auth service).
- The content in the "Manage peering relationships" page should become part of Brad's peering integration page. The "Manage" page should go away.
- Update sidenav's TOCs as needed
---
packages/documentation/astro.config.mjs | 74 ++---
.../{prod => deployment}/docker-compose.mdx | 0
.../{prod => deployment}/helm-k8s.mdx | 0
.../services/auth-service.mdx | 0
.../services/backend-service.mdx | 4 +-
.../services/frontend-service.mdx | 0
.../services/token-introspection.mdx | 0
.../docs/integration/requirements/peers.mdx | 287 ++++++++++++++++++
.../docs/overview/concepts/interledger.mdx | 2 +-
9 files changed, 330 insertions(+), 37 deletions(-)
rename packages/documentation/src/content/docs/integration/{prod => deployment}/docker-compose.mdx (100%)
rename packages/documentation/src/content/docs/integration/{prod => deployment}/helm-k8s.mdx (100%)
rename packages/documentation/src/content/docs/integration/{ => deployment}/services/auth-service.mdx (100%)
rename packages/documentation/src/content/docs/integration/{ => deployment}/services/backend-service.mdx (95%)
rename packages/documentation/src/content/docs/integration/{ => deployment}/services/frontend-service.mdx (100%)
rename packages/documentation/src/content/docs/integration/{ => deployment}/services/token-introspection.mdx (100%)
create mode 100644 packages/documentation/src/content/docs/integration/requirements/peers.mdx
diff --git a/packages/documentation/astro.config.mjs b/packages/documentation/astro.config.mjs
index 6fcebb9397..f1615952b6 100644
--- a/packages/documentation/astro.config.mjs
+++ b/packages/documentation/astro.config.mjs
@@ -112,6 +112,10 @@ export default defineConfig({
label: 'Assets',
link: '/integration/requirements/assets'
},
+ {
+ label: 'Peers',
+ link: '/integration/requirements/peers'
+ },
{
label: 'Wallet addresses',
link: '/integration/requirements/wallet-addresses'
@@ -134,36 +138,6 @@ export default defineConfig({
}
]
},
- {
- label: 'Docker Compose',
- link: '/integration/prod/docker-compose'
- },
- {
- label: 'Helm and Kubernetes',
- link: '/integration/prod/helm-k8s'
- },
- {
- label: 'Services',
- collapsed: true,
- items: [
- {
- label: 'Auth service',
- link: '/integration/services/auth-service'
- },
- {
- label: 'Backend service',
- link: '/integration/services/backend-service'
- },
- {
- label: 'Frontend service',
- link: '/integration/services/frontend-service'
- },
- {
- label: 'Token introspection',
- link: '/integration/services/token-introspection'
- }
- ]
- },
{
label: 'Test locally',
collapsed: true,
@@ -181,6 +155,42 @@ export default defineConfig({
link: '/integration/playground/testnet'
}
]
+ },
+ {
+ label: 'Deployment',
+ collapsed: true,
+ items: [
+ {
+ label: 'Services',
+ collapsed: true,
+ items: [
+ {
+ label: 'Auth service',
+ link: '/integration/deployment/services/auth-service'
+ },
+ {
+ label: 'Backend service',
+ link: '/integration/deployment/services/backend-service'
+ },
+ {
+ label: 'Frontend service',
+ link: '/integration/deployment/services/frontend-service'
+ },
+ {
+ label: 'Token introspection',
+ link: '/integration/deployment/services/token-introspection'
+ }
+ ]
+ },
+ {
+ label: 'Docker Compose',
+ link: '/integration/deployment/docker-compose'
+ },
+ {
+ label: 'Helm and Kubernetes',
+ link: '/integration/deployment/helm-k8s'
+ },
+ ]
}
]
},
@@ -192,10 +202,6 @@ export default defineConfig({
label: 'Rafiki Admin',
link: '/admin/admin-user-guide'
},
- {
- label: 'Manage peering relationships',
- link: '/admin/manage-peering'
- },
{
label: 'Manage liquidity',
link: '/admin/manage-liquidity'
diff --git a/packages/documentation/src/content/docs/integration/prod/docker-compose.mdx b/packages/documentation/src/content/docs/integration/deployment/docker-compose.mdx
similarity index 100%
rename from packages/documentation/src/content/docs/integration/prod/docker-compose.mdx
rename to packages/documentation/src/content/docs/integration/deployment/docker-compose.mdx
diff --git a/packages/documentation/src/content/docs/integration/prod/helm-k8s.mdx b/packages/documentation/src/content/docs/integration/deployment/helm-k8s.mdx
similarity index 100%
rename from packages/documentation/src/content/docs/integration/prod/helm-k8s.mdx
rename to packages/documentation/src/content/docs/integration/deployment/helm-k8s.mdx
diff --git a/packages/documentation/src/content/docs/integration/services/auth-service.mdx b/packages/documentation/src/content/docs/integration/deployment/services/auth-service.mdx
similarity index 100%
rename from packages/documentation/src/content/docs/integration/services/auth-service.mdx
rename to packages/documentation/src/content/docs/integration/deployment/services/auth-service.mdx
diff --git a/packages/documentation/src/content/docs/integration/services/backend-service.mdx b/packages/documentation/src/content/docs/integration/deployment/services/backend-service.mdx
similarity index 95%
rename from packages/documentation/src/content/docs/integration/services/backend-service.mdx
rename to packages/documentation/src/content/docs/integration/deployment/services/backend-service.mdx
index b9115744c8..bd792915f3 100644
--- a/packages/documentation/src/content/docs/integration/services/backend-service.mdx
+++ b/packages/documentation/src/content/docs/integration/deployment/services/backend-service.mdx
@@ -39,7 +39,7 @@ Some of the responsibilities of a connector include:
- Authenticating packets against ILP account credentials.
- Forwarding packets to a sender or receiver.
-- Rejecting a packet for any number of reasons, including expiration, insufficient liquidity, rate limit exceeded, or if the amount exceeds the `maxPacketAmount` [agreed to](/admin/manage-peering) by the connector and its peer.
+- Rejecting a packet for any number of reasons, including expiration, insufficient liquidity, rate limit exceeded, or if the amount exceeds the `maxPacketAmount` [agreed to](/integration/requirements/peers#prerequisites) by the connector and its peer.
- Converting currencies.
- Fulfilling packets with an internal STREAM server.
@@ -48,7 +48,7 @@ The `backend` service includes an HTTP server listening on the configured `CONNE
Similarly, if a packet's destination address corresponds to a peer, your connector will forward the packet to your peer over HTTP, along with your peer's outgoing HTTP `authToken`.
:::note[Auth tokens]
-You and your peer should have exchanged incoming and outgoing auth tokens as part of establishing your [peering relationship](/admin/manage-peering).
+You and your peer should have exchanged incoming and outgoing auth tokens as part of establishing your [peering relationship](/integration/requirements/peers#prerequisites).
:::
A packet can either continue on to your peer via HTTP or terminate at your Rafiki instance's STREAM server. If the packet terminates at your STREAM server, your connector will attempt to extract and decode the payment tag from the packet's destination address. When your connector successfully matches the tag with a locally managed wallet address or incoming payment, the connector will not forward the packet. Instead, it will credit the corresponding balance and track the total amount received in Redis to support STREAM receipts. Packets addressed to a wallet address happen via SPSP.
diff --git a/packages/documentation/src/content/docs/integration/services/frontend-service.mdx b/packages/documentation/src/content/docs/integration/deployment/services/frontend-service.mdx
similarity index 100%
rename from packages/documentation/src/content/docs/integration/services/frontend-service.mdx
rename to packages/documentation/src/content/docs/integration/deployment/services/frontend-service.mdx
diff --git a/packages/documentation/src/content/docs/integration/services/token-introspection.mdx b/packages/documentation/src/content/docs/integration/deployment/services/token-introspection.mdx
similarity index 100%
rename from packages/documentation/src/content/docs/integration/services/token-introspection.mdx
rename to packages/documentation/src/content/docs/integration/deployment/services/token-introspection.mdx
diff --git a/packages/documentation/src/content/docs/integration/requirements/peers.mdx b/packages/documentation/src/content/docs/integration/requirements/peers.mdx
new file mode 100644
index 0000000000..1293d8875d
--- /dev/null
+++ b/packages/documentation/src/content/docs/integration/requirements/peers.mdx
@@ -0,0 +1,287 @@
+---
+title: Peering integration guide
+---
+
+import { CodeBlock, LinkOut } from '@interledger/docs-design-system'
+
+To join the Interledger network and be able to send and receive payments, you must add one or more peer(s) to your Rafiki instance. Peering establishes the connections needed for your Rafiki instance to interact with another account servicing entity (ASE). The purpose of this guide is to help you set up and manage peers.
+
+While this guide focuses on the conceptual and technical steps of adding and managing peers via the Backend Admin API, the Rafiki Admin application offers the same functionality in a user-friendly interface.
+
+Refer to the [Rafiki Admin user guide](/admin/admin-user-guide#peers) for detailed instructions and examples of creating and managing peers through the application.
+
+:::tip
+Whether you are using the Backend Admin API or the Rafiki Admin application, the underlying configurations and requirements remain the same. Choose the interface that best suits your individual workflow.
+:::
+
+## Prerequisites
+
+Before adding a peer, you and the account servicing entity you intend to peer with must both:
+
+- Run an implementation of an [Interledger connector](/integration/services/backend-service#interledger-connector) (ideally Rafiki).
+- Agree on an [asset](/overview/concepts/accounting#assets) for the peering relationship. You can set up multiple peering relationships with the same peer based on different assets. At least one asset shared by you and your peer must be added to your Rafiki instance prior to setting up the peering relationship. For more information, refer to [Assets](/integration/requirements/assets/).
+- Agree on a `maxPacketAmount` value, which specifies how many packets a payment is split into.
+- Communicate your respective static