From aa7d031192e18c4dd6932edadf67d38b5591d2d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Vincent?= <28714795+leovct@users.noreply.github.com> Date: Mon, 6 May 2024 14:10:20 +0200 Subject: [PATCH] docs: update out of date docs (#106) * chore: do not deploy permissionless node and eth load balancer by default * docs: update pless setup * docs: update `yq` cmd to deploy pless node * ci: update yq cmd in deploy job * docs: update breakdown deployment * docs: update forkid 7 to 9 migration * chore: nit * Update .github/workflows/deploy.yml Co-authored-by: Dra Murphy <149679879+kmurphypolygon@users.noreply.github.com> * Update .github/workflows/deploy.yml Co-authored-by: Dra Murphy <149679879+kmurphypolygon@users.noreply.github.com> * Update .github/workflows/deploy.yml Co-authored-by: Dra Murphy <149679879+kmurphypolygon@users.noreply.github.com> * Update docs/how-to/migrate/forkid-7-to-9.md Co-authored-by: Dra Murphy <149679879+kmurphypolygon@users.noreply.github.com> * Update docs/quickstart/breakdown-deployment.md Co-authored-by: Dra Murphy <149679879+kmurphypolygon@users.noreply.github.com> --------- Co-authored-by: Dra Murphy <149679879+kmurphypolygon@users.noreply.github.com> --- .github/workflows/deploy.yml | 27 ++++-------- docs/how-to/migrate/forkid-7-to-9.md | 9 +--- docs/quickstart/breakdown-deployment.md | 57 ++++++++++++++++--------- docs/quickstart/set-up-node.md | 10 +++-- main.star | 4 +- params.yml | 4 +- 6 files changed, 58 insertions(+), 53 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ebf1ae4c..75c583c8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -91,17 +91,8 @@ jobs: uses: foundry-rs/foundry-toolchain@v1 # Deploy components. - - name: Disable All Deployment Steps - run: | - yq -Y --in-place '.deploy_l1 = false' params.yml - yq -Y --in-place '.deploy_zkevm_contracts_on_l1 = false' params.yml - yq -Y --in-place '.deploy_databases = false' params.yml - yq -Y --in-place '.deploy_cdk_central_environment = false' params.yml - yq -Y --in-place '.deploy_cdk_bridge_infra = false' params.yml - yq -Y --in-place '.deploy_zkevm_permissionless_node = false' params.yml - yq -Y --in-place '.deploy_observability = false' params.yml - yq -Y --in-place '.deploy_blutgang = false' params.yml - yq -Y --in-place '.apply_workload = false' params.yml + - name: Disable all deployment steps + run: yq -Y --in-place 'with_entries(if .value | type == "boolean" then .value = false else . end)' params.yml - name: Deploy L1 run: | @@ -109,43 +100,43 @@ jobs: kurtosis run --enclave cdk-v1 --args-file params.yml . yq -Y --in-place '.deploy_l1 = false' params.yml # reset - - name: Deploy ZkEVM Contracts on L1 + - name: Deploy zkEVM contracts on L1 run: | yq -Y --in-place '.deploy_zkevm_contracts_on_l1 = true' params.yml kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always . yq -Y --in-place '.deploy_zkevm_contracts_on_l1 = false' params.yml # reset - - name: Deploy ZkEVM Node and CDK Peripheral Databases + - name: Deploy zkEVM node and cdk peripheral databases run: | yq -Y --in-place '.deploy_databases = true' params.yml kurtosis run --enclave cdk-v1 --args-file params.yml . yq -Y --in-place '.deploy_databases = false' params.yml # reset - - name: Deploy CDK Central Environment + - name: Deploy CDK central environment run: | yq -Y --in-place '.deploy_cdk_central_environment = true' params.yml kurtosis run --enclave cdk-v1 --args-file params.yml . yq -Y --in-place '.deploy_cdk_central_environment = false' params.yml # reset - - name: Deploy CDK Bridge Infrastructure + - name: Deploy CDK bridge infrastructure run: | yq -Y --in-place '.deploy_cdk_bridge_infra = true' params.yml kurtosis run --enclave cdk-v1 --args-file params.yml . yq -Y --in-place '.deploy_cdk_bridge_infra = false' params.yml # reset - - name: Deploy ZkEVM Permissionless Node + - name: Deploy zkEVM permissionless node run: | yq -Y --in-place '.deploy_zkevm_permissionless_node = true' params.yml kurtosis run --enclave cdk-v1 --args-file params.yml . yq -Y --in-place '.deploy_zkevm_permissionless_node = false' params.yml # reset - - name: Deploy Observability Stack + - name: Deploy observability stack run: | yq -Y --in-place '.deploy_observability = true' params.yml kurtosis run --enclave cdk-v1 --args-file params.yml . yq -Y --in-place '.deploy_observability = false' params.yml # reset - - name: Deploy Loadbalancer (blutgang) + - name: Deploy ETH load balancer run: | yq -Y --in-place '.deploy_blutgang = true' params.yml kurtosis run --enclave cdk-v1 --args-file params.yml . diff --git a/docs/how-to/migrate/forkid-7-to-9.md b/docs/how-to/migrate/forkid-7-to-9.md index a7e0544e..0a9ad3a8 100644 --- a/docs/how-to/migrate/forkid-7-to-9.md +++ b/docs/how-to/migrate/forkid-7-to-9.md @@ -242,17 +242,12 @@ At this stage, the smart contracts are upgraded. However, we still need to start - This procedure is very sensitive. - Ensure the synchronizer starts first. -We're going to revert the parameters back to the versions of the node that worked with fork 9, and specify that _ONLY_ stage 3 should run. +We're going to revert the parameters back to the versions of the node that worked with fork 9, and only redeploy the CDK central/trusted environment. 1. Update the `params.yml` file as follows: ```sh - yq -Y --in-place '.deploy_l1 = false' params.yml - yq -Y --in-place '.deploy_zkevm_contracts_on_l1 = false' params.yml - yq -Y --in-place '.deploy_databases = false' params.yml - yq -Y --in-place '.deploy_cdk_bridge_infra = false' params.yml - yq -Y --in-place '.deploy_zkevm_permissionless_node = false' params.yml - yq -Y --in-place '.deploy_observability = false' params.yml + yq -Y --in-place 'with_entries(if .key == "deploy_cdk_central_environment" then .value = true elif .value | type == "boolean" then .value = false else . end)' params.yml ``` 2. Remove the `HaltOnBatchNumber` setting that we added earlier. diff --git a/docs/quickstart/breakdown-deployment.md b/docs/quickstart/breakdown-deployment.md index deb6c169..8c3bc8f6 100644 --- a/docs/quickstart/breakdown-deployment.md +++ b/docs/quickstart/breakdown-deployment.md @@ -24,7 +24,7 @@ Currently, the deployment process includes the following stages: ## Specifying stages -The example scripts below show you how to deploy the stack to enable various stage permutations. +The example scripts below show you how to deploy the stack to enable various stage permutations. !!! tip To run the scripts, you need to have [yq](https://pypi.org/project/yq/) installed. @@ -32,65 +32,82 @@ The example scripts below show you how to deploy the stack to enable various sta ### Disable all deployment steps ```sh -yq -Yi '.deploy_l1 = false' params.yml -yq -Yi '.deploy_zkevm_contracts_on_l1 = false' params.yml -yq -Yi '.deploy_databases = false' params.yml -yq -Yi '.deploy_cdk_central_environment = false' params.yml -yq -Yi '.deploy_cdk_bridge_infra = false' params.yml -yq -Yi '.deploy_zkevm_permissionless_node = false' params.yml +yq -Y --in-place 'with_entries(if .value | type == "boolean" then .value = false else . end)' params.yml ``` ### Deploy L1 ```sh -yq -Yi '.deploy_l1 = true' params.yml +yq -Y --in-place '.deploy_l1 = true' params.yml kurtosis run --enclave cdk-v1 --args-file params.yml . -yq -Yi '.deploy_l1 = false' params.yml # reset +yq -Y --in-place '.deploy_l1 = false' params.yml # reset # Perform additional tasks... ``` ### Deploy zkEVM contracts on L1 ```sh -yq -Yi '.deploy_zkevm_contracts_on_l1 = true' params.yml +yq -Y --in-place '.deploy_zkevm_contracts_on_l1 = true' params.yml kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always . -yq -Yi '.deploy_zkevm_contracts_on_l1 = false' params.yml # reset +yq -Y --in-place '.deploy_zkevm_contracts_on_l1 = false' params.yml # reset # Perform additional tasks... ``` ### Deploy zkEVM node and CDK peripheral databases ```sh -yq -Yi '.deploy_databases = true' params.yml +yq -Y --in-place '.deploy_databases = true' params.yml kurtosis run --enclave cdk-v1 --args-file params.yml . -yq -Yi '.deploy_databases = false' params.yml # reset +yq -Y --in-place '.deploy_databases = false' params.yml # reset # Perform additional tasks... ``` ### Deploy CDK central environment ```sh -yq -Yi '.deploy_cdk_central_environment = true' params.yml +yq -Y --in-place '.deploy_cdk_central_environment = true' params.yml kurtosis run --enclave cdk-v1 --args-file params.yml . -yq -Yi '.deploy_cdk_central_environment = false' params.yml # reset +yq -Y --in-place '.deploy_cdk_central_environment = false' params.yml # reset # Perform additional tasks... ``` ### Deploy CDK bridge infrastructure ```sh -yq -Yi '.deploy_cdk_bridge_infra = true' params.yml +yq -Y --in-place '.deploy_zkevm_permissionless_node = true' params.yml kurtosis run --enclave cdk-v1 --args-file params.yml . -yq -Yi '.deploy_cdk_bridge_infra = false' params.yml # reset +yq -Y --in-place '.deploy_zkevm_permissionless_node = false' params.yml # reset # Perform additional tasks... ``` ### Deploy zkEVM permissionless node ```sh -yq -Yi '.deploy_zkevm_permissionless_node = true' params.yml +yq -Y --in-place '.deploy_zkevm_permissionless_node = true' params.yml kurtosis run --enclave cdk-v1 --args-file params.yml . -yq -Yi '.deploy_zkevm_permissionless_node = false' params.yml # reset +yq -Y --in-place '.deploy_zkevm_permissionless_node = false' params.yml # reset ``` -
\ No newline at end of file +### Deploy observability stack + +```sh +yq -Y --in-place '.deploy_observability = true' params.yml +kurtosis run --enclave cdk-v1 --args-file params.yml . +yq -Y --in-place '.deploy_observability = false' params.yml # reset +``` + +### Deploy ETH load balancer + +```sh +yq -Y --in-place '.deploy_blutgang = true' params.yml +kurtosis run --enclave cdk-v1 --args-file params.yml . +yq -Y --in-place '.deploy_blutgang = false' params.yml # reset +``` + +### Apply workload + +```sh +yq -Y --in-place '.apply_workload = true' params.yml +kurtosis run --enclave cdk-v1 --args-file params.yml . +yq -Y --in-place '.apply_workload = false' params.yml # reset +``` diff --git a/docs/quickstart/set-up-node.md b/docs/quickstart/set-up-node.md index 9589cac1..31e7ef52 100644 --- a/docs/quickstart/set-up-node.md +++ b/docs/quickstart/set-up-node.md @@ -2,7 +2,7 @@ comments: true --- -In addition to the core stack, you can also attach and synchronize a permissionless node. +In addition to the core stack, you can also attach and synchronize a permissionless node. ## Prerequisites @@ -21,14 +21,15 @@ cp /tmp/genesis.json templates/permissionless-node/genesis.json Run the following command: ```sh -kurtosis run --enclave cdk-v1 --args-file params.yml --main-file zkevm_permissionless_node.star . +yq -Y --in-place 'with_entries(if .key == "deploy_zkevm_permissionless_node" then .value = true elif .value | type == "boolean" then .value = false else . end)' params.yml +kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always . ``` ## Sync an external permissionless node You can also use the package you have just set up to sync data from a production network. -1. Some of the parameters in the Kurtosis genesis file need to be replaced, or better still you could replace the whole genesis file with one representing the external network. +1. Some of the parameters in the Kurtosis genesis file need to be replaced, or better still you could replace the whole genesis file with one representing the external network. The parameters that need to change in the file are as follows: @@ -60,7 +61,8 @@ You can also use the package you have just set up to sync data from a production 4. Now you can start synchronizing with the following command: ```sh - kurtosis run --enclave cdk-v1 --args-file params.yml --main-file zkevm_permissionless_node.star . + yq -Y --in-place 'with_entries(if .key == "deploy_zkevm_permissionless_node" then .value = true elif .value | type == "boolean" then .value = false else . end)' params.yml + kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always . ```
\ No newline at end of file diff --git a/main.star b/main.star index a9296a13..861c0786 100644 --- a/main.star +++ b/main.star @@ -16,9 +16,9 @@ def run( deploy_databases=True, deploy_cdk_bridge_infra=True, deploy_cdk_central_environment=True, - deploy_zkevm_permissionless_node=True, + deploy_zkevm_permissionless_node=False, deploy_observability=True, - deploy_blutgang=True, + deploy_blutgang=False, apply_workload=False, args={ "deployment_suffix": "-001", diff --git a/params.yml b/params.yml index 3de9cb01..41381abc 100644 --- a/params.yml +++ b/params.yml @@ -18,13 +18,13 @@ deploy_cdk_central_environment: true deploy_cdk_bridge_infra: true # Deploy permissionless node. -deploy_zkevm_permissionless_node: true +deploy_zkevm_permissionless_node: false # Deploy observability stack. deploy_observability: true # Deploy eth load balancer. -deploy_blutgang: true +deploy_blutgang: false # Apply workload to the different components of the CDK stack. apply_workload: false