Skip to main content

Overview

This tutorial will guide you through the process of deploying your Euclid metagraph project to a cloud provider and connecting to IntegrationNet or MainNet. We focus on AWS specifically but the basic principles would apply to any cloud provider.

Deploying a Metagraph with Euclid

Utilize Euclid for deploying metagraphs efficiently. Initiate deployment to your remote hosts, including all necessary files and dependencies, with the following command:

./scripts/hydra remote-deploy

To start your nodes, execute:

./scripts/hydra remote-start

For comprehensive guidance on utilizing these commands, consult the README file in the Euclid repository.

Additionally, we offer a demonstration video showcasing this functionality, available here.

Architecture

There are many kinds of potential deployment architectures possible for production deployments depending on project scaling needs. Here, we will focus on a deployment strategy that uses a minimal set of infrastructure components to simplify deployment and reduce cloud costs. For most projects, this offers a good starting point that can be expanded on later to meet specific project needs.

We will be deploying a Metagraph Framework metagraph using a Data Application. This type of metagraph consists of 4 layers in total:

  • Global L0: Hypergraph node on IntegrationNet or MainNet
  • Metagraph L0: Metagraph consensus layer
  • Currency L1: Metagraph layer for accepting and validating token transactions
  • Data L1: Metagraph layer for accepting and validating data updates

In this guide, we will deploy all 4 layers to each of 3 EC2 instances. In other words, we will only use 3 servers but each server will act as a node on each of the 4 layers. This allows all layers to have the minimum cluster size to reach consensus (3), while also being conscious of infrastructure costs by combining each layer onto the same EC2 instances. Each layer will communicate over custom ports which we will configure as part of this process.

Deployed Architecture:

Metagraph Architecture

Requirements

  • AWS Account
  • A metagraph project built and tested locally in Euclid
  • At least 3 p12 files. Refer to this guide on how to generate p12 files.
  • Ensure that the ID of all your p12 files is on the appropriate network seedlist (IntegrationNet or MainNet) otherwise, you won't be able to connect to the network. Check the seedlist to verify your IDs are included.

Guide

This guide will walk you through a series of steps to manually configure your nodes via the AWS console. We will configure AWS, build all code on a base instance that we will then convert to an AWS AMI to be used as a template for creating the rest of the nodes. This allows us to build once, and then duplicate it to all of the EC2 instances. Then we will configure each of the nodes with their own P12 file and other details specific to each node.

We will walk through the following steps: