bpa

by frank-bee

Helm chartv0.12.4App sha-c2b76caVerified publisher

The BPA allows organizations to verify, hold, and issue verifiable credentials.

About this chart

bpa

The BPA allows organizations to verify, hold, and issue verifiable credentials.

The Business Partner Agent allows to manage and exchange master data between organizations.

This chart will install a business partner agent (bpa-core, bpa-acapy) and postgres. It will also create the default ingress routes.

TL;DR

helm repo add bpa https://labs.hyperledger.org/business-partner-agent-chart/
helm repo update
helm upgrade \
	--set global.ingressSuffix=.example.com \
   	mybpa bpa/bpa -i -n mynamespace

Introduction

This chart bootstraps a business partner agent deployment on a Kubernetes cluster using the Helm package manager. Its default installation comes with PostgreSQL. Ingress routes are generated and activated, allowing the agent to communicate with other agents outside the cluster.

Requirements

  • Kubernetes 1.12+
  • Docker
  • Helm v3.3.4+
  • PV provisioner support in the underlying infrastructure (for PostgreSQL persistence)
  • If activating Ingress (with is the default!):
    • Ingress controller installed
    • Cert-manager (TLS required/assumed for both endpoint: public profile and acapy)
    • DNS records pointing to your routes

Initial preparation

The following steps have to be done only once.

Installing the chart

To install the chart with the release name bpa and generated ingress as subdomains of example.com in the namespace mynamespace

helm repo add bpa https://labs.hyperledger.org/business-partner-agent-chart/
helm repo update
helm upgrade \
	--set global.ingressSuffix=.example.com \
   	mybpa bpa/bpa -i -n mynamespace

Get the generated application URL by running kubectl

kubectl get ingress -n mynamespace

Like this we deployed the BPA (bpa-core & bpa-acapy) and Postgres on the Kubernetes cluster in the default configuration. The Values section list the parameters that can be configured during installation.

Install chart with values file

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. E.g. deploying the chart to the IDunion network could be done as follows.

Remark: In IDunion the DID cannot be autogenerated, therefore a seed has to be configured as pre-requisite. To do so, create a secret in the same namespace named <helm release>-acapy and a key called seed.

Create a yaml file.

cat <<EOT >> values-mybpa.yaml
acapy:
  agentName: did:sov:1234:agentname
  agentSeed: 12345678912345678912345678900011
  resources:
    requests:
      cpu: 100m
      memory: 256Mi
bpa:
  config:
    bootstrap:
      password: changeme
      username: admin
    ledger:
      browser: https://explorer.idu.network
    name: My BPA
  resources:
    requests:
      cpu: 100m
      memory: 256Mi
global:
  ingressSuffix: .example.com
postgresql:
  persistence:
    enabled: true
    size: 1Gi
    storageClass: default
  resources:
    requests:
      cpu: 100m
      memory: 256Mi
schemas:
  config:
    bank-account:
      defaultAttributeName: iban
      id: UmZ25DANwS6ngGWB4ye4tN:2:BankAccount:0.1
      label: Bank Account
      restrictions:
      - issuerDid: did:sov:UmZ25DANwS6ngGWB4ye4tN
        label: Demo Bank
    commercial-register:
      defaultAttributeName: companyName
      id: R6WR6n7CQVDjvvmwofHK6S:2:commercialregister:0.1
      label: Commercial Register
      restrictions:
      - issuerDid: did:sov:R6WR6n7CQVDjvvmwofHK6S
        label: Commercial Register
  enabled: true

EOT

Install the chart with the release name mybpa, in the namespace mynamespace.

helm upgrade \
	--values values-mybpa.yaml \
   	mybpa bpa/bpa -i -n mynamespace

Install multiple bpa instances

You could easily deploy a second business partner agent like this, e.g. for demo purpose. Just use a different helm release name, the seed of another DID and different ingress host names.

Install in local development cluster

No special handling, should work the same way as with a remote cluster. With minikube you would

Install and run minikube (see also minikube documentation)

 curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
 sudo install minikube-linux-amd64 /usr/local/bin/minikube 
 minikube start --vm-driver=docker

Install the chart

helm upgrade \
	--values values-mybpa.yaml \
   	mybpa bpa/bpa -i -n mynamespace

