summaryrefslogtreecommitdiffstats
path: root/scripts/db2-hadr/main.yml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--scripts/db2-hadr/main.yml43
1 files changed, 43 insertions, 0 deletions
diff --git a/scripts/db2-hadr/main.yml b/scripts/db2-hadr/main.yml
new file mode 100644
index 0000000..9179b70
--- /dev/null
+++ b/scripts/db2-hadr/main.yml
@@ -0,0 +1,43 @@
+version: 2.2
+category: Database
+shortdesc: IBM DB2 Database with HADR
+longdesc: >-
+ Configure an IBM DB2 database resource as active/passive HADR,
+ along with a Virtual IP.
+
+include:
+ - agent: ocf:heartbeat:db2
+ parameters:
+ - name: id
+ required: true
+ shortdesc: DB2 Resource ID
+ longdesc: Unique ID for the database resource in the cluster.
+ type: string
+ value: db2-database
+ - name: instance
+ required: true
+ type: string
+ value: db2inst1
+ - name: dblist
+ value: db1
+ ops: |
+ op start interval="0" timeout="130"
+ op stop interval="0" timeout="120"
+ op promote interval="0" timeout="120"
+ op demote interval="0" timeout="120"
+ op monitor interval="30" timeout="60"
+ op monitor interval="45" role="Master" timeout="60"
+
+ - script: virtual-ip
+ shortdesc: The IP address configured here will start before the DB2 instance.
+ parameters:
+ - name: id
+ value: db2-virtual-ip
+actions:
+ - include: virtual-ip
+ - include: db2
+ - cib: |
+ ms ms-{{db2:id}} {{db2:id}}
+ meta target-role=Stopped notify=true
+ colocation {{virtual-ip:id}}-with-master inf: {{virtual-ip:id}}:Started ms-{{db2:id}}:Master
+ order {{virtual-ip:id}}-after-master Mandatory: ms-{{db2:id}}:promote {{virtual-ip:id}}:start