Advertisement
Guest User

Untitled

a guest
Aug 30th, 2017
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.68 KB | None | 0 0
  1. bash-4.2$ patronictl reinit cluster2
  2. Error: 'Can not find suitable configuration of distributed configuration store\nAvailable implementations: consul, zookeeper, exhibitor, etcd'
  3.  
  4. Patroni config:
  5. -bash-4.2$ cat /etc/patroni/postgres0.yml
  6. scope: pg1
  7. name: cluster2
  8.  
  9. restapi:
  10.   listen: 0.0.0.0:8008
  11.   connect_address: 10.80.80.196:8008
  12.  
  13. #  certfile: /etc/ssl/certs/ssl-cert-snakeoil.pem
  14. #  keyfile: /etc/ssl/private/ssl-cert-snakeoil.key
  15. #  authentication:
  16. #    username: username
  17. #    password: password
  18.  
  19. etcd:
  20.   host: 10.80.80.196:2379
  21.  
  22. bootstrap:
  23.  # this section will be written into Etcd:/<namespace>/<scope>/config after initializing new cluster
  24.   # and all other cluster members will use it as a `global configuration`
  25.   dcs:
  26.     ttl: 30
  27.     loop_wait: 10
  28.     retry_timeout: 10
  29.     maximum_lag_on_failover: 1048576
  30. #    master_start_timeout: 300
  31. #    synchronous_mode: false
  32.     postgresql:
  33.       use_pg_rewind: true
  34.       use_slots: true
  35.       parameters:
  36.         wal_level: hot_standby
  37.         hot_standby: "on"
  38.         wal_keep_segments: 8
  39.         max_wal_senders: 5
  40.         max_replication_slots: 5
  41.         wal_log_hints: "on"
  42.         archive_mode: "on"
  43.         archive_timeout: 1800s
  44.         archive_command: mkdir -p ../wal_archive && test ! -f ../wal_archive/%f && cp %p ../wal_archive/%f
  45.       recovery_conf:
  46.         restore_command: cp ../wal_archive/%f %p
  47.  
  48.   # some desired options for 'initdb'
  49.   initdb: # Note: It needs to be a list (some options need values, others are switches)
  50.   - encoding: UTF8
  51.   - data-checksums
  52.  
  53.   pg_hba: # Add following lines to pg_hba.conf after running 'initdb'
  54.   - host replication replication 0.0.0.0/0 md5
  55.   - host all all 0.0.0.0/0 md5
  56. #  - hostssl all all 0.0.0.0/0 md5
  57.  
  58.   # Additional script to be launched after initial cluster creation (will be passed the connection URL as parameter)
  59. # post_init: /usr/local/bin/setup_cluster.sh
  60.  
  61.   # Some additional users users which needs to be created after initializing new cluster
  62.   users:
  63.     admin:
  64.       password: admin
  65.       options:
  66.        - createrole
  67.         - createdb
  68.  
  69. postgresql:
  70.   listen: 0.0.0.0:5432
  71.   connect_address: 10.80.80.196:5432
  72.   data_dir: /var/lib/pgsql/9.6/data/
  73.   bin_dir: /usr/pgsql-9.6/bin/
  74. #  config_dir:
  75. #  pgpass: /tmp/pgpass0
  76.   authentication:
  77.     replication:
  78.       username: replication
  79.       password: replication
  80.     superuser:
  81.       username: patroni
  82.       password: patroni
  83.   parameters:
  84.     unix_socket_directories: '.'
  85.  
  86. #watchdog:
  87. #  mode: automatic # Allowed values: off, automatic, required
  88. #  device: /dev/watchdog
  89.  
  90. tags:
  91.     nofailover: false
  92.     noloadbalance: false
  93.     clonefrom: false
  94.     nosync: false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement