From 49fcaa6c31077cd82ed75532faf9a1277e186aca Mon Sep 17 00:00:00 2001 From: chethack Date: Wed, 11 Sep 2024 10:10:39 +0530 Subject: [PATCH] Additional README, environment and docker config changes for better clarity and info about GCP compatibility as suggested by @mardizzone --- .env.example | 2 +- README.md | 14 +++++++------- configs/devnet/docker-setup-config.yaml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.env.example b/.env.example index c21bea75..71986ab4 100644 --- a/.env.example +++ b/.env.example @@ -76,7 +76,7 @@ MATIC_CLI_BRANCH=master # matic-cli branch used on the remote machines to start DEVNET_BOR_USERS=ubuntu,ubuntu,ubuntu # users' names of VMs for all the nodes (comma separated). Its length must be equal to "TF_VAR_BOR_VALIDATOR_COUNT + TF_VAR_BOR_SENTRY_COUNT + TF_VAR_BOR_ARCHIVE_COUNT" DEVNET_BOR_FLAGS=config,config,config # Specifies how bor should be started ('config', or 'cli'), by providing cli flags, or by using toml config file (length of DEVNET_BOR_FLAGS should match the length of DEVNET_BOR_USERS) DEVNET_ERIGON_USERS= # users' names of VMs for all the nodes (comma separated). Its length must be equal to "TF_VAR_ERIGON_VALIDATOR_COUNT + TF_VAR_ERIGON_SENTRY_COUNT + TF_VAR_ERIGON_ARCHIVE_COUNT" -BOR_DOCKER_BUILD_CONTEXT="https://github.com/maticnetwork/bor.git#develop" # todo change to develop once https://polygon.atlassian.net/browse/POS-979 is solved (docker build context for bor. Used in docker setup (TF_VAR_DOCKERIZED=yes)) +BOR_DOCKER_BUILD_CONTEXT="https://github.com/maticnetwork/bor.git#develop" # docker build context for bor. Used in docker setup (TF_VAR_DOCKERIZED=yes) HEIMDALL_DOCKER_BUILD_CONTEXT="https://github.com/maticnetwork/heimdall.git#develop" # docker build context for heimdall. Used in docker setup (TF_VAR_DOCKERIZED=yes) VERBOSE=true # if set to true will print logs also from remote machines DD_API_KEY=DATADOG_API_KEY # Datadog API key diff --git a/README.md b/README.md index 011c12cc..994937d4 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,11 @@ 🏗 A set of CLIs, tools and tests to set up, manage and operate Polygon devnets. The **Testing Toolkit** is built on top of `express-cli`, an extension of `matic-cli` which uses `terraform` to deploy, -test and monitor any devnet on AWS stacks from any local system. +test and monitor any devnet on AWS/GCP stacks from any local system. It currently supports **only** devnets running `v0.3.x` stacks. -The `express-cli` interacts with `terraform` to create a fully working setup on AWS. -This setup is composed by a set of `EC2 VM` instances running a specific `ubuntu 22.04 ami`, mounted with `gp3 disks` , -and a `public-subnet` with its `VPC`. +The `express-cli` interacts with `terraform` to create a fully working setup on AWS/GCP. In case the infrastructure already exists, `matic-cli` can be used as a standalone tool to deploy Polygon stacks on pre-configured VMs. @@ -44,7 +42,6 @@ To use the `express-cli` you have to execute the following steps. - (optional) replace `TF_VAR_DISK_SIZE_GB` with your preferred disk size in GB (default is 100 GB) - `VERBOSE=true` prints logs from the remote machines. If set to `false`, only `express-cli` and `matic-cli` logs will be shown -- **If you are a Polygon employee**, please refer to [this page](https://www.notion.so/polygontechnology/Testing-Toolkit-d47e098641d14c80b2e9a90b3b1b88d9) for more info In case you plan to utilize express-cli for Google Cloud, you will need to make few modifications like SSH keys. It's important to note that express-cli is not fully tested yet on GCP, and not all features are accessible. Check the [GCP dev guide](./docs/gcp_dev_guide.md). @@ -460,13 +457,16 @@ cd \ #### Local dockerized network -Adjust the [docker configs](configs/devnet/docker-setup-config.yaml) and run +Adjust the [docker configs](configs/devnet/docker-setup-config.yaml) based on your setup, and run ```bash mkdir devnet \ && cd devnet \ && ../bin/matic-cli.js setup devnet --config ../configs/devnet/docker-setup-config.yaml | tee setup.log -... +``` +This will create and spin up the devnet. +The process will take some time, until this log shows up +``` DONE Devnet is ready ``` diff --git a/configs/devnet/docker-setup-config.yaml b/configs/devnet/docker-setup-config.yaml index cfd78b8e..68195da9 100755 --- a/configs/devnet/docker-setup-config.yaml +++ b/configs/devnet/docker-setup-config.yaml @@ -17,7 +17,7 @@ defaultStake: 10000 defaultFee: 2000 # L1 -ethURL: http://ganache:9545 +ethURL: http://ganacheURL:9545 # use localhost for local deployments ethHostUser: ubuntu # Heimdall