Connect to the instance
Last updated
Was this helpful?
Last updated
Was this helpful?
From your Instances
page, click on your instance.
Then you should see something like this:
Click on the Connect
button at the top of the page.
There are different ways to access the instance. In this example, we will connect using ssh
using the file downloaded in the Key pairs step.
Grant privileges to the SSH key
Use the ssh
command to connect to your instance
The name/IP of the instance will be different, but you can get the instructions on how to connect via ssh in the Connect to your instance
section of the EC2 Console.
If asked to confirm the fingerprint of the instance, type yes
.
Once connected, you should see a screen similar to this:
Now, you can begin setting up your instance.
Create base directory
Create a directory named code
and navigate into it. This will be the base directory that we will work out of.
Create layer directories
Create the following directories: global-l0
, metagraph-l0
, currency-l1
, and data-l1
. These will be the root directories for each of the layers.
Add Tessellation utilities to each directory
Replace "v2.2.0" with the latest version of Tessellation found here: https://github.com/Constellation-Labs/tessellation/releases
Install the necessary dependencies:
For each of the metagraph layers, code from your project must be compiled into executable jar files. During local development with Euclid these files are compiled for you and stored within the infra
directory of your project code. You can move these locally tested JAR files directly onto your base instance for deployment (recommended for this tutorial).
After ensuring that your project is ready for deployment, navigate to the following directory in your local Euclid codebase: infra -> docker -> shared -> jars
Within this directory, you will find the following JARs:
Use scp
to copy the files to your metagraph layer directories:
Alternative Option
Alternatively, you could choose to generate the JARs on the base instance itself. If you choose that route, you can follow the steps in the following guide.
Generating JARs on Base Instance
The genesis file is a configuration file that sets initial token balances on your metagraph at launch, or genesis. This allows your project to start with any configuration of wallet balances you choose, which will only later be updated through token transactions and rewards distributions.
If you already have your genesis file used for testing on Euclid, you can upload the file here.
Before connecting your metagraph to the network, we will generate its' ID and save the output locally. This ID is a unique key used by the Global L0 store state about your metagraph.
info
When deploying to MainNet, your metagraphID must be added to the metagraph seedlist before you will be able to connect. Provide the metagraphID generated below to the Constellation team to be added to the seedlist.
IntegrationNet does not have a metagraph seedlist so you can connect easily and regenerate your metagraphID if needed during testing.
Generate your metagraphID
View Genesis Output
You will find the following files in your directory:
genesis.snapshot
genesis.address
The genesis.address
file contains your metagraphID, which should resemble a DAG address: DAG...
. The genesis.snapshot
file contains snapshot zero of your metagraph which will be used when connecting to the network for the first time.
Your base instance is now fully configured
The following sections will cover creating each EC2 instance from this base instance and configuring each individually. You can skip ahead to the Generating AMI section.