Manual Setup

This guide walks through the detailed process of manually creating a minimal development environment using docker containers and manual configuration. Most developers will be more productive using the automatic setup and configuration of the Euclid Development Environment with the Hydra CLI. The following is provided for project teams looking to create their own custom configurations outside the default development environment.

Generate P12 Files

Generate your own p12 files following the steps below: (java 11 must be installed)

  1. Download the cl-keytool file here

  2. We need to generate 3 p12 files: 1 for Genesis Nodes (Global L0, Currency L0, and Currency L1 - 1), 1 for second node on cluster (Currency L1 - 2), 1 for third node on cluster (Currency L1 - 3).

  3. Export the follow variables on your terminal with the values replaced to generate the first p12 file.

export CL_KEYSTORE=":name-of-your-file.p12"
export CL_KEYALIAS=":name-of-your-file"
export CL_PASSWORD=":password"
  1. Run the following instruction:

java -jar cl-keytool.jar generate
  1. This will generate the first file for you

  2. Change the variables CL_KEYSTORE, CL_KEYALIAS, and CL_PASSWORD and repeat the step 2 more times

  3. At the end you should have 3 p12 files

Common Steps

Create Containers

With Docker installed on your machine run:

Replace the `:containername` with the name that you want for your container*

Create a Docker Network

We need to create a docker custom network by running the following:

Build the Container Libs

In your container run the following instructions:

The instructions above install the dependencies to run correctly the node.

Tessellation repository

Clone the repository:

warning

Make sure you're using the latest version of Tessellation. You can find the most recent release in here.

Move to the tessellation folder and checkout to branch/version that you want. You can skip the git checkout :version if you want to use the develop default branch

Global L0

  • Here is the instructions to run specifically Global L0 container.

  • Move the p12 file to container with the instruction:

  • Inside the docker container make sure that your p12 file exists correctly

  • It should be at the root level (same level as the tessellation folder)

  • Move to tessellation folder:

  • Generate the jars

  • Check the logs to see which version of global-l0 and wallet was published. It should be something like this:

  • Move these jars to the root folder, like the example below

  • Run the following command to get the clusterId (store this information):

  • Run the following command to get the clusterAddress (store this information):

  • Outside the container, run this following command to get your docker container IP

  • Outside the container, we need to join our container to the created network, you can do this with the following command (outside the container)

  • You can check now your network and see your container there:

  • Fill the environment variables necessary to run the container (from your first p12 file):

  • Create one empty genesis file in root directory too (you can add wallets and amounts if you want to):

  • Finally, run the jar:

  • Your should see something like this:

  • That's all for the global-l0 container

Currency L0

  • Here is the instructions to run specifically Currency L0 container.

  • Move the p12 file to container with the instruction:

  • Inside the docker container make sure that your p12 file exists correctly

  • It should be at the root level (same level as the tessellation folder)

  • Move to tessellation folder:

  • Generate the jars

  • Check the logs to see which version of currency-l0 was published. It should be something like this:

  • Move this jar to the root folder, like the example below

  • Outside the container, run this following command to get your docker container IP

  • Outside the container, we need to join our container to the created network, you can do this with the following command (outside the container)

  • You can check now your network and see your container there:

  • Fill the environment variables necessary to run the container (from your first p12 file):

  • Create one genesis file in root directory too (you can add wallets and amounts if you want to):

  • You should edit this genesis.csv to add your addresses and amounts. You can use vim for that:

  • Example of genesis content:

  • Finally, run the jar:

  • Your should see something like this:

  • That's all for the currency-l0 container

Currency L1 - 1

  • Here is the instructions to run specifically Currency L1 - 1 container.

  • Move the p12 file to container with the instruction:

  • Inside the docker container make sure that your p12 file exists correctly

  • It should be at the root level (same level as the tessellation folder)

  • Move to tessellation folder:

  • Generate the jars

  • Check the logs to see which version of currency-l1 was published. It should be something like this:

  • Move this jar to the root folder, like the example below

  • Outside the container, run this following command to get your docker container IP

  • Outside the container, we need to join our container to the created network, you can do this with the following command (outside the container)

  • You can check now your network and see your container there:

  • Fill the environment variables necessary to run the container (from your first p12 file):

  • Finally, run the jar:

  • Your should see something like this:

  • That's all for the currency-l1-1 container

Currency L1 - 2

  • Here is the instructions to run specifically Currency L1 - 2 container.

  • Move the p12 file to container with the instruction (second p12 file):

  • Inside the docker container make sure that your p12 file exists correctly

  • It should be at the root level (same level as the tessellation folder)

  • Move to tessellation folder:

  • Generate the jars

  • Check the logs to see which version of currency-l1 was published. It should be something like this:

  • Move this jar to the root folder, like the example below

  • Outside the container, run this following command to get your docker container IP

  • Outside the container, we need to join our container to the created network, you can do this with the following command (outside the container)

  • You can check now your network and see your container there:

  • Fill the environment variables necessary to run the container (from your first p12 file):

  • Finally, run the jar:

  • Your should see something like this:

  • That's all for the currency-l1-2 container

Currency L1 - 3

  • Here is the instructions to run specifically Currency L1 - 2 container.

  • Move the p12 file to container with the instruction (third p12 file):

  • Inside the docker container make sure that your p12 file exists correctly

  • It should be at the root level (same level as the tessellation folder)

  • Move to tessellation folder:

  • Generate the jars

  • Check the logs to see which version of currency-l1 was published. It should be something like this:

  • Move this jar to the root folder, like the example below

  • Outside the container, run this following command to get your docker container IP

  • Outside the container, we need to join our container to the created network, you can do this with the following command (outside the container)

  • You can check now your network and see your container there:

  • Fill the environment variables necessary to run the container (from your first p12 file):

  • Finally, run the jar:

  • Your should see something like this:

  • That's all for the currency-l1-3 container

Joining Currency L1 containers to build the cluster

  • We need to join the 2 and 3 currency L1 container to the first one, to build the cluster.

  • For that, we need to open another terminal instance and run

  • Then we need to call this:

  • Repeat the same with the third Currency L1 container

  • You now should have the cluster build, if you access the url: http://localhost:9200/cluster/info you should see the nodes

Next Steps

You should now have a minimal development environment installed and running 🎉

Last updated

Was this helpful?