project-origin-registry

by Project Origin

Helm chartv3.2.0-rc.3App 3.2.0-rc.3

A helm chart for deploying the Project Origin Registry, includes the registry, verifiers and concordium node.

About this chart

Project Origin - Registry

This Helm chart is used to deploy a registry for the Project Origin

WARNING ⚠️

From version 2.0 there is a breaking changes from 1.x, the cloudnative pg and rabbitmq operator has been removed from the chart. Please first migrate to 1.3.1 to ensure helm does not delete the database.

From 2.0 the database, rabbitmq, verifier and concordium must be installed separately.

Requirements

The registry requires the following other components to have been installed:

  • A ProjectOrigin verifier
  • PostgreSQL database
  • RabbitMQ message broker with rabbitmq_management plugin enabled

Verifier

To install a verifier one can find the ETT electricity chart at here, and the guide on how to install it in its readme.

When installed, the registry must be configured using the following:

verifiers:
  - type: project_origin.electricity.v1
    url: http://${SERVICENAME}.${NAMESPACE}.svc.cluster.local:5000

PostgreSQL

The registry requires a PostgreSQL database to store its data.

Below is an example of how to install a PostgreSQL database using the bitnami helm chart:

helm install my-postgres oci://registry-1.docker.io/bitnamicharts/postgresql --version 15.5.23

The registry must be configured to use the database using the following, this assumes same namespace as the registry:

postgresql:
  host: my-postgres
  database: postgres
  username: postgres
  password:
    secretRef:
      name: my-postgres
      key: postgres-password

RabbitMQ

The registry requires a RabbitMQ message broker to queue and process transactions.

Below is an example of how to install a RabbitMQ message broker using the bitnami helm chart:

helm install my-rabbitmq oci://registry-1.docker.io/bitnamicharts/rabbitmq --version 14.6.6

The registry must be configured to use the RabbitMQ using the following, this assumes same namespace as the registry:

rabbitmq:
  host: my-rabbitmq
  username: user
  password:
    secretRef:
      name: my-rabbitmq
      key: rabbitmq-password

Installing the Chart

To install the chart with the release name my-example-registry and configured using values.yaml one can use the following command:

helm install -f values.yaml my-example-registry project-origin-registry --version 0.2.0-rc.1 --repo https://project-origin.github.io/helm-registry .

Ingress

The chart does not include ingress, but must be configured if to expose it externally.

Verify the setup

To verify the setup one can use the Electricy Example available in the project-origin/registry repository and using the key generated when installing the verifier.

To run the example one can use the following command:

EXAMPLE_AREA="Narnia"
PRIVATE_KEY_BASE64=$(cat narnia.pem | base64 -w 0)
REGISTRY_NAME="my-example-registry"
REGISTRY_URL= # the url of the registry, e.g. http://my-example-registry:5000
dotnet run --project src/ProjectOrigin.Registry.ChartTests WithoutWalletFlow $example_area $PrivateKeyBase64 $REGISTRY_NAME $REGISTRY_URL

Deploy project-origin-registry with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has project-origin-registry 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 chartproject-origin-registry is pinned at v3.2.0-rc.3 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