-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PG-1223 Updated etcd setup steps (15) (#703)
new file: snippets/check-etcd.md new file: snippets/percona-release-apt.md new file: snippets/percona-release-yum.md
- Loading branch information
1 parent
172c7de
commit 9f04628
Showing
7 changed files
with
479 additions
and
352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
3. Check the etcd cluster members. Use `etcdctl` for this purpose. Ensure that `etcdctl` interacts with etcd using API version 3 and knows which nodes, or endpoints, to communicate with. For this, we will define the required information as environment variables. Run the following commands on one of the nodes: | ||
|
||
``` | ||
export ETCDCTL_API=3 | ||
HOST_1=10.104.0.1 | ||
HOST_2=10.104.0.2 | ||
HOST_3=10.104.0.3 | ||
ENDPOINTS=$HOST_1:2379,$HOST_2:2379,$HOST_3:2379 | ||
``` | ||
4. Now, list the cluster members and output the result as a table as follows: | ||
```{.bash data-prompt="$"} | ||
$ sudo etcdctl --endpoints=$ENDPOINTS -w table member list | ||
``` | ||
??? example "Sample output" | ||
``` | ||
+------------------+---------+-------+------------------------+----------------------------+------------+ | ||
| ID | STATUS | NAME | PEER ADDRS | CLIENT ADDRS | IS LEARNER | | ||
+------------------+---------+-------+------------------------+----------------------------+------------+ | ||
| 4788684035f976d3 | started | node2 | http://10.104.0.2:2380 | http://192.168.56.102:2379 | false | | ||
| 67684e355c833ffa | started | node3 | http://10.104.0.3:2380 | http://192.168.56.103:2379 | false | | ||
| 9d2e318af9306c67 | started | node1 | http://10.104.0.1:2380 | http://192.168.56.101:2379 | false | | ||
+------------------+---------+-------+------------------------+----------------------------+------------+ | ||
``` | ||
5. To check what node is currently the leader, use the following command | ||
```{.bash data-prompt="$"} | ||
$ sudo etcdctl --endpoints=$ENDPOINTS -w table endpoint status | ||
``` | ||
??? example "Sample output" | ||
```{.text .no-copy} | ||
+-----------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+ | ||
| ENDPOINT | ID | VERSION | DB SIZE | IS LEADER | IS LEARNER | RAFT TERM | RAFT INDEX | RAFT APPLIED INDEX | ERRORS | | ||
+-----------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+ | ||
| 10.104.0.1:2379 | 9d2e318af9306c67 | 3.5.16 | 20 kB | true | false | 2 | 10 | 10 | | | ||
| 10.104.0.2:2379 | 4788684035f976d3 | 3.5.16 | 20 kB | false | false | 2 | 10 | 10 | | | ||
| 10.104.0.3:2379 | 67684e355c833ffa | 3.5.16 | 20 kB | false | false | 2 | 10 | 10 | | | ||
+-----------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+ | ||
``` | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
1. Install the `curl` download utility if it's not installed already: | ||
|
||
```{.bash data-prompt="$"} | ||
$ sudo apt update | ||
$ sudo apt install curl | ||
``` | ||
|
||
2. Download the `percona-release` repository package: | ||
|
||
```{.bash data-prompt="$"} | ||
$ curl -O https://repo.percona.com/apt/percona-release_latest.generic_all.deb | ||
``` | ||
|
||
3. Install the downloaded repository package and its dependencies using `apt`: | ||
|
||
```{.bash data-prompt="$"} | ||
$ sudo apt install gnupg2 lsb-release ./percona-release_latest.generic_all.deb | ||
``` | ||
|
||
4. Refresh the local cache to update the package information: | ||
|
||
```{.bash data-prompt="$"} | ||
$ sudo apt update | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Run the following command as the `root` user or with `sudo` privileges: | ||
|
||
```{.bash data-prompt="$"} | ||
$ sudo yum install -y https://repo.percona.com/yum/percona-release-latest.noarch.rpm | ||
``` |