Skip to content

Scaling up: Workflow

René Radoi edited this page Jan 6, 2025 · 3 revisions

New members should only be added as "learners" to existing etcd clusters. The following diagram describes the workflow when deploying multiple units of etcd or adding a new unit.

Further details can also be found in the etcd documentation.

sequenceDiagram
User ->> User: juju deploy charmed-etcd -n 2
participant etcd/0*
participant etcd/1
participant etcd/2
etcd/0* ->> etcd/0*: install
etcd/1 ->> etcd/1: install
etcd/0* ->> etcd/0*: start workload
etcd/0* -->> Peer unit data: "state": "started"
etcd/0* -->> Peer app data: "cluster_state": "existing"
etcd/0* -->> Peer app data: "cluster_members"
etcd/0* ->> etcd/0*: enable authentication
rect rgb(191, 223, 255)
Note right of Peer unit data: add as learner
etcd/1 ->> etcd/0*: join peer-relation
etcd/0* ->> etcd/1: add as new cluster member (learner)
etcd/0* -->> Peer app data: "cluster_members"
etcd/0* -->> Peer app data: "learning_member"
end
etcd/1 ->> etcd/1: start workload
etcd/1 -->> Peer unit data: "state": "started"
rect rgb(200, 150, 255)
Note right of Peer unit data: promote to full member
etcd/1 ->> etcd/0*: peer-relation changed
etcd/0* ->> etcd/1: promote learning member
etcd/0* -->> Peer app data: delete "learning_member"
end
User ->> User: juju add-unit charmed-etcd
rect rgb(191, 223, 255)
Note right of Peer unit data: add as learner
etcd/2 ->> etcd/0*: join peer-relation
etcd/0* ->> etcd/2: add as new cluster member (learner)
etcd/0* -->> Peer app data: "cluster_members"
etcd/0* -->> Peer app data: "learning_member"
end
etcd/2 ->> etcd/2: start workload
etcd/2 -->> Peer unit data: "state": "started"
rect rgb(200, 150, 255)
Note right of Peer unit data: promote to full member
etcd/2 ->> etcd/0*: peer-relation changed
etcd/0* ->> etcd/2: promote learning member
etcd/0* -->> Peer app data: delete "learning_member"
end
Loading
Clone this wiki locally