1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282
|
.TRY Cluster scripts
.INP: script
.INP: list
.EXT crm_resource --show-metadata ocf:heartbeat:apache
.EXT crm_resource --show-metadata ocf:heartbeat:IPaddr2
.EXT crm_resource --show-metadata ocf:heartbeat:Filesystem
.EXT crm_resource --show-metadata ocf:heartbeat:mysql
.EXT crm_resource --show-metadata systemd:cryptctl-server
.EXT crm_resource --show-metadata ocf:heartbeat:db2
.EXT crm_resource --show-metadata ocf:heartbeat:exportfs
.EXT crm_resource --show-metadata systemd:haproxy
.EXT crm_resource --show-metadata ocf:heartbeat:LVM-activate
.EXT crm_resource --show-metadata ocf:heartbeat:MailTo
.EXT crm_resource --show-metadata ocf:heartbeat:nginx
.EXT crm_resource --show-metadata ocf:heartbeat:Raid1
Basic:
health Verify health and configuration
mailto E-Mail
virtual-ip Virtual IP
Database:
database MySQL/MariaDB Database
db2 IBM DB2 Database
db2-hadr IBM DB2 Database with HADR
oracle Oracle Database
Filesystem:
drbd DRBD Block Device
filesystem File System (mount point)
gfs2 GFS2 File System (Cloned)
lvm-drbd LVM Group on DRBD
raid-lvm RAID Hosting LVM
NFS:
exportfs NFS Exported File System
nfsserver NFS Server
nfsserver-lvm-drbd NFS Server on LVM and DRBD
SAP:
sap-as SAP ASCS Instance
sap-ci SAP Central Instance
sap-db SAP Database Instance
sap-simple-stack SAP Simple Stack Instance
sap-simple-stack-plus SAP SimpleStack+ Instance
Server:
apache Apache Webserver
haproxy HAProxy
nginx Nginx Webserver
Stonith:
libvirt STONITH for libvirt (kvm / Xen)
sbd SBD, Shared storage based fencing
vmware Fencing using vCenter / ESX Server
System management:
cryptctl A utility for setting up LUKS-based disk encryption
.INP: list all
Basic:
health Verify health and configuration
mailto E-Mail
virtual-ip Virtual IP
Database:
database MySQL/MariaDB Database
db2 IBM DB2 Database
db2-hadr IBM DB2 Database with HADR
oracle Oracle Database
Filesystem:
drbd DRBD Block Device
filesystem File System (mount point)
gfs2 GFS2 File System (Cloned)
lvm-drbd LVM Group on DRBD
raid-lvm RAID Hosting LVM
NFS:
exportfs NFS Exported File System
nfsserver NFS Server
nfsserver-lvm-drbd NFS Server on LVM and DRBD
SAP:
sap-as SAP ASCS Instance
sap-ci SAP Central Instance
sap-db SAP Database Instance
sap-simple-stack SAP Simple Stack Instance
sap-simple-stack-plus SAP SimpleStack+ Instance
Script:
check-uptime Check uptime of nodes
gfs2-base GFS2 File System Base (Cloned)
lvm This agent activates/deactivates logical volumes.
raid1 Manages Linux software RAID (MD) devices on shared storage
sapdb SAP Database Instance
sapinstance SAP Instance
sbd-device Create SBD Device
Server:
apache Apache Webserver
haproxy HAProxy
nginx Nginx Webserver
Stonith:
libvirt STONITH for libvirt (kvm / Xen)
sbd SBD, Shared storage based fencing
vmware Fencing using vCenter / ESX Server
System management:
cryptctl A utility for setting up LUKS-based disk encryption
.INP: list names
apache
cryptctl
database
db2
db2-hadr
drbd
exportfs
filesystem
gfs2
haproxy
health
libvirt
lvm-drbd
mailto
nfsserver
nfsserver-lvm-drbd
nginx
oracle
raid-lvm
sap-as
sap-ci
sap-db
sap-simple-stack
sap-simple-stack-plus
sbd
virtual-ip
vmware
.INP: list names all
apache
check-uptime
cryptctl
database
db2
db2-hadr
drbd
exportfs
filesystem
gfs2
gfs2-base
haproxy
health
libvirt
lvm
lvm-drbd
mailto
nfsserver
nfsserver-lvm-drbd
nginx
oracle
raid-lvm
raid1
sap-as
sap-ci
sap-db
sap-simple-stack
sap-simple-stack-plus
sapdb
sapinstance
sbd
sbd-device
virtual-ip
vmware
.INP: list all names
apache
check-uptime
cryptctl
database
db2
db2-hadr
drbd
exportfs
filesystem
gfs2
gfs2-base
haproxy
health
libvirt
lvm
lvm-drbd
mailto
nfsserver
nfsserver-lvm-drbd
nginx
oracle
raid-lvm
raid1
sap-as
sap-ci
sap-db
sap-simple-stack
sap-simple-stack-plus
sapdb
sapinstance
sbd
sbd-device
virtual-ip
vmware
.INP: show mailto
mailto (Basic)
E-Mail
Notifies recipient by e-mail in the event of a resource takeover.
1. Notifies recipients by email in the event of resource takeover
id (required) (unique)
Identifier for the cluster resource
email (required)
Email address
subject
Subject
.INP: verify mailto id=foo email=test@example.com subject=hello
1. Ensure mail package is installed
mailx
2. Configure cluster resources
primitive foo ocf:heartbeat:MailTo
email="test@example.com"
subject="hello"
op start timeout="10"
op stop timeout="10"
op monitor interval="10" timeout="10"
clone c-foo foo
.INP: run mailto id=foo email=test@example.com subject=hello nodes=node1 dry_run=true
INFO: 9: E-Mail
INFO: 9: Nodes: node1
** all - #!/usr/bin/env python3
import crm_script
import crm_init
crm_init.install_packages(['mailx'])
crm_script.exit_ok(True)
INFO: 9: Ensure mail package is installed
** localhost - temporary file <<END
primitive foo ocf:heartbeat:MailTo email="test@example.com" subject="hello" op start timeout="10" op stop timeout="10" op monitor interval="10" timeout="10"
clone c-foo foo
END
** localhost - crm --wait --no configure load update <<temporary file>>
INFO: 9: Configure cluster resources
.INP: json '["show", "mailto"]'
{"category": "basic", "longdesc": "Notifies recipient by e-mail in the event of a resource takeover.", "name": "mailto", "shortdesc": "E-Mail", "steps": [{"longdesc": " This is a resource agent for MailTo. It sends email to a sysadmin\nwhenever a takeover occurs.", "parameters": [{"advanced": false, "longdesc": "", "name": "id", "required": true, "shortdesc": "Identifier for the cluster resource", "type": "resource", "unique": true}, {"advanced": false, "example": "", "longdesc": " The email address of sysadmin.", "name": "email", "required": true, "shortdesc": "Email address", "type": "email", "unique": false}, {"advanced": false, "example": "Resource Group", "longdesc": " The subject of the email.", "name": "subject", "required": false, "shortdesc": "Subject", "type": "string", "unique": false}], "required": true, "shortdesc": "Notifies recipients by email in the event of resource takeover"}]}
.INP: json '["verify", "mailto", {"id":"foo", "email":"test@example.com", "subject":"hello"}]'
{"longdesc": "", "name": "install", "nodes": "", "shortdesc": "Ensure mail package is installed", "text": "mailx"}
{"longdesc": "", "name": "cib", "nodes": "", "shortdesc": "Configure cluster resources", "text": "primitive foo ocf:heartbeat:MailTo\n\temail=\"test@example.com\"\n\tsubject=\"hello\"\n\top start timeout=\"10\"\n\top stop timeout=\"10\"\n\top monitor interval=\"10\" timeout=\"10\"\n\nclone c-foo foo"}
|