Skip to content

talentprotocol/blockchain-indexer

Repository files navigation

Blockchain Indexer

This repository contains infrastructure to set up our Blockchain Indexers. It depends on the infrastructure as code repository https://github.com/talentprotocol/infrastructure-as-code

It differentiates between environments. We have two:

  • production
  • staging

Local Setup

Make sure you install all the tools defined inside .tool-versions file.

Terraform

WATCH OUT! I have put GitHub workflows that did automatic deployments off, because I believe it is quite dangerous to automatically apply terraform without first carefully inspecting the plan. And it is unfortunate, that GitHub actions does not allow me to manually trigger a workflow after inspecting the plan. So, terraform apply should be done manually from the local machine, after inspecting the plan suggested.

We have a distinct terraform project per environment. So, if you happen to run terraform commands, you will have to run them from the corresponding environment folder, i.e. terraform/production or terraform/staging.

Note:

I initialized terraform for each of these projects with the following commands:

terraform/<environment> $ terraform init

and

terraform/<environment> $ terraform providers lock --platform=linux_amd64 --platform=darwin_amd64

From Local Machine

Important

The following files are not checked in:

  • .env.<environment>

so, they can contain secrets.

But the following files ARE checked in:

  • ./terraform/.envrc
  • ./terraform/staging/.envrc
  • ./terraform/production/.envrc

So, they should not contain secrets.

How Tos

How do I connect via ssh to a node:

terraform/staging $ $(terraform output -raw ethereum_ssh_connect)

About

Blockchain Indexer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published