From daf25602e86f08e4f28675b2a2a6974c87c61ad6 Mon Sep 17 00:00:00 2001 From: Nicolas MASSART Date: Wed, 27 Jul 2022 19:31:11 +0200 Subject: [PATCH] Insider features (#1113) * add dark/light theme * cookies consent * adjust colours * feedback widget * add a specific insider config * add grid on index * clean extensions and plugin files (was mixed) * add socials Signed-off-by: Nicolas MASSART --- .circleci/config.yml | 3 +- .gitignore | 2 + .lh/.lhignore | 6 - .../Kubernetes/Deploy-Charts.md.json | 122 ------------------ .readthedocs.yaml | 4 +- CI/requirements.txt | 6 +- .../assets/stylesheets/custom_theme.css | 81 ++++++++---- custom_theme/partials/content.html | 4 + custom_theme/partials/footer.html | 99 ++++++-------- docs/index.md | 20 +++ mkdocs-insider.yml | 27 ++++ mkdocs.extensions.yml | 23 +--- mkdocs.extra.yml | 44 ++++++- mkdocs.plugins.yml | 33 ----- mkdocs.theme.yml | 28 +++- mkdocs.yml | 1 + 16 files changed, 227 insertions(+), 276 deletions(-) delete mode 100644 .lh/.lhignore delete mode 100644 .lh/docs/Tutorials/Kubernetes/Deploy-Charts.md.json create mode 100644 mkdocs-insider.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index ab13a3b4..6ea9192f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -72,8 +72,7 @@ jobs: python3 -m venv venv . venv/bin/activate pip install --upgrade pip - pip install -q -r CI/requirements-mkdocs-material.txt - pip install -q -r CI/requirements.txt + pip install -q -r CI/requirements-mkdocs-material.txt -r CI/requirements.txt - save_cache: paths: - ./venv diff --git a/.gitignore b/.gitignore index d9bde67b..2ace22eb 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ node_modules/ .circleci/process.yml .DS_Store *.log +.lh +.run diff --git a/.lh/.lhignore b/.lh/.lhignore deleted file mode 100644 index 0145f592..00000000 --- a/.lh/.lhignore +++ /dev/null @@ -1,6 +0,0 @@ -# list file to not track by the local-history extension. comment line starts with a '#' character -# each line describe a regular expression pattern (search for "Javascript regex") -# it will relate to the workspace directory root. for example: -# ".*\.txt" ignores any file with "txt" extension -# "/test/.*" ignores all the files under the "test" directory -# ".*/test/.*" ignores all the files under any "test" directory (even under sub-folders) diff --git a/.lh/docs/Tutorials/Kubernetes/Deploy-Charts.md.json b/.lh/docs/Tutorials/Kubernetes/Deploy-Charts.md.json deleted file mode 100644 index 855b5d0f..00000000 --- a/.lh/docs/Tutorials/Kubernetes/Deploy-Charts.md.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "sourceFile": "docs/Tutorials/Kubernetes/Deploy-Charts.md", - "activeCommit": 0, - "commits": [ - { - "activePatchIndex": 26, - "patches": [ - { - "date": 1649074473969, - "content": "Index: \n===================================================================\n--- \n+++ \n" - }, - { - "date": 1649074493114, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -79,9 +79,9 @@\n then deploy the chart using:\n \n ```bash\n cd dev/helm\n-helm install monitoring ./charts/quorum-monitoring --namespace besu --values ./values/monitoring.yaml\n+\n ```\n \n !!! warning\n \n" - }, - { - "date": 1649074538335, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -78,10 +78,14 @@\n Update the admin `username` and `password` in the [monitoring values file](https://github.com/ConsenSys/quorum-kubernetes/blob/master/dev/helm/values/monitoring.yml),\n then deploy the chart using:\n \n ```bash\n-cd dev/helm\n+helm repo add prometheus-community https://prometheus-community.github.io/helm-charts\n+helm repo update\n+helm install monitoring prometheus-community/kube-prometheus-stack --version 34.6.0 --namespace=quorum --create-namespace --values ./values/monitoring.yml --wait\n+kubectl --namespace quorum apply -f ./values/monitoring/\n \n+# NOTE: please refer to values/monitoring.yml to configure the alerts per your requirements ie slack, email etc\n ```\n \n !!! warning\n \n" - }, - { - "date": 1649074543559, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -82,10 +82,8 @@\n helm repo add prometheus-community https://prometheus-community.github.io/helm-charts\n helm repo update\n helm install monitoring prometheus-community/kube-prometheus-stack --version 34.6.0 --namespace=quorum --create-namespace --values ./values/monitoring.yml --wait\n kubectl --namespace quorum apply -f ./values/monitoring/\n-\n-# NOTE: please refer to values/monitoring.yml to configure the alerts per your requirements ie slack, email etc\n ```\n \n !!! warning\n \n" - }, - { - "date": 1649074564314, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -86,9 +86,9 @@\n ```\n \n !!! warning\n \n- For production use cases, configure Grafana with one of the supported [native auth mechanisms](https://grafana.com/docs/grafana/latest/auth/).\n+ For production use cases, configure Grafana with one of the supported [native auth mechanisms](https://grafana.com/docs/grafana/latest/auth/). Also remember to configure \n \n Once complete, you can view deployments in the Kubernetes dashboard (or equivalent).\n \n ![k8s-monitoring](../../images/kubernetes-monitoring.png)\n" - }, - { - "date": 1649074569752, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -86,9 +86,10 @@\n ```\n \n !!! warning\n \n- For production use cases, configure Grafana with one of the supported [native auth mechanisms](https://grafana.com/docs/grafana/latest/auth/). Also remember to configure \n+ For production use cases, configure Grafana with one of the supported [native auth mechanisms](https://grafana.com/docs/grafana/latest/auth/). Also remember to\n+ configure \n \n Once complete, you can view deployments in the Kubernetes dashboard (or equivalent).\n \n ![k8s-monitoring](../../images/kubernetes-monitoring.png)\n" - }, - { - "date": 1649074584222, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -87,9 +87,9 @@\n \n !!! warning\n \n For production use cases, configure Grafana with one of the supported [native auth mechanisms](https://grafana.com/docs/grafana/latest/auth/). Also remember to\n- configure \n+ configure alerts to the receiver of your choice i.e. \n \n Once complete, you can view deployments in the Kubernetes dashboard (or equivalent).\n \n ![k8s-monitoring](../../images/kubernetes-monitoring.png)\n" - }, - { - "date": 1649074589411, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -87,9 +87,9 @@\n \n !!! warning\n \n For production use cases, configure Grafana with one of the supported [native auth mechanisms](https://grafana.com/docs/grafana/latest/auth/). Also remember to\n- configure alerts to the receiver of your choice i.e. \n+ configure alerts to the receiver of your choice i.e. email, slack etc\n \n Once complete, you can view deployments in the Kubernetes dashboard (or equivalent).\n \n ![k8s-monitoring](../../images/kubernetes-monitoring.png)\n" - }, - { - "date": 1649074636393, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -89,11 +89,9 @@\n \n For production use cases, configure Grafana with one of the supported [native auth mechanisms](https://grafana.com/docs/grafana/latest/auth/). Also remember to\n configure alerts to the receiver of your choice i.e. email, slack etc\n \n-Once complete, you can view deployments in the Kubernetes dashboard (or equivalent).\n \n-![k8s-monitoring](../../images/kubernetes-monitoring.png)\n \n You can optionally deploy BlockScout to aid with monitoring the network. To do this, update the\n [BlockScout values file](https://github.com/ConsenSys/quorum-kubernetes/blob/master/dev/helm/values/blockscout-besu.yml)\n and set the `database` and `secret_key_base` values.\n" - }, - { - "date": 1649074646883, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -89,10 +89,10 @@\n \n For production use cases, configure Grafana with one of the supported [native auth mechanisms](https://grafana.com/docs/grafana/latest/auth/). Also remember to\n configure alerts to the receiver of your choice i.e. email, slack etc\n \n+Optionally you can also deploy \n \n-\n You can optionally deploy BlockScout to aid with monitoring the network. To do this, update the\n [BlockScout values file](https://github.com/ConsenSys/quorum-kubernetes/blob/master/dev/helm/values/blockscout-besu.yml)\n and set the `database` and `secret_key_base` values.\n \n" - }, - { - "date": 1649074659683, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -89,9 +89,9 @@\n \n For production use cases, configure Grafana with one of the supported [native auth mechanisms](https://grafana.com/docs/grafana/latest/auth/). Also remember to\n configure alerts to the receiver of your choice i.e. email, slack etc\n \n-Optionally you can also deploy \n+Optionally you can also deploy the Elastic Stack to view logs and metrics\n \n You can optionally deploy BlockScout to aid with monitoring the network. To do this, update the\n [BlockScout values file](https://github.com/ConsenSys/quorum-kubernetes/blob/master/dev/helm/values/blockscout-besu.yml)\n and set the `database` and `secret_key_base` values.\n" - }, - { - "date": 1649074668785, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -89,9 +89,9 @@\n \n For production use cases, configure Grafana with one of the supported [native auth mechanisms](https://grafana.com/docs/grafana/latest/auth/). Also remember to\n configure alerts to the receiver of your choice i.e. email, slack etc\n \n-Optionally you can also deploy the Elastic Stack to view logs and metrics\n+Optionally you can also deploy the Elastic Stack to view logs (and metrics)\n \n You can optionally deploy BlockScout to aid with monitoring the network. To do this, update the\n [BlockScout values file](https://github.com/ConsenSys/quorum-kubernetes/blob/master/dev/helm/values/blockscout-besu.yml)\n and set the `database` and `secret_key_base` values.\n" - }, - { - "date": 1649074679316, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -89,9 +89,9 @@\n \n For production use cases, configure Grafana with one of the supported [native auth mechanisms](https://grafana.com/docs/grafana/latest/auth/). Also remember to\n configure alerts to the receiver of your choice i.e. email, slack etc\n \n-Optionally you can also deploy the Elastic Stack to view logs (and metrics)\n+Optionally you can also deploy the [Elastic Stack to view logs (and metrics)\n \n You can optionally deploy BlockScout to aid with monitoring the network. To do this, update the\n [BlockScout values file](https://github.com/ConsenSys/quorum-kubernetes/blob/master/dev/helm/values/blockscout-besu.yml)\n and set the `database` and `secret_key_base` values.\n" - }, - { - "date": 1649074694055, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -89,9 +89,9 @@\n \n For production use cases, configure Grafana with one of the supported [native auth mechanisms](https://grafana.com/docs/grafana/latest/auth/). Also remember to\n configure alerts to the receiver of your choice i.e. email, slack etc\n \n-Optionally you can also deploy the [Elastic Stack to view logs (and metrics)\n+Optionally you can also deploy the [Elastic Stack]() to view logs (and metrics)\n \n You can optionally deploy BlockScout to aid with monitoring the network. To do this, update the\n [BlockScout values file](https://github.com/ConsenSys/quorum-kubernetes/blob/master/dev/helm/values/blockscout-besu.yml)\n and set the `database` and `secret_key_base` values.\n" - }, - { - "date": 1649074704110, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -89,10 +89,11 @@\n \n For production use cases, configure Grafana with one of the supported [native auth mechanisms](https://grafana.com/docs/grafana/latest/auth/). Also remember to\n configure alerts to the receiver of your choice i.e. email, slack etc\n \n-Optionally you can also deploy the [Elastic Stack]() to view logs (and metrics)\n+Optionally you can also deploy the [Elastic Stack](https://www.elastic.co/elastic-stack/) to view logs (and metrics).\n \n+\n You can optionally deploy BlockScout to aid with monitoring the network. To do this, update the\n [BlockScout values file](https://github.com/ConsenSys/quorum-kubernetes/blob/master/dev/helm/values/blockscout-besu.yml)\n and set the `database` and `secret_key_base` values.\n \n" - }, - { - "date": 1649074710058, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -90,8 +90,14 @@\n For production use cases, configure Grafana with one of the supported [native auth mechanisms](https://grafana.com/docs/grafana/latest/auth/). Also remember to\n configure alerts to the receiver of your choice i.e. email, slack etc\n \n Optionally you can also deploy the [Elastic Stack](https://www.elastic.co/elastic-stack/) to view logs (and metrics).\n+```bash\n+helm repo add prometheus-community https://prometheus-community.github.io/helm-charts\n+helm repo update\n+helm install monitoring prometheus-community/kube-prometheus-stack --version 34.6.0 --namespace=quorum --create-namespace --values ./values/monitoring.yml --wait\n+kubectl --namespace quorum apply -f ./values/monitoring/\n+```\n \n \n You can optionally deploy BlockScout to aid with monitoring the network. To do this, update the\n [BlockScout values file](https://github.com/ConsenSys/quorum-kubernetes/blob/master/dev/helm/values/blockscout-besu.yml)\n" - }, - { - "date": 1649074722415, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -90,13 +90,15 @@\n For production use cases, configure Grafana with one of the supported [native auth mechanisms](https://grafana.com/docs/grafana/latest/auth/). Also remember to\n configure alerts to the receiver of your choice i.e. email, slack etc\n \n Optionally you can also deploy the [Elastic Stack](https://www.elastic.co/elastic-stack/) to view logs (and metrics).\n+\n ```bash\n-helm repo add prometheus-community https://prometheus-community.github.io/helm-charts\n+helm repo add elastic https://helm.elastic.co\n helm repo update\n-helm install monitoring prometheus-community/kube-prometheus-stack --version 34.6.0 --namespace=quorum --create-namespace --values ./values/monitoring.yml --wait\n-kubectl --namespace quorum apply -f ./values/monitoring/\n+helm install elasticsearch --version 7.16.3 elastic/elasticsearch --namespace quorum --create-namespace --values ./values/elasticsearch.yml\n+helm install kibana --version 7.16.3 elastic/kibana --namespace quorum --values ./values/kibana.yml\n+helm install filebeat elastic/filebeat --namespace quorum --values ./values/filebeat.yml\n ```\n \n \n You can optionally deploy BlockScout to aid with monitoring the network. To do this, update the\n" - }, - { - "date": 1649074728821, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -97,8 +97,10 @@\n helm repo update\n helm install elasticsearch --version 7.16.3 elastic/elasticsearch --namespace quorum --create-namespace --values ./values/elasticsearch.yml\n helm install kibana --version 7.16.3 elastic/kibana --namespace quorum --values ./values/kibana.yml\n helm install filebeat elastic/filebeat --namespace quorum --values ./values/filebeat.yml\n+\n+\n ```\n \n \n You can optionally deploy BlockScout to aid with monitoring the network. To do this, update the\n" - }, - { - "date": 1649074734328, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -97,10 +97,10 @@\n helm repo update\n helm install elasticsearch --version 7.16.3 elastic/elasticsearch --namespace quorum --create-namespace --values ./values/elasticsearch.yml\n helm install kibana --version 7.16.3 elastic/kibana --namespace quorum --values ./values/kibana.yml\n helm install filebeat elastic/filebeat --namespace quorum --values ./values/filebeat.yml\n+# to get\n \n-\n ```\n \n \n You can optionally deploy BlockScout to aid with monitoring the network. To do this, update the\n" - }, - { - "date": 1649074752609, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -97,9 +97,9 @@\n helm repo update\n helm install elasticsearch --version 7.16.3 elastic/elasticsearch --namespace quorum --create-namespace --values ./values/elasticsearch.yml\n helm install kibana --version 7.16.3 elastic/kibana --namespace quorum --values ./values/kibana.yml\n helm install filebeat elastic/filebeat --namespace quorum --values ./values/filebeat.yml\n-# to get\n+# to get metrics, please install metricbeat with config that is similar to filebeat \n \n ```\n \n \n" - }, - { - "date": 1649074758270, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -97,9 +97,9 @@\n helm repo update\n helm install elasticsearch --version 7.16.3 elastic/elasticsearch --namespace quorum --create-namespace --values ./values/elasticsearch.yml\n helm install kibana --version 7.16.3 elastic/kibana --namespace quorum --values ./values/kibana.yml\n helm install filebeat elastic/filebeat --namespace quorum --values ./values/filebeat.yml\n-# to get metrics, please install metricbeat with config that is similar to filebeat \n+# to get metrics, please install metricbeat with config that is similar to filebeat and once comp\n \n ```\n \n \n" - }, - { - "date": 1649074769224, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -97,9 +97,9 @@\n helm repo update\n helm install elasticsearch --version 7.16.3 elastic/elasticsearch --namespace quorum --create-namespace --values ./values/elasticsearch.yml\n helm install kibana --version 7.16.3 elastic/kibana --namespace quorum --values ./values/kibana.yml\n helm install filebeat elastic/filebeat --namespace quorum --values ./values/filebeat.yml\n-# to get metrics, please install metricbeat with config that is similar to filebeat and once comp\n+# to get metrics, please install metricbeat with config that is similar to filebeat and once complete create a `metricbeat` index in kibana\n \n ```\n \n \n" - }, - { - "date": 1649074828351, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -98,9 +98,8 @@\n helm install elasticsearch --version 7.16.3 elastic/elasticsearch --namespace quorum --create-namespace --values ./values/elasticsearch.yml\n helm install kibana --version 7.16.3 elastic/kibana --namespace quorum --values ./values/kibana.yml\n helm install filebeat elastic/filebeat --namespace quorum --values ./values/filebeat.yml\n # to get metrics, please install metricbeat with config that is similar to filebeat and once complete create a `metricbeat` index in kibana\n-\n ```\n \n \n You can optionally deploy BlockScout to aid with monitoring the network. To do this, update the\n@@ -203,9 +202,9 @@\n first validator was spun up, before the logs display blocks being created.\n \n ![k8s-validator-logs](../../images/kubernetes-validator-logs.png)\n \n-To add a validator into the network, deploy a normal RPC node (step 7) and then\n+**To add a validator into the network, deploy a normal RPC node (step 7) and then\n [vote](../../HowTo/Configure/Consensus-Protocols/IBFT.md#adding-and-removing-validators) it into the validator pool.\n \n ### 7. Deploy RPC or transaction nodes\n \n" - }, - { - "date": 1649074863621, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -100,9 +100,8 @@\n helm install filebeat elastic/filebeat --namespace quorum --values ./values/filebeat.yml\n # to get metrics, please install metricbeat with config that is similar to filebeat and once complete create a `metricbeat` index in kibana\n ```\n \n-\n You can optionally deploy BlockScout to aid with monitoring the network. To do this, update the\n [BlockScout values file](https://github.com/ConsenSys/quorum-kubernetes/blob/master/dev/helm/values/blockscout-besu.yml)\n and set the `database` and `secret_key_base` values.\n \n@@ -202,9 +201,9 @@\n first validator was spun up, before the logs display blocks being created.\n \n ![k8s-validator-logs](../../images/kubernetes-validator-logs.png)\n \n-**To add a validator into the network, deploy a normal RPC node (step 7) and then\n+**To add a validator into the network**, deploy a normal RPC node (step 7) and then\n [vote](../../HowTo/Configure/Consensus-Protocols/IBFT.md#adding-and-removing-validators) it into the validator pool.\n \n ### 7. Deploy RPC or transaction nodes\n \n" - }, - { - "date": 1649074870469, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -100,8 +100,9 @@\n helm install filebeat elastic/filebeat --namespace quorum --values ./values/filebeat.yml\n # to get metrics, please install metricbeat with config that is similar to filebeat and once complete create a `metricbeat` index in kibana\n ```\n \n+\n You can optionally deploy BlockScout to aid with monitoring the network. To do this, update the\n [BlockScout values file](https://github.com/ConsenSys/quorum-kubernetes/blob/master/dev/helm/values/blockscout-besu.yml)\n and set the `database` and `secret_key_base` values.\n \n" - }, - { - "date": 1649074885518, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -100,8 +100,9 @@\n helm install filebeat elastic/filebeat --namespace quorum --values ./values/filebeat.yml\n # to get metrics, please install metricbeat with config that is similar to filebeat and once complete create a `metricbeat` index in kibana\n ```\n \n+If you install `filebeat`, \n \n You can optionally deploy BlockScout to aid with monitoring the network. To do this, update the\n [BlockScout values file](https://github.com/ConsenSys/quorum-kubernetes/blob/master/dev/helm/values/blockscout-besu.yml)\n and set the `database` and `secret_key_base` values.\n" - }, - { - "date": 1649074902562, - "content": "Index: \n===================================================================\n--- \n+++ \n@@ -100,9 +100,9 @@\n helm install filebeat elastic/filebeat --namespace quorum --values ./values/filebeat.yml\n # to get metrics, please install metricbeat with config that is similar to filebeat and once complete create a `metricbeat` index in kibana\n ```\n \n-If you install `filebeat`, please create a `filebeat-*` index pattern in `k\n+If you install `filebeat`, please create a `filebeat-*` index pattern in `ki\n \n You can optionally deploy BlockScout to aid with monitoring the network. To do this, update the\n [BlockScout values file](https://github.com/ConsenSys/quorum-kubernetes/blob/master/dev/helm/values/blockscout-besu.yml)\n and set the `database` and `secret_key_base` values.\n" - } - ], - "date": 1649074473969, - "name": "Commit-0", - "content": "---\ntitle: Besu Kubernetes - Deploying Charts\ndescription: Deploying Besu Helm Charts for a Kubernetes cluster\n---\n\n## Prerequisites\n\n* Clone the [Quorum-Kubernetes](https://github.com/ConsenSys/quorum-kubernetes) repository\n* A [running Kubernetes cluster](./Create-Cluster.md)\n* Install [Kubectl](https://kubernetes.io/docs/tasks/tools/)\n* Install [Helm3](https://helm.sh/docs/intro/install/)\n\n## Provision with Helm charts\n\nHelm allows you to package a collection of objects into a chart which can be deployed to the cluster. For the\nrest of this tutorial we use the **[Dev](https://github.com/ConsenSys/quorum-kubernetes/tree/master/dev)** Helm charts.\nAfter cloning the [Quorum-Kubernetes](https://github.com/ConsenSys/quorum-kubernetes) repository, change\nto the `dev` directory for the rest of this tutorial.\n\n```bash\ncd dev/helm\n```\n\nIf you're running the cluster on AWS or Azure, update the `values.yml` with `provider: aws` or\n`provider: azure` as well.\n\n!!! note\n\n You can customize any of the charts in this repository to suit your requirements, and make pull requests to\n extend functionality.\n\n### 1. Check that you can connect to the cluster with `kubectl`\n\nVerify kubectl is connected to cluster using:\n\n```bash\nkubectl version\n```\n\nThe result looks similar to:\n\n```bash\nClient Version: version.Info{Major:\"1\", Minor:\"23\", GitVersion:\"v1.23.1\", GitCommit:\"86ec240af8cbd1b60bcc4c03c20da9b98005b92e\", GitTreeState:\"clean\", BuildDate:\"2021-12-16T11:41:01Z\", GoVersion:\"go1.17.5\", Compiler:\"gc\", Platform:\"linux/amd64\"}\nServer Version: version.Info{Major:\"1\", Minor:\"22\", GitVersion:\"v1.22.3\", GitCommit:\"c92036820499fedefec0f847e2054d824aea6cd1\", GitTreeState:\"clean\", BuildDate:\"2021-10-27T18:35:25Z\", GoVersion:\"go1.16.9\", Compiler:\"gc\", Platform:\"linux/amd64\"}\n```\n\n### 2. Deploy the network\n\nThis tutorial isolates groups of resources (for example, StatefulSets and Services) within a single cluster.\n\n!!! note\n\n The rest of this tutorial uses `besu` as the namespace,\n but you're free to pick any name when deploying, as long as it's consistent across the\n [infrastructure scripts](./Create-Cluster.md) and charts.\n\nRun the following in a terminal window:\n\n```bash\nkubectl create namespace besu\n```\n\n### 3. Deploy the metrics chart\n\nThis chart deploys Prometheus and Grafana to monitor the cluster, nodes, and state of the network.\nEach Besu pod has [`annotations`](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/)\nwhich allow Prometheus to scrape metrics from the pod at a specified port and path. For example:\n\n```bash\n template:\n metadata:\n annotations:\n prometheus.io/scrape: \"true\"\n prometheus.io/port: 9545\n prometheus.io/path: \"/metrics\"\n```\n\nUpdate the admin `username` and `password` in the [monitoring values file](https://github.com/ConsenSys/quorum-kubernetes/blob/master/dev/helm/values/monitoring.yml),\nthen deploy the chart using:\n\n```bash\ncd dev/helm\nhelm install monitoring ./charts/quorum-monitoring --namespace besu --values ./values/monitoring.yaml\n```\n\n!!! warning\n\n For production use cases, configure Grafana with one of the supported [native auth mechanisms](https://grafana.com/docs/grafana/latest/auth/).\n\nOnce complete, you can view deployments in the Kubernetes dashboard (or equivalent).\n\n![k8s-monitoring](../../images/kubernetes-monitoring.png)\n\nYou can optionally deploy BlockScout to aid with monitoring the network. To do this, update the\n[BlockScout values file](https://github.com/ConsenSys/quorum-kubernetes/blob/master/dev/helm/values/blockscout-besu.yml)\nand set the `database` and `secret_key_base` values.\n\n!!! important\n\n Changes to the database requires changes to both the `database` and the `blockscout` dictionaries.\n\nOnce completed, deploy the chart using:\n\n```bash\nhelm dependency update ./charts/blockscout\nhelm install blockscout ./charts/blockscout --namespace besu --values ./values/blockscout-besu.yaml\n```\n\n### 4. Deploy the genesis chart\n\nThe genesis chart creates the genesis file and keys for the validators and bootnodes.\n\n!!! warning\n\n It's important to keep the release names of the bootnodes and validators as per this tutorial, that is `bootnode-n` and\n `validator-n` (for the initial validator pool), where `n` is the node number. Any validators created after the initial\n pool can be named to anything you like.\n\nUpdate the number of validators, accounts, chain ID, and any parameters for the genesis file in the\n[`genesis-besu` values file](https://github.com/ConsenSys/quorum-kubernetes/blob/master/dev/helm/values/genesis-besu.yml), then\ndeploy the chart using:\n\n```bash\nhelm install genesis ./charts/besu-genesis --namespace besu --create-namespace --values ./values/genesis-besu.yml\n```\n\nOnce completed, view the genesis and enodes (the list of static nodes) configuration maps that every Besu node uses, and\nthe validator and bootnode node keys as secrets.\n\n![k8s-genesis-configmaps](../../images/kubernetes-genesis-configmaps.png)\n\n![k8s-genesis-secrets](../../images/kuberenetes-genesis-secrets.png)\n\n### 5. Deploy the bootnodes\n\nThe Dev charts use two bootnodes to replicate best practices for a production network. Each Besu node has flags\nthat tell the StatefulSet what to deploy and how to clean up.\nThe default `values.yml` for the StatefulSet define the following flags which are present in all the\noverride values files.\n\n```bash\nnodeFlags:\n bootnode: true\n generateKeys: false\n privacy: false\n removeKeysOnDeletion: false\n```\n\nWe don't generate keys for the bootnodes and initial validator pool. To create a Tessera pod paired to Besu\nfor private transactions, set the `privacy` flag to `true`. Optionally remove the secrets for the node if you\ndelete the StatefulSet (for example removing a member node) by setting the `removeKeysOnDeletion` flag to `true`.\n\nFor the bootnodes, set the `bootnode` flag to `true` to indicate they are bootnodes. All the other nodes\n(for example, validators, and members) wait for the bootnodes to be up before proceeding, and have this flag set to `false`.\n\n```bash\nhelm install bootnode-1 ./charts/besu-node --namespace besu --values ./values/bootnode.yml\nhelm install bootnode-2 ./charts/besu-node --namespace besu --values ./values/bootnode.yml\n```\n\n!!! warning\n\n It's important to keep the release names of the bootnodes the same as it is tied to the keys that the genesis chart\n creates. So we use `bootnode-1` and `bootnode-2` in the previous command.\n\nOnce complete, you see two StatefulSets, and the two bootnodes discover themselves and peer.\nBecause there are no validators present yet, there are no blocks created, as seen in the following logs.\n\n![k8s-bootnode-logs](../../images/kubernetes-bootnode-logs.png)\n\n### 6. Deploy the validators\n\nThe validators peer with the bootnodes and themselves, and when a majority of the validators have peered, blocks\nare proposed and created on the chain.\n\nFor the initial validator pool we set all the node flags to `false` and then deploy.\n\n```bash\nhelm install validator-1 ./charts/besu-node --namespace besu --values ./values/validator.yml\nhelm install validator-2 ./charts/besu-node --namespace besu --values ./values/validator.yml\nhelm install validator-3 ./charts/besu-node --namespace besu --values ./values/validator.yml\nhelm install validator-4 ./charts/besu-node --namespace besu --values ./values/validator.yml\n```\n\n!!! warning\n\n As with the bootnodes, it's important to keep the release names of the initial validators the same as it is tied\n to the keys that the genesis chart creates. So we use `validator-1`, `validator-2`, etc. in the previous command.\n\nOnce completed, you may need to give the validators a few minutes to peer and for round changes, depending on when the\nfirst validator was spun up, before the logs display blocks being created.\n\n![k8s-validator-logs](../../images/kubernetes-validator-logs.png)\n\nTo add a validator into the network, deploy a normal RPC node (step 7) and then\n[vote](../../HowTo/Configure/Consensus-Protocols/IBFT.md#adding-and-removing-validators) it into the validator pool.\n\n### 7. Deploy RPC or transaction nodes\n\nThese nodes need their own node keys, so set the `generateKeys` flag to `true` for a standard RPC node.\nFor a transaction node (Besu paired with Tessera for private transactions), set the `privacy` flag to `true` and\ndeploy in the same manner as before.\n\nFor an RPC node with the release name `rpc-1`:\n\n```bash\nhelm install rpc-1 ./charts/besu-node --namespace besu --values ./values/reader.yml\n```\n\nFor a transaction node release name `tx-1`:\n\n```bash\nhelm install tx-1 ./charts/besu-node --namespace besu --values ./values/txnode.yml\n```\n\nLogs for `tx-1` resemble the following for Tessera:\n\n![`k8s-tx-tessera-logs`](../../images/kubernetes-tx-tessera-logs.png)\n\nLogs for Besu resemble the following:\n\n![`k8s-tx-Besu-logs`](../../images/kubernetes-tx-Besu-logs.png)\n\n### 8. Connect to the node from your local machine via an ingress\n\nTo view Grafana dashboards or connect to the nodes to make transactions from your local machine, you can\ndeploy an ingress controller with rules. We use the `ingress-nginx` ingress controller which can be deployed as follows:\n\n```bash\nhelm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx\nhelm repo update\nhelm install besu-ingress ingress-nginx/ingress-nginx \\\n --namespace besu \\\n --set controller.replicaCount=1 \\\n --set controller.nodeSelector.\"beta\\.kubernetes\\.io/os\"=linux \\\n --set defaultBackend.nodeSelector.\"beta\\.kubernetes\\.io/os\"=linux \\\n --set controller.admissionWebhooks.patch.nodeSelector.\"beta\\.kubernetes\\.io/os\"=linux \\\n --set controller.service.externalTrafficPolicy=Local\n```\n\nUse [pre-defined rules](https://github.com/ConsenSys/quorum-kubernetes/blob/master/ingress/ingress-rules-besu.yml)\nto test functionality, and alter to suit your requirements (for example, to connect to multiple nodes via different paths).\n\nEdit the [rules](https://github.com/ConsenSys/quorum-kubernetes/blob/master/ingress/ingress-rules-besu.yml) file so that the\nservice names match your release name. In the example, we deployed a transaction node with the release name `member-1`\nso the corresponding service is called `besu-node-member-1` for the `rpc` and `ws` path prefixes. Once you have settings\nthat match your deployments, deploy the rules as follows:\n\n```bash\nkubectl apply -f ../../ingress/ingress-rules-besu.yml\n```\n\nOnce complete, view the IP address under the `Ingress` section if you're using the Kubernetes Dashboard\nor equivalent `kubectl` command.\n\n![`k8s-ingress`](../../images/kubernetes-ingress-ip.png)\n\nYou can view the Grafana dashboard by going to:\n\n```bash\n# For Besu's grafana address:\nhttp:///d/XE4V0WGZz/besu-overview?orgId=1&refresh=10s\n```\n\nThe following is an example RPC call, which confirms that the node running the JSON-RPC service is syncing:\n\n=== \"curl HTTP request\"\n\n ```bash\n curl -v -X POST -H \"Content-Type: application/json\" --data '{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":1}' http:///rpc\n ```\n\n=== \"JSON result\"\n\n ```json\n {\n \"jsonrpc\" : \"2.0\",\n \"id\" : 1,\n \"result\" : \"0x4e9\"\n }\n ```\n" - } - ] -} \ No newline at end of file diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 5dbbd4a2..9bb9c4b2 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -16,5 +16,5 @@ python: - requirements: CI/requirements.txt mkdocs: - configuration: mkdocs.yml - fail_on_warning: false + configuration: mkdocs-insider.yml + fail_on_warning: true diff --git a/CI/requirements.txt b/CI/requirements.txt index 798689d9..4a8fcb5a 100644 --- a/CI/requirements.txt +++ b/CI/requirements.txt @@ -1,10 +1,8 @@ -Markdown==3.4.1 markdown-fenced-code-tabs==1.0.5 -markdown-include==0.6.0 +markdown-include==0.7.0 mkdocs-markdownextradata-plugin==0.2.5 mkdocs-exclude==1.0.2 mkdocs-redirects==1.0.4 mkdocs-git-revision-date-localized-plugin==1.1.0 mkdocs-minify-plugin==0.5.0 -plantuml-markdown==3.5.3 - +plantuml-markdown==3.6.2 diff --git a/custom_theme/assets/stylesheets/custom_theme.css b/custom_theme/assets/stylesheets/custom_theme.css index 4f7c0001..61d4989e 100644 --- a/custom_theme/assets/stylesheets/custom_theme.css +++ b/custom_theme/assets/stylesheets/custom_theme.css @@ -1,79 +1,106 @@ -.feedback{ +/*Light and dark scheme dependent colour variables*/ + +:root, [data-md-color-scheme=default] { + --mdx-version-notice-bg-color: #ff8721; + --mdx-custom-footer-bg-color: #00bda4; + --mdx-custom-footer-fg-color: #000; + --mdx-admonition-critical-border-color: rgb(220, 0, 0); + --mdx-admonition-critical-bg-color: rgb(250, 150, 150); + --mdx-admonition-critical-title-color: #FFF; +} +:root, [data-md-color-scheme=slate] { + --mdx-version-notice-bg-color: #d26000; + --mdx-custom-footer-bg-color: #008c7b; + --mdx-custom-footer-fg-color: #fff; + --mdx-admonition-critical-border-color: rgb(220, 0, 0); + --mdx-admonition-critical-bg-color: rgb(160, 0, 0); + --mdx-admonition-critical-title-color: #FFF; +} + +/*Footer feedback banner*/ +.custom-footer{ padding: 1em; text-align: center; - background-color: lightseagreen; + color: var(--mdx-custom-footer-fg-color); + background-color: var(--mdx-custom-footer-bg-color); } -.feedback a { - color: white !important; +.custom-footer a { + color: var(--mdx-custom-footer-fg-color) !important; } + +/*Navigation customisation*/ .md-nav--secondary .md-nav__item .md-nav__item a.md-nav__link { font-weight: normal; font-size: inherit; } .md-nav--secondary a.md-nav__link { font-weight: bolder; - } +/*Readthedocs version box customisation*/ .rst-versions { - border-color: lightseagreen !important; + border-color: var(--md-accent-fg-color) !important; border-style: solid !important; font-size: large; } .rst-versions .rst-current-version { - background-color: #475c64 !important; + background-color: var(--md-default-bg-color) !important; } +/*Custom font for header permalinks*/ .headerlink { - font-family: "Font Awesome 5 Free"; + font-family: "Font Awesome 5 Free", sans-serif; font-weight: 900; font-size: small; } + +/*Latest doc version warning banner*/ .latest-warning { display: none; padding: 1em; - background-color: orange; - color: black; + background-color: var(--mdx-version-notice-bg-color); + color: var(--md-typeset-color); font-size: 1.5em; text-align: center; width: inherit; } +/*Page footer*/ .md-footer-copyright { max-width: 100% !important; } -.md-footer a[href^="http"]:after, +/*External links arrow symbol*/ +.md-footer a[href^="http"]:not(.md-social__link):after, .feedback a[href^="http"]:after, .md-content a[href^="http"]:not(.md-content__icon):not(.md-content__button):after { - font-family: "Font Awesome 5 Free"; + font-family: "Font Awesome 5 Free", sans-serif; font-weight: 900; font-size: small; content: " \f360"; } +/*Logo auto sizing*/ #header-logo{ width: auto; } +/*Page last change date in italic*/ .md-source-date { font-style: italic; } -.md-sidebar__scrollwrap{ - scroll-snap-type: none !important; -} - +/*Critical admonition design*/ :root { --md-admonition-icon--critical: url("data:image/svg+xml;charset=utf-8,") } .md-typeset .admonition.critical, .md-typeset details.critical { - border-color: rgb(222, 0, 0); - background-color: #ffaaaa; + border-color: var(--mdx-admonition-critical-border-color); + background-color: var(--mdx-admonition-critical-bg-color); } .md-typeset .admonition.critical strong{ @@ -82,13 +109,23 @@ .md-typeset .critical > .admonition-title, .md-typeset .critical > summary { - color: white; - background-color: rgb(222, 0, 0); - border-color: rgb(222, 0, 0); + color: var(--mdx-admonition-critical-title-color); + background-color: var(--mdx-admonition-critical-border-color); + border-color: var(--mdx-admonition-critical-border-color); } .md-typeset .critical > .admonition-title::before, .md-typeset .critical > summary::before { - background-color: white; + background-color: var(--mdx-admonition-critical-title-color); -webkit-mask-image: var(--md-admonition-icon--critical); mask-image: var(--md-admonition-icon--critical); } + +/*Cookie consent*/ +.md-consent__overlay { + display: none; +} + +.md-consent__inner { + background-color: var(--md-default-fg-color); + color: var(--md-default-bg-color); +} diff --git a/custom_theme/partials/content.html b/custom_theme/partials/content.html index 0fc79b28..c0ff3bc6 100644 --- a/custom_theme/partials/content.html +++ b/custom_theme/partials/content.html @@ -16,3 +16,7 @@

{{ page.title | d(config.site_name, true)}}

{% endif %} {{ page.content }} + +{% if config.extra.is_insider %} + {% include "partials/feedback.html" %} +{% endif %} diff --git a/custom_theme/partials/footer.html b/custom_theme/partials/footer.html index 1abd4bf1..04f7d02e 100644 --- a/custom_theme/partials/footer.html +++ b/custom_theme/partials/footer.html @@ -1,76 +1,55 @@ - - -{% import "partials/language.html" as lang with context %} - - - -