Skip to content

Instantly share code, notes, and snippets.

@thamaraiselvam
Created November 16, 2019 19:10
Show Gist options
  • Save thamaraiselvam/e69793f09d44a48c2a9a19c293360a05 to your computer and use it in GitHub Desktop.
Save thamaraiselvam/e69793f09d44a48c2a9a19c293360a05 to your computer and use it in GitHub Desktop.
Stolon Commands
Create Cluster
./bin/stolonctl --cluster-name stolon-cluster --store-backend=etcdv3 init
Start sentinal
./bin/stolon-sentinel --cluster-name stolon-cluster --store-backend=etcdv3
Create first keeper
./bin/stolon-keeper --cluster-name stolon-cluster --store-backend=etcdv3 --uid postgres0 --data-dir data/postgres0 --pg-su-password=supassword --pg-repl-username=repluser --pg-repl-password=replpassword --pg-listen-address=127.0.0.1 --pg-port 9000
Create second keeper
./bin/stolon-keeper --cluster-name stolon-cluster --store-backend=etcdv3 --uid postgres2 --data-dir data/postgres2 --pg-su-password=supassword --pg-repl-username=repluser --pg-repl-password=replpassword --pg-listen-address=127.0.0.1 --pg-port 9001
create third keeper
./bin/stolon-keeper --cluster-name stolon-cluster --store-backend=etcdv3 --uid postgres3 --data-dir data/postgres3 --pg-su-password=supassword --pg-repl-username=repluser --pg-repl-password=replpassword --pg-listen-address=127.0.0.1 --pg-port 9002
Start proxy
./bin/stolon-proxy --cluster-name stolon-cluster --store-backend=etcdv3 --port 25432
Connect through proxy
psql --host localhost --port 25432 postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment