-
Notifications
You must be signed in to change notification settings - Fork 101
docs: mi/3419/rafiki testnet deploy #3586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hajjimo
wants to merge
7
commits into
main
Choose a base branch
from
mi/3419/rafiki-testnet-deploy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
15af72c
docs: mi/3419/rafiki-testnet-deploy
hajjimo f021ed7
docs: mi/3149/deployment-example
hajjimo 75b09c8
docs: mi/3419/rafiki-testnet-deployment-guide
hajjimo d141aec
Merge branch 'main' into mi/3419/rafiki-testnet-deploy
hajjimo 1f3278f
test(backend): update actionable incoming payment test
mkurapov 7a3910c
Revert "test(backend): update actionable incoming payment test"
mkurapov 78cb805
docs: mi/3419/rafiki-testnet-deploy
hajjimo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
191 changes: 191 additions & 0 deletions
191
...tation/src/content/docs/integration/deploy-to-prod/01-architecture-overview.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,191 @@ | ||
| --- | ||
| title: Overview | ||
| --- | ||
|
|
||
| import { | ||
| MermaidWrapper, | ||
| Mermaid, | ||
| LinkOut, | ||
| Tooltip | ||
| } from '@interledger/docs-design-system' | ||
|
|
||
| This guide provides an approach for you to deploy and integrate Rafiki on Google Cloud Platform (GCP) using Terraform, Kubernetes, Helm charts, and Argo CD. The reference architecture used in this guide is the <LinkOut href='https://github.com/interledger/testnet'>Interledger Test Network</LinkOut>. For this example we'll assume you are a digital wallet provider that wants to deploy your wallet application and Rafiki in your Kubernetes cluster. | ||
|
|
||
| :::caution | ||
| As the Interledger Test Network is used to showcase Rafiki's functionalities and to serve as a sandbox environment, this example is intended for informational purposes only and should not be used for a production deployment. | ||
| ::: | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Before beginning the integration, ensure you have the following: | ||
|
|
||
| - A <LinkOut href='https://cloud.google.com'>GCP</LinkOut> account with billing enabled | ||
| - The <LinkOut href='https://cloud.google.com/sdk'>gcloud CLI</LinkOut> installed and | ||
| authenticated | ||
| - Hashicorp <LinkOut href='https://developer.hashicorp.com/terraform/install'>Terraform</LinkOut> installed | ||
| - A <LinkOut href='https://cloud.google.com/kubernetes-engine'>Kubernetes</LinkOut> cluster deployed via GKE | ||
| - <LinkOut href='https://helm.sh/docs/intro/install/'>Helm</LinkOut> installed | ||
| - <LinkOut href='https://kubernetes.io/docs/tasks/tools/'>kubectl</LinkOut> installed | ||
| and configured | ||
| - The <LinkOut href='https://argo-cd.readthedocs.io/en/stable/cli_installation/'>argocd CLI</LinkOut> | ||
| - Domain name for your wallet (required for SSL/TLS certificates) | ||
|
|
||
| ## Architecture overview | ||
|
|
||
| The deployment follows the Interledger Test Network reference architecture, which includes: | ||
|
|
||
| - **GKE Cluster**: Managed Kubernetes cluster on GCP | ||
| - **Rafiki Services**: Core Interledger functionality (Admin API, Auth Service, Backend) | ||
| - **PostgreSQL**: Database for Rafiki and wallet data | ||
| - **Redis**: Caching and session management | ||
| - **NGINX Ingress**: Load balancing and SSL termination | ||
| - **Argo CD**: GitOps continuous deployment | ||
| - **Digital Wallet**: Your wallet application integrated with Rafiki | ||
| - **GateHub Integration**: Payment backend and ledger services | ||
|
|
||
| ## Reference architecture | ||
|
|
||
| The following diagram illustrates the architecture based on the Interledger Test Network wallet application with GateHub integration: | ||
|
|
||
| <MermaidWrapper diagramName="rafiki-architecture"> | ||
|
|
||
| <Mermaid | ||
| graph={`graph TD | ||
| %% External Services | ||
| Redis[Redis] | ||
| PostgreSQL1[PostgreSQL] | ||
| FreecurrencyAPI[FreecurrencyAPI] | ||
| GateHub[GateHub] | ||
| OpenPayments[Open Payments] | ||
|
|
||
| %% Core Rafiki System | ||
| Rafiki[Rafiki] | ||
| AdminAPI[Admin API] | ||
| AuthAPI[Auth API] | ||
|
|
||
| %% Wallet Backend Components | ||
| subgraph WalletBackend[Wallet Backend] | ||
| RatesService[Rates Service] | ||
| WebhookService[Webhook Service] | ||
| RafikiIntegration[Rafiki Integration] | ||
| GateHubService[GateHub Service] | ||
| InternalLedger[Internal Ledger System] | ||
| IDPLedgering[IDP & Ledgering] | ||
| NodeJS[Node.js] | ||
| ExpressJS[Express.js] | ||
| end | ||
|
|
||
| %% Frontend | ||
| subgraph WalletFrontend[Wallet Frontend] | ||
| NextJS[Next.js] | ||
| React[React] | ||
| end | ||
|
|
||
| %% Client | ||
| subgraph ClientDevices[Client] | ||
| Desktop[Desktop] | ||
| Mobile[Mobile] | ||
| end | ||
|
|
||
| %% Database for Open Payments | ||
| PostgreSQL2[PostgreSQL] | ||
|
|
||
| %% Connections | ||
| Redis --> Rafiki | ||
| PostgreSQL1 --> Rafiki | ||
|
|
||
| Rafiki --> AdminAPI | ||
| Rafiki --> AuthAPI | ||
|
|
||
| AdminAPI --> WalletBackend | ||
| AuthAPI --> WalletBackend | ||
|
|
||
| FreecurrencyAPI --> WalletBackend | ||
| GateHub --> WalletBackend | ||
|
|
||
| WalletBackend --> PostgreSQL2 | ||
| WalletBackend --> WalletFrontend | ||
|
|
||
| OpenPayments --> PostgreSQL2 | ||
| OpenPayments --> WalletBackend | ||
|
|
||
| WalletFrontend --> ClientDevices | ||
|
|
||
| %% Styling | ||
| classDef redisStyle fill:#DC382D,stroke:#333,stroke-width:2px,color:#fff | ||
| classDef postgresStyle fill:#336791,stroke:#333,stroke-width:2px,color:#fff | ||
| classDef rafikiStyle fill:#4ECDC4,stroke:#333,stroke-width:2px,color:#fff | ||
| classDef openPaymentsStyle fill:#00A86B,stroke:#333,stroke-width:2px,color:#fff | ||
| classDef apiStyle fill:#FF69B4,stroke:#333,stroke-width:2px,color:#fff | ||
| classDef walletBackendStyle fill:#E6F3FF,stroke:#333,stroke-width:2px | ||
| classDef frontendStyle fill:#E8F5E8,stroke:#333,stroke-width:2px | ||
| classDef clientStyle fill:#E6E6FA,stroke:#333,stroke-width:2px | ||
| classDef nodeStyle fill:#68A063,stroke:#333,stroke-width:2px,color:#fff | ||
| classDef gatehubStyle fill:#1E3A8A,stroke:#333,stroke-width:2px,color:#fff | ||
|
|
||
| class Redis redisStyle | ||
| class PostgreSQL1,PostgreSQL2 postgresStyle | ||
| class Rafiki rafikiStyle | ||
| class OpenPayments openPaymentsStyle | ||
| class AdminAPI,AuthAPI apiStyle | ||
| class WalletBackend walletBackendStyle | ||
| class WalletFrontend frontendStyle | ||
| class ClientDevices clientStyle | ||
| class NodeJS nodeStyle | ||
| class GateHub,GateHubService gatehubStyle`} | ||
| /> | ||
|
|
||
| </MermaidWrapper> | ||
|
|
||
| ## Component details | ||
|
|
||
| ### External services | ||
|
|
||
| - **Redis**: Provides caching and session management for the Rafiki system | ||
| - **FreecurrencyAPI**: External service providing real-time currency exchange rates | ||
| - **GateHub**: Payment backend service providing ledger and payment processing capabilities | ||
|
|
||
| ### Database layer | ||
|
|
||
| - **PostgreSQL (Rafiki)**: Primary database storing Interledger accounts, wallet addresses, and core transaction data | ||
| - **PostgreSQL (Open Payments)**: Dedicated database for Open Payments protocol data and wallet-specific information | ||
|
|
||
| ### Rafiki core services | ||
|
|
||
| - **Rafiki**: Core Interledger payment engine handling protocol implementation and payment processing | ||
| - **Admin API**: GraphQL interface for administrative functions and account management | ||
| - **Auth API**: Authentication and authorization service implementing Open Payments standards | ||
|
|
||
| ### GKE cluster - wallet services | ||
|
|
||
| #### Wallet backend namespace | ||
|
|
||
| - **Wallet Backend**: Main Node.js/Express application orchestrating wallet functionality | ||
| - **Rates Service**: Handles currency exchange rate management and calculations | ||
| - **Webhook Service**: Manages incoming webhook notifications from external services | ||
| - **Rafiki Integration**: Interface layer for communication with Rafiki services | ||
| - **GateHub Service**: Integration component for GateHub payment backend | ||
| - **Internal Ledger System**: Manages internal transaction ledgering and accounting | ||
| - **IDP & Ledgering**: Identity provider integration and additional ledger management | ||
|
|
||
| #### Wallet frontend namespace | ||
|
|
||
| - **Wallet Frontend**: Next.js/React application providing the user interface | ||
|
|
||
| #### Ingress layer | ||
|
|
||
| - **NGINX Ingress**: Routes external traffic to appropriate services based on hostname and path | ||
| - **cert-manager**: Automatically provisions and manages SSL/TLS certificates | ||
|
|
||
| #### Platform services | ||
|
|
||
| - **Argo CD**: GitOps continuous deployment system managing application deployments | ||
| - **Monitoring**: Prometheus metrics collection and Grafana dashboards for system observability | ||
|
|
||
| ## Next steps | ||
|
|
||
| 1. **[Configuration variables](/integration/deploy-to-prod/02-configuration-variables)**: Review all variables that need customization for your environment | ||
| 2. **[Secrets management](/integration/deploy-to-prod/03-secrets-management)**: Set up secure secret generation, storage, and rotation strategies | ||
| 3. **[Infrastructure setup](/integration/deploy-to-prod/04-infrastructure-setup)**: Deploy GCP infrastructure using Terraform | ||
| 4. **[Rafiki services deployment](/integration/deploy-to-prod/05-services-deployment)**: Install and configure all services using Helm and Argo CD | ||
| 5. **[Troubleshooting](/integration/deploy-to-prod/06-troubleshooting)**: Verify end-to-end payment flows and resolve common issues | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.