Deploy a Metagraph
Last updated
Was this helpful?
Last updated
Was this helpful?
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:
To start your nodes, execute:
For comprehensive guidance on utilizing these commands, consult the README file in the .
Additionally, we offer a demonstration video showcasing this functionality, available .
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 using a . 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:
AWS Account
A metagraph project built and tested locally in Euclid
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:
At least 3 p12
files. Refer to 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 to verify your IDs are included.
: Create a security group for the nodes and open the proper network ports for communication.
: Create SSH keys to securely connect to the nodes.
: Build a server image as an AWS AMI to be reused for each of the nodes.
: Add all dependencies and upload metagraph project files to the base instance.
: Convert the base instance into a reusable AMI.
: Using the AMI created in previous steps as a template, generate all 3 EC2 instances.
: Configure each of the 4 layers and join to the network.