Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual embedded etcd clustering #14

Closed
1 task
portertech opened this issue Mar 13, 2017 · 2 comments
Closed
1 task

Manual embedded etcd clustering #14

portertech opened this issue Mar 13, 2017 · 2 comments
Assignees
Labels

Comments

@portertech
Copy link
Contributor

portertech commented Mar 13, 2017

  • create basic cluster (not manage)

CLI/ENV argument/variable for peers.

@portertech portertech changed the title embedded etcd clustering Embedded etcd clustering Mar 27, 2017
@portertech portertech changed the title Embedded etcd clustering Manual embedded etcd clustering Mar 27, 2017
@grepory grepory added in progress and removed ready labels Jun 15, 2017
@grepory
Copy link
Contributor

grepory commented Jun 15, 2017

To introduce clustering to sensu-backend, we'll be using static etcd clustering.

Static clustering requires that users assign unique IDs to each member of the cluster and that each member of the cluster know about the rest of the cluster prior to bootstrapping the cluster. Each sensu-backend process must be started with the --cluster-members argument (or by setting the SENSU_CLUSTER_MEMBERS environment variable) with the CSV list of cluster members of the format member_id=scheme://host:port. This is easier if illustrated.

Given a cluster:

The sensu-backend processes on each machine would be started thus:

Machine a:
sensu-backend --id a --etcd-peer-url http://a:2380 --cluster-members a=http://a:2380,b=http://b:2380,c=http://c:2380

Machine b:
sensu-backend --id b --etcd-peer-url http://b:2380 --cluster-members a=http://a:2380,b=http://b:2380,c=http://c:2380

Machine c:
sensu-backend --id c --etcd-peer-url http://c:2380 --cluster-members a=http://a:2380,b=http://b:2380,c=http://c:2380

The cluster member ID of a node cannot change over the course of its life.

If a user is clustering backends, they must specify all three of these flags on the command line, because we cannot guarantee that we generate an ID that matches a peer in the provided cluster member list.

@grepory
Copy link
Contributor

grepory commented Jun 23, 2017

It's probably worth documenting this for users on Kubernetes.

https://github.com/coreos/etcd-operator/blob/master/doc/best_practices.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants