Deployment

SPAR Deployment

The instructions here pertain to the deployment of all SPAR components on the Kubernetes cluster using Helm charts. The charts install SPAR components along with the Postgresql server specific to SPAR. All the components are installed in the same namespace. The deployment may be achieved by the following methods:

  • Using Rancher UI

  • Using command line

Prerequisites

Before you deploy SPAR, make sure the following are available:

  • eSignet (required only if SPAR Self Service API is being installed)

  • Cluster Owner permission on your cluster

  • Namespace in which you would be installing SPAR is created on the cluster

Installation using Rancher UI

  1. Log in to Rancher admin console.

  2. Select your cluster.

  3. Under Apps -> Repositories click on Create to add a repository.

  4. Provide Name as "openg2p" and target HTTPS Index URL as https://openg2p.github.io/openg2p-helm/rancher and click Create.

  5. Navigate to Apps->Charts page on Rancher. You should see OpenG2P SPAR Helm chart listed.

  1. Click on the Helm chart, select the version to be installed and click Install.

  2. Select the namespace in which you would like the chart to be installed (you will need to create a namespace upfront if it does not already exist) and select the checkbox Customise Helm options before install.

  3. Provide Global Hostname of the installation. Refer to DNS requirements for mapping the hostname.

  4. Select the components to be installed and the eSignet base URL. The latter is required only if you are installing SPAR Self Service.

  5. Click Next and then Install.

Installation using the command line

  • Install the following utilities on your machine:

    • kubectl, istioctl, helm, jq, curl, wget, git, bash, envsubst.

  • Clone the https://github.com/openg2p/openg2p-spar-deployment repo. Switch to the branch of interest. Navigate to deployment directory.

  • Run.

    SPAR_HOSTNAME=spar.openg2p.sandbox.net \
      NS=openg2p \
      ./install.sh

After installation, SPAR is accessible over following URLs based on the SPAR_HOSTNAME given above:

  • SPAR Self Service UI: https://spar.openg2p.sandbox.net

  • SPAR Self Service API: https://spar.openg2p.sandbox.net/spar/v1

  • SPAR Mapper: https://spar.openg2p.sandbox.net/mapper/v1

Database

Postgresql is installed as part of the above procedure in the same namespace. The default database created is spardb.

Onboard SPAR on eSignet

  • Create OIDC Client for SPAR in eSignet. Follow the method suggested by the ID Provider.

    • If using mock eSignet, use this API to create OIDC client.

  • During OIDC client creation, you will be asked for (or given) a client ID and private key JWK as client secret.

  • Edit the SPAR DB, login_provider table and modify the authorization_parameters row of the first entry, with:

    • appropriate URLs for authorize_endpoint , token_endpoint , validate_endpoint, jwks_endpoint, and redirect_uri fields.

    • above client ID under the client_id field.

    • and above private key jwk under the client_assertion_jwk field.

  • Seed/edit metadata of banks, wallets, branches, etc for the SPAR self-service portal in database. TODO: Elaborate.

Sanity testing

TBD

Last updated

Logo

Copyright © 2024 OpenG2P. This work is licensed under Creative Commons Attribution International LicenseCC-BY-4.0 unless otherwise noted.