diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/apache | 61 | ||||
-rw-r--r-- | templates/clvm | 59 | ||||
-rw-r--r-- | templates/filesystem | 44 | ||||
-rw-r--r-- | templates/gfs2 | 74 | ||||
-rw-r--r-- | templates/gfs2-base | 46 | ||||
-rw-r--r-- | templates/ocfs2 | 61 | ||||
-rw-r--r-- | templates/sbd | 34 | ||||
-rw-r--r-- | templates/virtual-ip | 39 |
8 files changed, 418 insertions, 0 deletions
diff --git a/templates/apache b/templates/apache new file mode 100644 index 0000000..955257b --- /dev/null +++ b/templates/apache @@ -0,0 +1,61 @@ +%name apache + +# Copyright (C) 2009 Dejan Muhamedagic +# +# License: GNU General Public License (GPL) + +# Apache web server +# +# This template generates a single primitive resource of type apache + +%depends_on virtual-ip +%suggests filesystem + +# NB: +# The apache RA monitor operation requires the status module to +# be loaded and access to its page (/server-status) allowed from +# localhost (127.0.0.1). Typically, the status module is not +# loaded by default. How to enable it depends on your +# distribution. For instance, on recent openSUSE or SLES +# releases, it is enough to add word "status" to the list in +# variable APACHE_MODULES in file /etc/sysconfig/apache2 and then +# start and stop apache once using rcapache2. + +%required + +# Name the apache resource +# For example, to name the resource web-1, edit the line below +# as follows: +# %% id web-1 +%% id + +# The full pathname of the Apache configuration file +# Example: +# %% configfile /etc/apache2/httpd.conf +%% configfile + +%optional + +# Extra options to apply when starting apache. See man httpd(8). + +%% options + +# Files (one or more) which contain extra environment variables, +# such as /etc/apache2/envvars + +%% envfiles + +%generate + +primitive %apache ocf:heartbeat:apache + params configfile=%_:configfile + opt options=%_:options + opt envfiles=%_:envfiles + +monitor %apache 120s:60s + +group %_:id + %if %filesystem + %filesystem + %fi + %apache %virtual-ip diff --git a/templates/clvm b/templates/clvm new file mode 100644 index 0000000..96c4fff --- /dev/null +++ b/templates/clvm @@ -0,0 +1,59 @@ +%name clvm + +# Copyright (C) 2009 Dejan Muhamedagic +# +# License: GNU General Public License (GPL) + +# Cluster-aware lvm (cloned) +# +# This template generates a cloned instance of clvm and one +# volume group +# +# NB: You need just one clvm, regardless of how many volume +# groups. In other words, you can use this template only for one +# volume group and to make another one, you'll have to edit the +# resulting configuration yourself. + +%required + +# Name the volume group (for example: vg-1) +# The LVM resource will be in a cloned group with the rest +# of the prerequisite resources. The clone is going to be named c-<id> +# (e.g. c-vg-1) + +# For example, to name the resource vg-1, edit the line below +# as follows: +# %% id vg-1 +%% id + +# The volume group name +# Example: +# %% volgrpname myvolgroup +%% volgrpname + +%generate + +primitive %_:id ocf:heartbeat:LVM + params volgrpname="%_:volgrpname" + op start timeout=60s + op stop timeout=60s + op monitor interval=30s timeout=60s + +primitive dlm ocf:pacemaker:controld + op start timeout=90s + op stop timeout=100s + +primitive clvm ocf:lvm2:clvmd + params daemon_timeout="30" + op start timeout=90s + op stop timeout=100s + +primitive cmirror ocf:lvm2:cmirrord + params daemon_timeout="30" + op start timeout=90s + op stop timeout=100s + +group g-%_:id dlm clvm cmirror %_:id + +clone c-%_:id g-%_:id + meta interleave="true" ordered="true" diff --git a/templates/filesystem b/templates/filesystem new file mode 100644 index 0000000..2699699 --- /dev/null +++ b/templates/filesystem @@ -0,0 +1,44 @@ +%name filesystem + +# Copyright (C) 2009 Dejan Muhamedagic +# +# License: GNU General Public License (GPL) + +# Filesystem +# +# This template generates a single primitive resource of type +# Filesystem + +%required + +# The name of block device for the filesystem, or -U, -L +# options for mount, or NFS mount specification. +# Example: +# %% device /dev/hda +%% device + +# The mount point for the filesystem. +# Example: +# %% directory /mnt/fs +%% directory + +# The type of filesystem to be mounted. +# Example: +# %% fstype xfs +%% fstype + +%optional + +# Any extra options to be given as -o options to mount. +# +# For bind mounts, add "bind" here and set fstype to "none". +# We will do the right thing for options such as "bind,ro". +%% options + +%generate + +primitive %_ ocf:heartbeat:Filesystem + params + device=%_:device + directory=%_:directory + fstype=%_:fstype diff --git a/templates/gfs2 b/templates/gfs2 new file mode 100644 index 0000000..244befd --- /dev/null +++ b/templates/gfs2 @@ -0,0 +1,74 @@ +%name gfs2 + +# Copyright (C) 2009 Andrew Beekhof +# +# License: GNU General Public License (GPL) + +# gfs2 filesystem (cloned) +# +# This template generates a cloned instance of the ocfs2 filesystem +# +# The filesystem should be on the device, unless clvm is used +# To use clvm, pull it along with this template: +# new myfs ocfs2 clvm +# +# NB: You need just one dlm and o2cb, regardless of how many +# filesystems. In other words, you can use this template only for +# one filesystem and to make another one, you'll have to edit the +# resulting configuration yourself. + +%depends_on gfs2-base +%suggests clvm + +%required + +# Name the gfs2 filesystem +# (for example: bigfs) +# NB: The clone is going to be named c-<id> (e.g. c-bigfs) +# Example: +# %% id bigfs +%% id + +# The mount point +# Example: +# %% directory /mnt/bigfs +%% directory + +# The device + +%% device + +# optional parameters for the gfs2 filesystem + +%optional + +# mount options + +%% options + +%generate + +primitive %_:id ocf:heartbeat:Filesystem + params + directory="%_:directory" + fstype="gfs2" + device="%_:device" + opt options="%_:options" + +monitor %_:id 20:40 + +clone c-%_:id %_:id + meta interleave="true" ordered="true" + +colocation colo-%_:id-gfs inf: c-%_:id gfs-clone + +order order-%_:id-gfs inf: gfs-clone c-%_:id + +# if there's clvm, generate some constraints too +# + +%if %clvm +colocation colo-%_:id-%clvm:id inf: c-%_:id c-%clvm:id + +order order-%_:id-%clvm:id inf: c-%clvm:id c-%_:id +%fi diff --git a/templates/gfs2-base b/templates/gfs2-base new file mode 100644 index 0000000..d385ed4 --- /dev/null +++ b/templates/gfs2-base @@ -0,0 +1,46 @@ +%name gfs2-base + +# Copyright (C) 2009 Andrew Beekhof +# +# License: GNU General Public License (GPL) + +# gfs2 filesystem base (cloned) +# +# This template generates a cloned instance of the ocfs2 filesystem +# +# The filesystem should be on the device, unless clvm is used +# To use clvm, pull it along with this template: +# new myfs ocfs2 clvm +# +# NB: You need just one dlm and o2cb, regardless of how many +# filesystems. In other words, you can use this template only for +# one filesystem and to make another one, you'll have to edit the +# resulting configuration yourself. + +%suggests clvm +%required + +%generate + +primitive dlm ocf:pacemaker:controld + +clone dlm-clone dlm + meta interleave="true" ordered="true" + +primitive gfs-controld ocf:pacemaker:controld + +clone gfs-clone gfs-controld + meta interleave="true" ordered="true" + +colocation colo-gfs-dlm inf: gfs-clone dlm-clone + +order order-gfs-dlm inf: dlm-clone gfs-clone + +# if there's clvm, generate some constraints too +# + +%if %clvm +colocation colo-clvm-dlm inf: clvm-clone dlm-clone + +order order-clvm-dlm inf: dlm-clone clvm-clone +%fi diff --git a/templates/ocfs2 b/templates/ocfs2 new file mode 100644 index 0000000..ae07e8b --- /dev/null +++ b/templates/ocfs2 @@ -0,0 +1,61 @@ +%name ocfs2 + +# Copyright (C) 2009 Dejan Muhamedagic +# +# License: GNU General Public License (GPL) + +# ocfs2 filesystem (cloned) +# +# This template generates a cloned instance of the ocfs2 filesystem +# +# NB: You need only one dlm, regardless of how many +# filesystems. In other words, you can use this template only for +# one filesystem and to make another one, you'll have to edit the +# resulting configuration yourself. + +%required + +# Name the ocfs2 filesystem (for example: bigfs) +# Example: +# %% id bigfs +%% id + +# The mount point +# Example: +# %% directory /mnt/bigfs +%% directory + +# The device + +%% device + +# optional parameters for the ocfs2 filesystem + +%optional + +# mount options + +%% options + +%generate + +primitive %_:id ocf:heartbeat:Filesystem + params + directory="%_:directory" + fstype="ocfs2" + device="%_:device" + opt options="%_:options" + op start timeout=60s + op stop timeout=60s + +monitor %_:id 20s:40s + +primitive dlm ocf:pacemaker:controld + op start timeout=90s + op stop timeout=100s + op monitor interval=60s timeout=60s + +clone base-%_:id dlm meta interleave="true" +clone clusterfs-%_:id clusterfs meta interleave="true" +order base-then-clusterfs-%_:id inf: base-%_:id clusterfs-%_:id +colocation clusterfs-with-base-%_:id inf: clusterfs-%_:id base-%_:id diff --git a/templates/sbd b/templates/sbd new file mode 100644 index 0000000..9ab201a --- /dev/null +++ b/templates/sbd @@ -0,0 +1,34 @@ +%name sbd + +# Copyright (C) 2009 Dejan Muhamedagic +# +# License: GNU General Public License (GPL) + +# Shared storage based fencing. +# +# This template generates a single instance of external/sbd. +# +# There is quite a bit more to do to make this stonith operational. +# See http://www.linux-ha.org/wiki/SBD_Fencing for information. +# + +%required + +# The resource id (name). +# Example: +# %% id stonith-sbd +%% id + +# Name of the device (shared disk). +# NB: Make sure that the device remains the same on reboots. It's +# preferable to use udev generated names rather than the usual +# /dev/sd? +# %% sbd_device /dev/sda +%% sbd_device + +%generate + +primitive %_:id stonith:external/sbd + params sbd_device="%_:sbd_device" + op monitor interval=15s timeout=60s + op start timeout=60s diff --git a/templates/virtual-ip b/templates/virtual-ip new file mode 100644 index 0000000..c6ae46e --- /dev/null +++ b/templates/virtual-ip @@ -0,0 +1,39 @@ +%name virtual-ip + +# Copyright (C) 2009 Dejan Muhamedagic +# +# License: GNU General Public License (GPL) + +# Virtual IP address +# +# This template generates a single primitive resource of type IPaddr + +%required + +# Specify an IP address +# (for example: 192.168.1.101) +# Example: +# %% ip 192.168.1.101 + +%% ip + +%optional + +# If your network has a mask different from its class mask, then +# specify it here either in CIDR format or as a dotted quad +# (for example: 24 or 255.255.255.0) +# Example: +# %% netmask 24 + +%% netmask + +# Need LVS support? Set this to true then. + +%% lvs_support + +%generate + +primitive %_ ocf:heartbeat:IPaddr + params ip=%_:ip + opt cidr_netmask=%_:netmask + opt lvs_support=%_:lvs_support |