Uninstalling the Chart

To uninstall/delete the my-release deployment:

helm delete mybpa

The command removes all the Kubernetes components but PVC's associated with the chart and deletes the release.

To delete the PVC's associated with my-release:

kubectl delete pvc -l release=mybpa

Note: Deleting the PVC's will delete postgresql data as well. Please be cautious before doing it.

Values

KeyTypeDefaultDescription
acapy.adminURLApiKeystring"2f9729eef0be49608c1cffd49ee3cc4a"Please change: key used to protect acapy's admin endpoint
acapy.affinityobject{}
acapy.agentSeedstring"5a7db011075444a19d9bcaed56ad624a"Please change: the agent seed, 32 characters e.g. a UUID without the dashes. If the ledger is bcovrin-test the seed will be registered automatically. In all other cases this needs to happen manually beforehand.
acapy.fullnameOverridestring""
acapy.image.pullPolicystring"IfNotPresent"
acapy.image.repositorystring"bcgovimages/aries-cloudagent"
acapy.image.tagstring"py36-1.16-1_0.7.4"Overrides the image tag whose default is the chart appVersion.
acapy.imagePullSecretslist[]
acapy.ingress.annotationsobject{}
acapy.ingress.enabledbooltrue
acapy.ingress.tlslist[]
acapy.labelOverridestring""
acapy.nameOverridestring""
acapy.nodeSelectorobject{}
acapy.openshift.route.enabledboolfalse
acapy.openshift.route.pathstring"/"
acapy.openshift.route.targetPortstring"http"
acapy.openshift.route.timeoutstring"30s"
acapy.openshift.route.tls.enabledbooltrue
acapy.openshift.route.tls.insecureEdgeTerminationPolicystring"None"
acapy.openshift.route.tls.terminationstring"edge"
acapy.openshift.route.wildcardPolicystring"None"
acapy.podAnnotationsobject{}
acapy.podSecurityContextobject{}
acapy.postgresqlobject{"database":"mywallet"}Used for backwards compatibility
acapy.postgresql.databasestring"mywallet"Can be used to overwrite 'postgresql.postgresqlDatabase', if set acapy and bpa backends use separate databases
acapy.readOnlyModeboolfalse
acapy.resources.requests.cpustring"100m"
acapy.resources.requests.memorystring"256Mi"
acapy.securityContext.runAsUserint1001
acapy.service.adminPortint8031
acapy.service.httpPortint8030
acapy.service.typestring"ClusterIP"
acapy.staticArgs.autoAcceptInvitesboolfalse
acapy.staticArgs.autoAcceptRequestsboolfalse
acapy.staticArgs.autoDiscloseFeaturesbooltrue
acapy.staticArgs.autoPingConnectionbooltrue
acapy.staticArgs.autoProvisionbooltrue
acapy.staticArgs.autoRespondCredentialOfferboolfalse
acapy.staticArgs.autoRespondCredentialProposalboolfalse
acapy.staticArgs.autoRespondCredentialRequestboolfalse
acapy.staticArgs.autoRespondMessagesboolfalse
acapy.staticArgs.autoRespondPresentationProposalbooltrue
acapy.staticArgs.autoRespondPresentationRequestboolfalse
acapy.staticArgs.autoStoreCredentialbooltrue
acapy.staticArgs.autoVerifyPresentationboolfalse
acapy.staticArgs.emitNewDidcommMimeTypebooltrue
acapy.staticArgs.emitNewDidcommPrefixbooltrue
acapy.staticArgs.enableUndeliveredQueuebooltrue
acapy.staticArgs.exchUseUnencryptedTagsbooltrue
acapy.staticArgs.logLevelstring"info"
acapy.staticArgs.monitorPingbooltrue
acapy.staticArgs.monitorRevocationNotificationbooltrue
acapy.staticArgs.notifyRevocationbooltrue
acapy.staticArgs.preserveExchangeRecordsboolfalse
acapy.staticArgs.publicInvitesbooltrue
acapy.staticArgs.walletTypestring"askar"indy or askar
acapy.tails.baseUrlOverridestring""Override the otherwise ledger-specifically generated base URL of the external tails server
acapy.tails.enabledboolfalseSet to true to enable revocation (external tails server required)
acapy.tails.uploadUrlOverridestring""Override the otherwise ledger-specifically generated upload URL of the external tails server
acapy.tolerationslist[]
acapy.walletKeystring"123"Please change: Wallet encryption key, be aware that if this value is changed later aca-py needs to be restarted with the '--wallet-rekey' param which is not mapped
bpa.affinityobject{}
bpa.config.bootstrap.passwordstring"changeme"Default password
bpa.config.bootstrap.usernamestring"admin"The name of the default admin user
bpa.config.creddef.revocationRegistrySizeint3000
bpa.config.frontendobject{"closeSidebar":false,"hideSidebarButton":false}Frontend runtime variables which are injected into the frontend code on container startup (only if at least one runtime variable value has been set). These function e.g. as feature toggles for specific frontend changes. NOTE: The container startup time is impacted by using these.
bpa.config.frontend.closeSidebarboolfalseSetting this to true keeps the sidebar in the frontend closed when loading the page in a browser
bpa.config.frontend.hideSidebarButtonboolfalseSetting this to true hides the sidebar burger button in the frontend. In combination with 'closeSidebar' the sidebar is completely gone.
bpa.config.i18n.fallbackLocalestring"en"
bpa.config.i18n.localestring"en"
bpa.config.imprint.enabledboolfalse
bpa.config.imprint.urlOverridestring""
bpa.config.jmx.enabledboolfalse
bpa.config.jmx.portint9999
bpa.config.ledger.browserUrlOverridestring""
bpa.config.logConfigurationFilestring"log4j2-prod.xml"log4j2 configuration file which must be in the classpath. Use log4j2.yml for non-json. Will be ignored if logging is set and has values.
bpa.config.loggingstringnillog configuration overwrite, if set logConfigurationFile will be ignored. Takes an array of logger names and levels. See also log4j2.
bpa.config.mailobject{"apiKey":"","apiSecret":"","username":""}Mailjet service integration, requires a developer account with verified sender email and generated api keys
bpa.config.mail.apiKeystring""Mail service api key
bpa.config.mail.apiSecretstring""Mail service api secret
bpa.config.mail.usernamestring""Mail service verified sender email address
bpa.config.nameOverridestring""Override name shown in the frontend (may contain whitespaces and so on). Default: Helm release name, capitalized
bpa.config.pg.schemastring""Sets the database schema the bpa backend should use, defaults to 'publlic' if empty
bpa.config.privacyPolicy.enabledboolfalse
bpa.config.privacyPolicy.urlOverridestring""
bpa.config.schemestring"https"The scheme that is used to register the profile endpoint on the ledger
bpa.config.security.allowedHostsobject{}Comma separated list of csp host sources, used to set allowed origins
bpa.config.security.enabledbooltrueEnable login page and endpoint security
bpa.config.security.strictbooltrueEnable strict strict security headers
bpa.config.titleOverridestring""Override title shown in the browser tab. Default: Helm release name, capitalized (or NameOverride if given)
bpa.config.web.onlyboolfalse
bpa.image.pullPolicystring"IfNotPresent"
bpa.image.repositorystring"ghcr.io/hyperledger-labs/business-partner-agent-new"
bpa.image.tagstring""Overrides the image tag whose default is the chart appVersion.
bpa.imagePullSecretslist[]
bpa.ingress.annotationsobject{}
bpa.ingress.enabledbooltrue
bpa.ingress.tlslist[]
bpa.nodeSelectorobject{}
bpa.openshift.route.enabledboolfalse
bpa.openshift.route.pathstring"/"
bpa.openshift.route.targetPortstring"http"
bpa.openshift.route.timeoutstring"30s"
bpa.openshift.route.tls.enabledbooltrue
bpa.openshift.route.tls.insecureEdgeTerminationPolicystring"None"
bpa.openshift.route.tls.terminationstring"edge"
bpa.openshift.route.wildcardPolicystring"None"
bpa.podAnnotationsobject{}
bpa.podSecurityContextobject{}
bpa.resources.limits.cpustring"2"
bpa.resources.limits.memorystring"384Mi"
bpa.resources.requests.cpustring"0.2"
bpa.re

Deploy bpa with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has bpa on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartbpa is pinned at v0.12.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply