From 7a6be29539a956828cef8eec003d7c55932b387c Mon Sep 17 00:00:00 2001 From: Adam Hamrick Date: Thu, 14 Mar 2024 10:42:08 -0400 Subject: [PATCH] Docs cleanup --- charts/chainlink-cluster/README.md | 42 ++++++++++++++-------------- integration-tests/load/README.md | 7 +++-- integration-tests/load/ocr/README.md | 8 ++++-- 3 files changed, 30 insertions(+), 27 deletions(-) diff --git a/charts/chainlink-cluster/README.md b/charts/chainlink-cluster/README.md index 0fbbd5d16df..043585e4b97 100644 --- a/charts/chainlink-cluster/README.md +++ b/charts/chainlink-cluster/README.md @@ -1,10 +1,10 @@ -# Chainlink cluster +# Chainlink Cluster Example CL nodes cluster for system level tests Install `kubefwd` (no nixpkg for it yet, planned) -``` +```sh brew install txn2/tap/kubefwd ``` @@ -12,7 +12,7 @@ If you want to build images you need [docker](https://docs.docker.com/engine/ins Enter the shell (from the root project dir) -``` +```sh nix develop ``` @@ -26,7 +26,7 @@ Configure the cluster, see `deployments.app.helm.values` and [values.yaml](./val Set up your K8s access -``` +```sh export DEVSPACE_IMAGE="..." ./setup.sh ${my-personal-namespace-name-crib} ``` @@ -40,7 +40,7 @@ cp .env.sample .env Build and deploy the current state of your repository -``` +```sh devspace deploy ``` @@ -48,38 +48,38 @@ Default `ttl` is `72h`, use `ttl` command to update if you need more time Valid values are `1h`, `2m`, `3s`, etc. Go time format is invalid `1h2m3s` -``` +```sh devspace run ttl ${namespace} 120h ``` If you want to deploy an image tag that is already available in ECR, use: -``` +```sh devspace deploy --override-image-tag "" ``` If you want to deploy an image tag from a public ECR repo, use: -``` +```sh export DEVSPACE_IMAGE=public.ecr.aws/chainlink/chainlink devspace deploy --override-image-tag 2.9.0 ``` Forward ports to check UI or run tests -``` +```sh devspace run connect ${my-personal-namespace-name-crib} ``` List ingress hostnames -``` +```sh devspace run ingress-hosts ``` Destroy the cluster -``` +```sh devspace purge ``` @@ -95,13 +95,13 @@ If you would like to use `helm` directly, please uncomment data in `values.yaml` ## Install from local files -``` +```sh helm install -f values.yaml cl-cluster . ``` Forward all apps (in another terminal) -``` +```sh sudo kubefwd svc -n cl-cluster ``` @@ -111,21 +111,21 @@ Then you can connect and run your tests Add the repository -``` +```sh helm repo add chainlink-cluster https://raw.githubusercontent.com/smartcontractkit/chainlink/helm-release/ helm repo update ``` Set default namespace -``` +```sh kubectl create ns cl-cluster kubectl config set-context --current --namespace cl-cluster ``` Install -``` +```sh helm install -f values.yaml cl-cluster . ``` @@ -135,13 +135,13 @@ Bump version in `Chart.yml` add your changes and add `helm_release` label to any ## Helm Test -``` +```sh helm test cl-cluster ``` ## Uninstall -``` +```sh helm uninstall cl-cluster ``` @@ -151,7 +151,7 @@ We are using [Grabana](https://github.com/K-Phoen/grabana) lib to create dashboa You can also select dashboard platform in `INFRA_PLATFORM` either `kubernetes` or `docker` -``` +```sh export LOKI_TENANT_ID=promtail export LOKI_URL=... export GRAFANA_URL=... @@ -171,7 +171,7 @@ Open Grafana folder `DashboardCoreDebug` and find dashboard `ChainlinkClusterDeb Deploy your dashboard and run soak/load [tests](../../integration-tests/load/), check [README](../../integration-tests/README.md) for further explanations -``` +```sh devspace run dashboard_deploy devspace run workload devspace run dashboard_test @@ -181,7 +181,7 @@ devspace run dashboard_test Go to [dashboard-lib](../../dashboard) and link the modules locally -``` +```sh cd dashboard pnpm link --global cd charts/chainlink-cluster/dashboard/tests diff --git a/integration-tests/load/README.md b/integration-tests/load/README.md index afcf633e5c3..fb21873cb45 100644 --- a/integration-tests/load/README.md +++ b/integration-tests/load/README.md @@ -25,8 +25,7 @@ What are performance and capacity characteristics of Chainlink node(s) that run - what are the limits if we add more and more products of the same type, each product have a stable RPS, we vary only amount of products - update test #3 with optimal params and workload to constantly run in CI -Implementing test #1 is **mandatory** for each product. -Tests #2,#3,#4 are optional if you need to figure out your product scaling or node/cluster capacity. +Implementing test #1 is **mandatory** for each product. Tests 2, 3, and 4 are optional depending on what how you expect the product to operate and under what conditions. ## Usage @@ -70,8 +69,10 @@ Gun should be working with one instance of your product. VU(Virtual user) creates a new instance of your product and works with it in `Call()` ### Cluster mode (k8s) + Add configuration to `overrides.toml` -``` + +```toml [WaspAutoBuild] namespace = "wasp" update_image = true diff --git a/integration-tests/load/ocr/README.md b/integration-tests/load/ocr/README.md index 61951ba700f..e337bc72d5a 100644 --- a/integration-tests/load/ocr/README.md +++ b/integration-tests/load/ocr/README.md @@ -1,10 +1,12 @@ -### OCR Load tests +# OCR Load tests ## Setup -These tests can connect to any cluster create with [chainlink-cluster](../../../charts/chainlink-cluster/README.md) + +These tests can connect to any cluster created with [chainlink-cluster](../../../charts/chainlink-cluster/README.md) Create your cluster, if you already have one just use `kubefwd` -``` + +```sh kubectl create ns cl-cluster devspace use namespace cl-cluster devspace deploy