Skip to content

Instantly share code, notes, and snippets.

@eloycoto
Created December 1, 2014 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eloycoto/c07177c63ee814c0397c to your computer and use it in GitHub Desktop.
Save eloycoto/c07177c63ee814c0397c to your computer and use it in GitHub Desktop.
primitive ClusterIP ocf:heartbeat:IPaddr2 \
params ip="{{cluster['ip']}}" cidr_netmask="24" \
meta migration-threshold="0" \
op start timeout="60s" interval="0s" on-fail="restart" \
op monitor timeout="60s" interval="10s" on-fail="restart" \
op stop timeout="60s" interval="0s" on-fail="block"
primitive KAMAILIO lsb:kamailio \
meta migration-threshold="0" target-role="Started" \
op start timeout="60s" interval="0s" on-fail="restart" \
op monitor timeout="60s" interval="10s" on-fail="restart" \
op stop timeout="60s" interval="0s" on-fail="block"
primitive pgsql ocf:heartbeat:pgsql \
params pgctl="/usr/pgsql-9.2/bin/pg_ctl" psql="/usr/pgsql-9.2/bin/psql" pgdata="/var/lib/pgsql/9.2/data/" rep_mode="sync" restore_command="cp /var/lib/pgsql/pg_archive/%f %p" primary_conninfo_opt="keepalives_idle=60 keepalives_interval=5 keepalives_count=5" master_ip="{{cluster['ip']}}" restart_on_promote="true" node_list="{{nodes}}" \
op start interval="0s" timeout="60s" on-fail="restart" \
op monitor interval="7s" timeout="60s" on-fail="restart" \
op monitor interval="2s" role="Master" timeout="60s" onfail="restart" \
op promote interval="0s" timeout="60s" on-fail="restart" \
op demote interval="0s" timeout="60s" on-fail="stop" \
op stop interval="0s" timeout="60s" on-fail="block" \
op notify interval="0s" timeout="60s"
ms msPostgresql pgsql \
meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"
location master-prefer-node ClusterIP 0: {{hosts[0]['master']['ip']}}
colocation rsc_colocation-1 inf: ClusterIP msPostgresql:Master KAMAILIO
order rsc_order-1 0: ClusterIP:start msPostgresql:promote KAMAILIO:start symmetrical=false
order rsc_order-2 0: msPostgresql:demote ClusterIP:stop KAMAILIO:stop symmetrical=false
property $id="cib-bootstrap-options" \
dc-version="1.1.10-14.el6-368c726" \
cluster-infrastructure="classic openais (with plugin)" \
expected-quorum-votes="2" \
stonith-enabled="false"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment