SHARE
TWEET

Untitled

a guest Apr 27th, 2018 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   pgmaster:
  2.     mem_limit: 4g
  3.     image: ${registry_image_path}gin4/postgres:4.1.1_RC2
  4.     environment:
  5.       NODE_ID: 1
  6.       NODE_NAME: node1
  7.       CLUSTER_NODE_NETWORK_NAME: pgmaster
  8.       PARTNER_NODES: "pgmaster,pgslave1,pgslave2"
  9.       REPLICATION_PRIMARY_HOST: pgmaster
  10.       NODE_PRIORITY: 100
  11.       SSH_ENABLE: 0
  12.       POSTGRES_DB: gin_db
  13.       POSTGRES_USER: gin
  14.       POSTGRES_PASSWORD: ${postgres_password}
  15.       CLEAN_OVER_REWIND: 0
  16.       CONFIGS_DELIMITER_SYMBOL: ;
  17.       CONFIGS: "listen_addresses:'*';max_replication_slots:5;max_connections:500"
  18.       CLUSTER_NAME: pg_cluster
  19.       REPLICATION_DB: replication_db
  20.       REPLICATION_USER: replication_user
  21.       REPLICATION_PASSWORD: replication_pass
  22.     labels:
  23.       io.rancher.container.pull_image: always
  24.       io.rancher.container.hostname_override: container_name
  25.       io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=pgmaster
  26.     {{- if ne .Values.LOCAL_VOLUMES "none"}}
  27.     volumes:
  28.     - pgmaster_data:/var/lib/postgresql/data
  29.     {{- end }}
  30.     restart: on-failure
  31.  
  32.   pgslave1:
  33.     mem_limit: 4g
  34.     image: ${registry_image_path}gin4/postgres:4.1.1_RC2
  35.     environment:
  36.       NODE_ID: 2
  37.       NODE_NAME: node2
  38.       CLUSTER_NODE_NETWORK_NAME: pgslave1
  39.       PARTNER_NODES: "pgmaster,pgslave1,pgslave2"
  40.       REPLICATION_PRIMARY_HOST: pgmaster
  41.       NODE_PRIORITY: 100
  42.       SSH_ENABLE: 0
  43.       CLEAN_OVER_REWIND: 1
  44.       CONFIGS_DELIMITER_SYMBOL: ;
  45.       CONFIGS: "max_replication_slots:10;max_connections:500"
  46.     labels:
  47.       io.rancher.container.pull_image: always
  48.       io.rancher.container.hostname_override: container_name
  49.       io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=pgslave1
  50.     {{- if ne .Values.LOCAL_VOLUMES "none"}}
  51.     volumes:
  52.     - pgslave1_data:/var/lib/postgresql/data
  53.     {{- end }}
  54.     restart: on-failure
  55.  
  56.   pgslave2:
  57.     mem_limit: 4g
  58.     image: ${registry_image_path}gin4/postgres:4.1.1_RC2
  59.     environment:
  60.       NODE_ID: 3
  61.       NODE_NAME: node3
  62.       CLUSTER_NODE_NETWORK_NAME: pgslave2
  63.       PARTNER_NODES: "pgmaster,pgslave1,pgslave2"
  64.       REPLICATION_PRIMARY_HOST: pgmaster
  65.       NODE_PRIORITY: 100
  66.       SSH_ENABLE: 0
  67.       CLEAN_OVER_REWIND: 1
  68.       CONFIGS_DELIMITER_SYMBOL: ;
  69.       CONFIGS: "max_replication_slots:10;max_connections:500"
  70.     labels:
  71.       io.rancher.container.pull_image: always
  72.       io.rancher.container.hostname_override: container_name
  73.       io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=pgslave2
  74.     {{- if ne .Values.LOCAL_VOLUMES "none"}}
  75.     volumes:
  76.     - pgslave2_data:/var/lib/postgresql/data
  77.     {{- end }}
  78.     restart: on-failure
  79.  
  80.   pgpool:
  81.     mem_limit: 4g
  82.     image: ${registry_image_path}gin4/pgpool:4.1.1_RC2
  83.     environment:
  84.       PCP_USER: pcp_user
  85.       PCP_PASSWORD: pcp_pass
  86.       WAIT_BACKEND_TIMEOUT: 300
  87.       CHECK_USER: gin
  88.       CHECK_PASSWORD: ${postgres_password}
  89.       CHECK_PGCONNECT_TIMEOUT: 3
  90.       SSH_ENABLE: 0
  91.       DB_USERS: gin:${postgres_password}
  92.       BACKENDS: "0:pgmaster:5432:1:/var/lib/postgresql/data:ALLOW_TO_FAILOVER,1:pgslave1::::,2:pgslave2::::"
  93.       REQUIRE_MIN_BACKENDS: 2
  94.       CONFIGS: "num_init_children:250,max_pool:20"
  95.     depends_on:
  96.     - pgmaster
  97.     - pgslave1
  98.     - pgslave2
  99.     labels:
  100.       io.rancher.container.pull_image: always
  101.       io.rancher.container.hostname_override: container_name
  102.       io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=pgpool
  103.     restart: on-failure
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top