From 6b2fb6c4c3320dc2bf8424d0e22595381fcfa850 Mon Sep 17 00:00:00 2001 From: James Blair Date: Fri, 21 Jun 2024 11:35:15 +1200 Subject: [PATCH] Update how-to-conduct-elections.md Signed-off-by: Shubhdeep02 --- .github/dependabot.yml | 3 +++ .../tutorials/how-to-conduct-elections.md | 19 +++++++++++++++++-- package.json | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f262a6a9b..06d673f56 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,3 +5,6 @@ updates: directory: / schedule: interval: weekly + allow: + dependency-type: "development" + dependency-type: "production" diff --git a/content/en/docs/v3.5/tutorials/how-to-conduct-elections.md b/content/en/docs/v3.5/tutorials/how-to-conduct-elections.md index 6565a9d6f..2fe520f1a 100644 --- a/content/en/docs/v3.5/tutorials/how-to-conduct-elections.md +++ b/content/en/docs/v3.5/tutorials/how-to-conduct-elections.md @@ -4,13 +4,28 @@ description: Guide to conducting leader election in an etcd cluster weight: 900 --- + +## Prerequisites + +- Ensure [`etcd`](https://etcd.io/docs/v3.5/install/) and [`etcdctl`](https://etcd.io/docs/v3.5/install/) is installed. +- Check for active etcd cluster. + `elect` for leader election: -![09_etcdctl_elect_2016050501](https://storage.googleapis.com/etcd/demo/09_etcdctl_elect_2016050501.gif) +1. The `etcdctl` command is used to conduct leader elections in an etcd cluster. It makes sure that only one client become leader at a time. +2. Ensure the `ENDPOINTS` variable is set with the addresses of each etcd cluster members. +3. Set a unique name for the election for different clients ('one' in the given code below). +4. Lastly, set different leaders name for each clients (p1 and p2). + + + Command format : + `etcdctl --endpoints=$ENDPOINTS elect ` + + ```shell etcdctl --endpoints=$ENDPOINTS elect one p1 -# another client with the same name blocks +# another client with the same election name block etcdctl --endpoints=$ENDPOINTS elect one p2 ``` diff --git a/package.json b/package.json index e68a09ace..1b1bd573d 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "autoprefixer": "^10.4.18", "docsy": "github:google/docsy#semver:0.10.0", "hugo-extended": "^0.127.0", - "netlify-cli": "^17.15.2", + "netlify-cli": "^17.29.0", "postcss": "^8.4.31", "postcss-cli": "^11.0.0" }