Advertisement
Guest User

Untitled

a guest
Jun 14th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.01 KB | None | 0 0
  1. scope: pg1
  2. #namespace: /service/
  3. name: pg1
  4.  
  5. restapi:
  6.   listen: ip:8008
  7.   connect_address: ip:8008
  8. #  certfile: /etc/ssl/certs/ssl-cert-snakeoil.pem
  9. #  keyfile: /etc/ssl/private/ssl-cert-snakeoil.key
  10. #  authentication:
  11. #    username: username
  12. #    password: password
  13.  
  14. etcd:
  15.   host: ip:2379
  16.  
  17. bootstrap:
  18.  # this section will be written into Etcd:/<namespace>/<scope>/config after initializing new cluster
  19.   # and all other cluster members will use it as a `global configuration`
  20.   dcs:
  21.     ttl: 30
  22.     loop_wait: 10
  23.     retry_timeout: 10
  24.     maximum_lag_on_failover: 1048576
  25.     postgresql:
  26.       use_pg_rewind: true
  27. #      use_slots: true
  28.       parameters:
  29.         wal_level: hot_standby
  30.         hot_standby: "on"
  31.         wal_keep_segments: 8
  32.         max_wal_senders: 5
  33.         max_replication_slots: 5
  34.         wal_log_hints: "on"
  35.         archive_mode: "on"
  36.         archive_timeout: 1800s
  37.         archive_command: cp -f %p /var/lib/pgsql/9.6/data/pg_archived/%f
  38. #      recovery_conf:
  39. #        restore_command: cp ../wal_archive/%f %p
  40.  
  41.   # some desired options for 'initdb'
  42.   initdb: # Note: It needs to be a list (some options need values, others are switches)
  43.   - encoding: UTF8
  44.   - data-checksums
  45.  
  46.   pg_hba: # Add following lines to pg_hba.conf after running 'initdb'
  47.   - host replication replicator 127.0.0.1/32 md5
  48.   - host all all 0.0.0.0/0 md5
  49. #  - hostssl all all 0.0.0.0/0 md5
  50.  
  51.   # Some additional users users which needs to be created after initializing new cluster
  52.   users:
  53.     admin:
  54.       password: admin
  55.       options:
  56.        - createrole
  57.         - createdb
  58.  
  59. postgresql:
  60.   listen: ip:5432
  61.   connect_address: ip:5432
  62.   data_dir: /var/lib/pgsql/9.6/data/
  63. #  bin_dir:
  64.   pgpass: /tmp/pgpass0
  65.   authentication:
  66.     replication:
  67.       username: replication
  68.       password: replication
  69.     superuser:
  70.       username: patroni
  71.       password: patroni
  72.   parameters:
  73.     unix_socket_directories: '.'
  74. tags:
  75.     nofailover: false
  76.     noloadbalance: false
  77.     clonefrom: false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement