Coder Social home page Coder Social logo

tezos-infra's Introduction


Logo

Tezos Infrastructure for the serialCore project

This repository outlines the necessary steps to setup a Tezos Node, a TzKT blockchain indexer aswell as the necessary monitoring framework with Grafana and Prometheus.

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

The infrastructure is part of a bigger project of generative art called serialCore. The scripts in this repository are regrouping the knowledge that has been acquired through experimentation and learning. It allows to setup a whole Tezos blockchain stack comprised of a non-baking node (RPC), with a blockchain indexer called TzKT and a monitoring stack to keep watch over the Docker instances.

The goal of having one's own Tezos stack is to be able to interact more freely with the blockchain, without having the limitations of the publicly accessible services. When a high load is requested, it's not rare of having slow downs or freezes on the public instances.

All credits have been added where they were due.

(back to top)

Built With

(back to top)

Getting Started

First and foremost step is to get either a VPS, or a dedicated server to host the Tezos Node, the TzKT blockchain indexer and the monitoring stack. Current preferred provider is Servdiscount. Recommended specifications: 8(v)Cores / 16GB RAM / 500GB+ (SSD is recommended)

Note: these steps are valid on a CentOS 7 distribution but can be reproduced with some changes on any other distro (Ubuntu, Debian...).

Prerequisites

A general knowledge of *nix system is a prerequisite.

This script will add a few necessary things to your CentOS installation (Development tools, Docker Community Edition and Docker Compose, NTP Syncing)

Downloading and running the script (run as root/sudo):

cd ~
curl -L https://raw.githubusercontent.com/somaticbits/tezos-infra/main/CentOS-post-install.sh?token=GHSAT0AAAAAABUJMUQH77COOYNXH5XPFHWIYT6EJ4A -o post-install.sh
chmod +x post-install.sh
./post-install.sh

If this error occurs: Failed to set locale, defaulting to C, refer to this post: unixstackexchange

Once everything installed, create a new account (here tezos), add a password and grant root permissions:

adduser tezos
passwd tezos
usermod -aG wheel tezos

Installation

  1. Clone this repository
    git clone https://github.com/somaticbits/tezos-infra
  2. Switch to the tezos-infra folder
  3. Add execution permission to scripts
    chmod +x install-*
  4. Install the RPC (node)
    ./install-node.sh
  5. Install TzKT
    ./install-tzkt.sh
  6. Install NGINX
    ./install-nginx.sh
  7. (optional) Install monitoring stack
    ./install-monitoring.sh

(back to top)

Usage

  • Node: once installed, you need to exchange the RPC Url in your wallet of choice. In Temple, open the settings and under Network, you can set your freshly installed node. Forget about overcrowded public nodes.
    If the container crashes, fire it back up with TEZOS_VERSION=TEZOS_VERSION sudo docker-compose up -d in the repo folder. TEZOS_VERSION in this case is the one defined in the config.sh file (example v12.0-rc1). It relies on the docker-compose.yml to restart the container, and will at this point restart automatically if it crashes again.

  • TzKT: this part of the infrastructure allows you to use the TzKT api under your own address of choice. For more documentation, please relate to the official documentation: TzKT API Docs

  • Monitoring stack: This part can be accessed via the MONITOR_URL variable you set in the config.sh file (an example would be: https://monitor.somaticbits.xyz).
    Password is set in the config.monitoring file which can be found in the monitoring folder. Current default password: TezosIsTheBest. Login: admin
    The RPC node is monitored via the Tezos dashboard, generic container metrics can be found under Docker Prometheus Monitoring dashboard. An additional datasource has been added and can be used to access directly the PostgreSQL Database from TzKT.

(back to top)

Contact

David Pettersson - @somaticbits - [email protected]

Project Link: https://github.com/somaticbits/tezos-infra

(back to top)

Acknowledgments

(back to top)

tezos-infra's People

Contributors

d-pettersson avatar

Watchers

somaticbits avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.