diff --git a/.github/label-actions.yml b/.github/label-actions.yml index 4d4451c4f..66d6fb41f 100644 --- a/.github/label-actions.yml +++ b/.github/label-actions.yml @@ -1,7 +1,14 @@ # When `devnet-test-e2e` is added, also assign `devnet` and `push-image` to the PR. devnet-test-e2e: prs: - comment: The CI will now also run the e2e tests on devnet, which increases the time it takes to complete all CI checks. If you just created a pull request, you might need to push another commit to produce a container image DevNet can utilize to spin up infrastructure. You can use `make trigger_ci` to push an empty commit. + comment: | + The CI will now also run the e2e tests on devnet, which increases the time it takes to complete all CI checks. + + You may need to run `make trigger_ci` to submit an empty commit that'll trigger the tests. + + [GCP workloads (requires changing the namespace to {issue-id})](https://console.cloud.google.com/kubernetes/workload/overview?project=protocol-us-central1-d505&pageState=(%22savedViews%22:(%22c%22:%5B%5D,%22n%22:%5B%22devnet-issue-{issue-id}%22%5D))) + [Grafana network dashboard for devnet-issue-{issue-id}](https://grafana.poktroll.com/d/b799a130-3789-416d-aa7f-de5f4599cf03/network-overview?orgId=1&var-namespace=devnet-issue-{issue-id}) + label: - devnet - push-image @@ -27,7 +34,12 @@ devnet: # Let the developer know that they need to push another commit after attaching the label to PR. push-image: prs: - comment: The image is going to be pushed after the next commit. You can use `make trigger_ci` to push an empty commit. If you also want to run an E2E test, please add `devnet-test-e2e` label. + comment: | + The image is going to be pushed after the next commit. + + You can use `make trigger_ci` to push an empty commit. + + If you also want to run E2E tests, please add `devnet-test-e2e` label. # When `push-image` is removed, also delete `devnet` from the PR. -push-image: diff --git a/.github/workflows/label-actions.yml b/.github/workflows/label-actions.yml index caf1a31cc..00be8e40b 100644 --- a/.github/workflows/label-actions.yml +++ b/.github/workflows/label-actions.yml @@ -1,4 +1,4 @@ -name: 'Label Actions' +name: "Label Actions" on: issues: @@ -18,4 +18,5 @@ jobs: action: runs-on: ubuntu-latest steps: - - uses: dessant/label-actions@v3 + # TODO: switch to `dessant/label-actions@v3` when https://github.com/dessant/label-actions/pull/29 is merged. + - uses: okdas/label-actions@patch-1 diff --git a/docusaurus/docs/develop/developer_guide/quickstart.md b/docusaurus/docs/develop/developer_guide/quickstart.md index 1032db52e..764f4ecff 100644 --- a/docusaurus/docs/develop/developer_guide/quickstart.md +++ b/docusaurus/docs/develop/developer_guide/quickstart.md @@ -79,7 +79,7 @@ Install the following dependencies: 6. [Tilt](https://docs.tilt.dev/install.html) - k8s local development tool & environment manager :::note -If you've followed the [LocalNet instructions](../internal_infrastructure/localnet.md), +If you've followed the [LocalNet instructions](../../operate/infrastructure/localnet.md), you may already have them installed. ::: @@ -90,7 +90,7 @@ and inspect it so you have an idea of what's going on! We'll be manually configuring a few actors to run in your shell for the sake of the tutorial so you have visibility into the types of on-chain and off-chain -actors. In practice, you should be using [localnet](./../internal_infrastructure/localnet.md) +actors. In practice, you should be using [localnet](../../operate/infrastructure/localnet.md) to dynamically scale your actors. To learn more about the different actors type, see the docs [here](../../protocol/actors/actors.md). @@ -655,7 +655,7 @@ We went through a low of steps above just so you can get a feel for how things w That said, you can dynamically scale the number of any actors in LocalNet by ony changing one line! -Go to our [localnet tutorial](./../internal_infrastructure/localnet.md) to learn more. +Go to our [localnet tutorial](../../operate/infrastructure/localnet.md) to learn more. ## 7. Explore the tools diff --git a/docusaurus/docs/develop/internal_infrastructure/_category_.json b/docusaurus/docs/develop/internal_infrastructure/_category_.json deleted file mode 100644 index 143468981..000000000 --- a/docusaurus/docs/develop/internal_infrastructure/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "Internal infrastructure", - "position": 10, - "link": { - "type": "generated-index", - "description": "Internal infrastructure related to deploying, maintaining and testing various (Local, Dev, Test) environments." - } -} diff --git a/docusaurus/docs/operate/configs/_category_.json b/docusaurus/docs/operate/configs/_category_.json index e237166d2..4f02697b7 100644 --- a/docusaurus/docs/operate/configs/_category_.json +++ b/docusaurus/docs/operate/configs/_category_.json @@ -1,6 +1,6 @@ { "label": "Configs", - "position": 4, + "position": 3, "link": { "type": "generated-index", "description": "Poktroll Configs" diff --git a/docusaurus/docs/operate/infrastructure/_category_.json b/docusaurus/docs/operate/infrastructure/_category_.json new file mode 100644 index 000000000..d14ee24d3 --- /dev/null +++ b/docusaurus/docs/operate/infrastructure/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Infrastructure", + "position": 6, + "link": { + "type": "generated-index", + "description": "Infrastructure related to deploying, maintaining and testing various (Local, Dev, Test) environments." + } +} diff --git a/docusaurus/docs/develop/internal_infrastructure/access_dashboard_on_service.png b/docusaurus/docs/operate/infrastructure/access_dashboard_on_service.png similarity index 100% rename from docusaurus/docs/develop/internal_infrastructure/access_dashboard_on_service.png rename to docusaurus/docs/operate/infrastructure/access_dashboard_on_service.png diff --git a/docusaurus/docs/operate/infrastructure/devnet.md b/docusaurus/docs/operate/infrastructure/devnet.md new file mode 100644 index 000000000..228789f79 --- /dev/null +++ b/docusaurus/docs/operate/infrastructure/devnet.md @@ -0,0 +1,56 @@ +--- +sidebar_position: 3 +title: DevNet +--- + +# DevNet + +:::note + +This page is only relevant to you if you are part of the core protocol team at Grove. + +Make sure to follow the instructions [here](https://www.notion.so/buildwithgrove/Infrastructure-Setup-79b1431b70374e24b10cd9da556c7645?pvs=4) if you are unsure how +to set up your access to GCP. + +::: + +## Table of Contents + +- [GCP Console](#gcp-console) +- [Grafana logs](#grafana-logs) +- [Infrastructure Provisioning](#infrastructure-provisioning) +- [Configuration](#configuration) + +## GCP Console + +As an example, this [GCP link]() links to `devnet-issue-498` created +from [PR #498](https://github.com/pokt-network/poktroll/pull/498). + +![GCP console](./gcp_workloads.png) + +## Grafana logs + +As an example, this [Grafana link](https://grafana.poktroll.com/explore?schemaVersion=1&panes=%7B%22TtK%22:%7B%22datasource%22:%22P8E80F9AEF21F6940%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bcontainer%3D%5C%22poktrolld%5C%22,%20namespace%3D%5C%22devnet-issue-477%5C%22%7D%20%7C%3D%20%60%60%20%7C%20json%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22P8E80F9AEF21F6940%22%7D,%22editorMode%22:%22builder%22%7D%5D,%22range%22:%7B%22from%22:%22now-1h%22,%22to%22:%22now%22%7D,%22panelsState%22:%7B%22logs%22:%7B%22logs%22:%7B%22visualisationType%22:%22logs%22%7D%7D%7D%7D%7D&orgId=1) links to the logs for `devnet-issue-477` from [PR #477](https://github.com/pokt-network/poktroll/pull/477) + +![Grafana logs explorer](./grafana_explore_logs.png) + +## Infrastructure Provisioning + +The following is a list of details to know how our DevNet infrastructure is provisioned: + +- **Grove & Kubernetes**: The Kubernetes cluster is provisioned using Grove's internal tooling. +- **Main Cluster**: We set up ArgoCD on the cluster and configure it to sync the [main/root application on the cluster](https://github.com/pokt-network/protocol-infra/blob/main/clusters/protocol-us-central1-app.yaml). +- **App of Apps**: ArgoCD provisions all the necessary resources and other ArgoCD Applications included in that Application, following the [ArgoCD App of Apps pattern](https://argo-cd.readthedocs.io/en/stable/operator-manual/cluster-bootstrapping/). +- **PR `devnet` label**: One of the manifests provisioned is an [ArgoCD ApplicationSet](https://github.com/pokt-network/protocol-infra/blob/main/clusters/protocol-us-central1/devnets-github-label.yaml), which monitors our GitHub labels and provisions a network for each GitHub issue tagged with the `devnet` label. +- **PR `devnet-test-e2e` label**: As part of our CI process, when a GitHub issue is labeled `devnet-test-e2e`, we execute a [script](https://github.com/pokt-network/poktroll/blob/main/.github/workflows-helpers/run-e2e-test.sh#L1) that creates a [Kubernetes Job](https://github.com/pokt-network/poktroll/blob/main/.github/workflows-helpers/run-e2e-test-job-template.yaml) to for that `DevNet`. +- **Ephemeral DevNet**: The DevNet deplyed using the labels described above are considered to be ephemeral. +- **Closing PR**s: When the PR is closed or the label is removed, the infrastructure is cleaned up. +- **Persistent DevNet**: We have an option to provision `persistent DevNets` by creating a DevNet yaml file in [this directory](https://github.com/pokt-network/protocol-infra/tree/main/devnets-configs) ([ArgoCD Application that monitors this directory](https://github.com/pokt-network/protocol-infra/blob/main/clusters/protocol-us-central1/devnets-persistent.yaml) for reference). + +## Configuration + +Each DevNet ArgoCD App (following the App of Apps pattern) provisions a Helm chart called [full-network](https://github.com/pokt-network/protocol-infra/tree/main/charts/full-network). + +Each `full-network` includes other ArgoCD applications that deploy Validators and off-chain actors. + +Each Helm chart receives a list of configuration files. For example, see the [relayminer configuration](https://github.com/pokt-network/protocol-infra/blob/main/charts/full-network/templates/Application-Relayminer.yaml#L37). All possible values can be found in the `values.yaml` of the Helm chart, such as the [relayminer Helm chart](https://github.com/pokt-network/helm-charts/blob/main/charts/relayminer/values.yaml). diff --git a/docusaurus/docs/operate/infrastructure/gcp_workloads.png b/docusaurus/docs/operate/infrastructure/gcp_workloads.png new file mode 100644 index 000000000..606b8c90d Binary files /dev/null and b/docusaurus/docs/operate/infrastructure/gcp_workloads.png differ diff --git a/docusaurus/docs/operate/infrastructure/grafana_explore_logs.png b/docusaurus/docs/operate/infrastructure/grafana_explore_logs.png new file mode 100644 index 000000000..af26f0baa Binary files /dev/null and b/docusaurus/docs/operate/infrastructure/grafana_explore_logs.png differ diff --git a/docusaurus/docs/develop/internal_infrastructure/grafana_save_dashboard.png b/docusaurus/docs/operate/infrastructure/grafana_save_dashboard.png similarity index 100% rename from docusaurus/docs/develop/internal_infrastructure/grafana_save_dashboard.png rename to docusaurus/docs/operate/infrastructure/grafana_save_dashboard.png diff --git a/docusaurus/docs/develop/internal_infrastructure/localnet.md b/docusaurus/docs/operate/infrastructure/localnet.md similarity index 99% rename from docusaurus/docs/develop/internal_infrastructure/localnet.md rename to docusaurus/docs/operate/infrastructure/localnet.md index 6baf8f0d5..5affcd510 100644 --- a/docusaurus/docs/develop/internal_infrastructure/localnet.md +++ b/docusaurus/docs/operate/infrastructure/localnet.md @@ -1,5 +1,5 @@ --- -sidebar_position: 1 +sidebar_position: 2 title: LocalNet --- @@ -21,7 +21,7 @@ needed to send an end-to-end relay. - [Report issues](#report-issues) - [TL;DR](#tldr) - [Developing with LocalNet](#developing-with-localnet) - - [localnet\_config.yaml](#localnet_configyaml) + - [localnet_config.yaml](#localnet_configyaml) - [Scaling network actors](#scaling-network-actors) - [Off-chain actors configuration](#off-chain-actors-configuration) - [Modify Kubernetes workloads](#modify-kubernetes-workloads) diff --git a/docusaurus/docs/operate/networks/private_testnet.md b/docusaurus/docs/operate/infrastructure/private_testnet.md similarity index 97% rename from docusaurus/docs/operate/networks/private_testnet.md rename to docusaurus/docs/operate/infrastructure/private_testnet.md index 0033e2767..56c5bfea3 100644 --- a/docusaurus/docs/operate/networks/private_testnet.md +++ b/docusaurus/docs/operate/infrastructure/private_testnet.md @@ -1,6 +1,6 @@ --- title: Private TestNet -sidebar_position: 1 +sidebar_position: 5 --- # Private TestNet diff --git a/docusaurus/docs/operate/infrastructure/repositories.md b/docusaurus/docs/operate/infrastructure/repositories.md new file mode 100644 index 000000000..12d07ab01 --- /dev/null +++ b/docusaurus/docs/operate/infrastructure/repositories.md @@ -0,0 +1,15 @@ +--- +sidebar_position: 1 +title: Repositories +--- + +# Repositories + +- [pokt-network/protocol-infra](https://github.com/pokt-network/protocol-infra): + Repository describing our `kubernetes` infrastructure following `GitOps` patterns. + `ArgoCD` consumes different manifests and provisions/maintains workloads using these manifests. +- [pokt-network/poktroll-docker-compose-example](https://github.com/pokt-network/poktroll-docker-compose-example): + Repository containing an example of how to provision the `poktroll` stack using `docker-compose`. + It includes instructions on configuring, staking and deploying Full Nodes, RelayMiner and AppGate Servers. +- [pokt-network/helm-charts](https://github.com/pokt-network/helm-charts): helm charts to simplify the deployment of our software on `kubernetes`. +- [pokt-network/pocket-network-genesis](https://github.com/pokt-network/pocket-network-genesis): repository containing genesis files for all networks. diff --git a/docusaurus/docs/operate/infrastructure/testnet.md b/docusaurus/docs/operate/infrastructure/testnet.md new file mode 100644 index 000000000..3b2a1f7a6 --- /dev/null +++ b/docusaurus/docs/operate/infrastructure/testnet.md @@ -0,0 +1,37 @@ +--- +sidebar_position: 4 +title: TestNet +--- + +# TestNet + +:::note + +This page is only relevant to you if you are part of the core protocol team at Grove. + +::: + +## Table of Contents + +- [Infrastructure provisioning](#infrastructure-provisioning) +- [Version upgrade](#version-upgrade) +- [Regenesis procedure](#regenesis-procedure) + +## Infrastructure provisioning + +- **Grove & Kubernetes**: The Kubernetes cluster is provisioned using Grove's internal tooling. +- **Main Cluster**: We set up ArgoCD on the cluster and configure it to sync the [main/root application on the cluster](https://github.com/pokt-network/protocol-infra/blob/main/clusters/protocol-us-central1-app.yaml). +- **App of Apps**: ArgoCD provisions all the necessary resources and other ArgoCD Applications included in that Application, following the [ArgoCD App of Apps pattern](https://argo-cd.readthedocs.io/en/stable/operator-manual/cluster-bootstrapping/). +- As a part of that ArgoCD Application we have resources such as StatefulSets and ConfigMaps that describe configuration and infrastructure to run validators and seed nodes. Examples: + - [testnet-validated.yaml](https://github.com/pokt-network/protocol-infra/blob/main/clusters/protocol-us-central1/testnet-validated.yaml) + - [testnet-validated-seed.yaml](https://github.com/pokt-network/protocol-infra/blob/main/clusters/protocol-us-central1/testnet-validated-seed.yaml) + + +## Version upgrade + +The notion doc on how to upgrade Grove's validator can be found [here](https://www.notion.so/How-to-upgrade-validator-seed-node-ee85c4de651047f29151c0c51cd8f14a?pvs=4) + +## Regenesis procedure + +- [Genesis generation notion doc](https://www.notion.so/Generating-a-new-genesis-json-file-b6a41c010a114713b6b0cdc2ebb6e264?pvs=4) +- [Step-by-step guide to do a full re-genesis](https://www.notion.so/How-to-re-genesis-a-Shannon-TestNet-a6230dd8869149c3a4c21613e3cfad15?pvs=4) diff --git a/docusaurus/docs/operate/run_a_node/_category_.json b/docusaurus/docs/operate/run_a_node/_category_.json index c0cfd414b..d0b710dfb 100644 --- a/docusaurus/docs/operate/run_a_node/_category_.json +++ b/docusaurus/docs/operate/run_a_node/_category_.json @@ -1,6 +1,6 @@ { "label": "Run a Node", - "position": 8, + "position": 2, "link": { "type": "generated-index", "description": "Guides on how to deploy and operated various type of Pocket Network nodes." diff --git a/docusaurus/docs/develop/internal_infrastructure/testing/_category_.json b/docusaurus/docs/operate/testing/_category_.json similarity index 90% rename from docusaurus/docs/develop/internal_infrastructure/testing/_category_.json rename to docusaurus/docs/operate/testing/_category_.json index 748137ce9..dafd5b3d4 100644 --- a/docusaurus/docs/develop/internal_infrastructure/testing/_category_.json +++ b/docusaurus/docs/operate/testing/_category_.json @@ -1,8 +1,8 @@ { "label": "Testing", - "position": 1, + "position": 10, "link": { "type": "generated-index", "description": "Documentation related to the type of end-to-end testing (load or other) we are doing." } -} +} \ No newline at end of file diff --git a/docusaurus/docs/develop/internal_infrastructure/testing/load_testing.md b/docusaurus/docs/operate/testing/load_testing.md similarity index 98% rename from docusaurus/docs/develop/internal_infrastructure/testing/load_testing.md rename to docusaurus/docs/operate/testing/load_testing.md index 8825357d5..b5d5a85da 100644 --- a/docusaurus/docs/develop/internal_infrastructure/testing/load_testing.md +++ b/docusaurus/docs/operate/testing/load_testing.md @@ -26,7 +26,7 @@ We use [k6](https://k6.io/) for load testing. For detailed information about k6 ## Dependencies - [k6](https://grafana.com/docs/k6/latest/get-started/installation/) -- (For local suite execution) [LocalNet](../localnet.md) +- (For local suite execution) [LocalNet](../infrastructure/localnet.md) ## How to run tests diff --git a/docusaurus/docs/develop/internal_infrastructure/testing/load_testing_plan_1.md b/docusaurus/docs/operate/testing/load_testing_plan_1.md similarity index 100% rename from docusaurus/docs/develop/internal_infrastructure/testing/load_testing_plan_1.md rename to docusaurus/docs/operate/testing/load_testing_plan_1.md