tezosLink

Artifact Hub

TezosLink Community Kubernetes Helm Charts

Introduction

TezosLink provides a cutting-edge gateway to access the Tezos Network for dApps and bring the Tezos Link back from its ashes with an upgrade. It come along with a new dashboard with some key metrics to facilitate TezosLink usage and monitoring. With a turnkey solution and via Tezos K8s, thanks to oxheadalpha, it allows you to deploy a Tezos Node on a select cloud provider (AWS, GCP, Azure, Scaleway, etc …).

Architecture

(Schéma d’archi à rajouter)

Requirements

For a deployment on Cloud

You need: Kubernetes

Here are some official guides to get started with Kubernetes on Azure, AWS, GCP:

Tools

You need the following tools to install tezos-link :

For a deployment on your local workspace

You need :

Deployments

The installation of TezosLink is composed of several different Helm charts :

For Postgres, a managed Postgresql instance can also be used.

Release version

Helm charts Version
tezos-k8s x.x.x
tezoslink-proxy x.x.x
bitnami/postgresql 12.1.5
tezoslink-api x.x.x
bitnami/kube-prometheus 8.3.2

Tezos-k8s deployment

TezosLink is based on Tezos node. Thanks to the Oxhead Alpha Community, who provide a clean Helm chart to deploy a node on Tezos, depending on your needs. To do so, you have to :

1. Add the Helm chart repository to your local Helm installation

helm repo add my-repo https://oxheadalpha.github.io/tezos-helm-charts/

2. Install the nodes
Before installing the node, you need to choose some pararmeters according to your needs. They are initialised in the values.yml, located in tezos-k8s/charts/tezos

protocols:
  - command: PtLimaPt
    vote: {}
nodes:
  rolling-node:
    storage_size: 100Gi
    runs:
      - octez_node
    instances:
      - is_bootstrap_node: false
        config:
          shell:
            history_mode: rolling
          metrics_addr: [ "0.0.0.0:9932" ]
  archive-node:
    storage_size: 1000Gi
    runs:
      - octez_node
    instances:
      - is_bootstrap_node: false
        config:
          shell:
            history_mode: archive
          metrics_addr: [ "0.0.0.0:9932" ]
node_config_network:
  chain_name: mainnet
  chain_name: limanet
archive_tarball_url: https://mainnet.xtz-shots.io/archive-tarball 
archive_tarball_url: https://limanet.xtz-shots.io/archive-tarball
rolling_snapshot_url: https://mainnet.xtz-shots.io/rolling
rolling_snapshot_url: https://limanet.xtz-shots.io/rolling

Feel free to choose your snapshot provider.

Now that all the necessary variables are set, we can install the nodes.
We have two options:
a. either we clone the Tezos-K8s Repository and change the values according to our needs:

git clone https://github.com/oxheadalpha/tezos-k8s.git
cd tezos-k8s

We can access to tezos-k8s/charts/tezos/values.yml, to update the varaibles. And just run :

helm install <installation_name> charts/tezos --namespace <namespace> --create-namespace

b. either, after adding the oxheadalpha helm repository, directly deploy the nodes by setting the variables in the deploying command:

helm upgrade -i my-repo charts/tezos --version <refere to the release version section above> `
    --create-namespace --namespace <namespace> `
    --set images.octez="tezos/tezos:v15-release" `
    --set protocols[0].command="PtLimaPt" `
    ...

Kubernetes resources

  1. Connect to your kubernetes cluster via kubectl command
  2. Create the following namespace :
kubectl create namespace tezos-link
  1. Deploy the Bitnami PostgreSQL Helm chart :

3.1 create the following secret for the postgresql root user and for the api user :

kubectl create secret generic -n tezos-link tezos-link-postgresql `
    --from-literal=admin-password='Insert-a-strong-password' `
    --from-literal=tezos-link-backend-password='Insert-a-strong-password'

3.2 Deploy the PostgreSQL helm chart provided by bitnami :

helm repo add my-repo https://charts.bitnami.com/bitnami
helm upgrade -i tezoslink-postgresql bitnami/postgresql --version <refere to the release version section above> `
    --create-namespace --namespace tezoslink-postgresql `
    --set global.postgresql.auth.username="tz-backend" `
    --set global.postgresql.auth.database="tezoslink" `
    --set global.postgresql.auth.existingSecret="tezoslink-postgresql" `
    --set global.postgresql.auth.secretKeys.adminPasswordKey="admin-password" `
    --set global.postgresql.auth.secretKeys.userPasswordKey="tz-backend-password"

3.3 Deploy Prometheus helm chart provided by bitnami :

helm upgrade -i kube-prometheus bitnami/kube-prometheus --version <refere to the release version section above>  `
    --create-namespace --namespace kube-prometheus `
    --set alertmanager.enabled="false" `
    --set blackboxExporter.enabled="false"