OpenSVC |
|||||||||
|
Here is a copy of the template service env file available on the nodes at /opt/opensvc/usr/share/doc/template.env # # OpenSVC config files are written in standard ini file format: # # "The configuration file consists of sections, led by a [section] header and # followed by name: value entries, with continuations in the style of RFC 822 # (see section 3.1.1, “LONG HEADER FIELDS”); name=value is also accepted. Note # that leading whitespace is removed from values. # Lines beginning with '#' or ';' are ignored and may be used to provide # comments." # extract from http://docs.python.org/library/configparser.html # # Resource are label [resource_name#index_in_resourse_set], like [ip#1], # [ip#2], [fs#1], [fs#2]... # # Every resource accept two options: # 'disable' # optional. Possible values are 'true' or 'false'. # A disabled resource will be ignored on service startup and shutdown. # # 'optional' # optional. Possible values are 'true' or 'false'. # Actions on resource will be tried upon service startup and shutdown, # but action failures will be logged and passed over. Useful for resources # like dump filesystems for example. # # Every service config file must have a default section. # ############################################################################## # # Main service definition # ############################################################################## [default] # # 'app' # is used to identify who is responsible for is service, who is billable # and provides a most useful filtering key. Better keep it a short code. # ;app = OSVC # # 'comment' # is optional, but helps users understand the role of the service, # which is nice to on-call support people having to operate on a # service they are usualy responsible for. # ;comment = opensvc web front-end # # 'mode' # supported modes are 'lxc', 'zone', 'kvm', 'ldom', 'xen', 'hpvm' or # 'hosted'. The default is 'hosted'. # the mode decides upon disposition OpenSVC takes to bring a service up # or down : virtualized services need special actions to prepare and boot # the container for example, which is not needed for 'hosted' services. # ;mode = lxc # # 'drp_type' # supported values are 'standby' or 'srdf'. The default is 'standby'. # Not used for the moment. # ;drp_type = standby # # 'service_type' # supported values are 'DEV' and 'PRD'. There is no default, and this # setting is mandatory, as important rules apply to it : # 1/ a DEV service can not be brought up on a PRD node, but a PRD service # can be startup on a DEV node (in a DRP situation). # ;service_type = DEV # # 'nodes' # mandatory list of cluster nodes able to start the service when not in # a DRP situation # ;nodes = zezette # # 'autostart_node' # the node from 'nodes' where the service will try to start on upon node # reboot. The start-up will fail if the service is already up on another # node though. # If not specified, the service will never be started at node boot-time, # which is rarely the expected behaviour. # ;autostart_node = zezette # # 'drpnode' # optional. The backup node where the service is activated in a DRP # situation. This node is also a data synchronization target for 'sync' # resources (see below) # ;drpnode = vm5 # # 'drpnodes' # optional. Alternate backup nodes, where the service could be activated # in a DRP situation if the 'drpnode' is not available. These nodes are # also data synchronization targets for 'sync' resources (see below) # ;drpnodes = vm6 vm7 # # 'rsh' 'rcp' # the commands used to trigger remote executions of system commands on # 'nodes' and 'drpnodes'. # ;rsh = /usr/bin/ssh -o StrictHostKeyChecking=no -o ForwardX11=no -o PasswordAuthentication=no -o ConnectTimeout=10 ;rcp = /usr/bin/scp -o StrictHostKeyChecking=no -o ForwardX11=no -o PasswordAuthentication=no -o ConnectTimeout=10 # # 'scsireserv' # optional. Possible values are 'true' or 'false'. Default is 'false'. # If set to 'true', OpenSVC will try to acquire a type-5 (write exclusive, # registrant only) scsi3 persistent reservation on every path to disks of # every disk group attached to this service. Existing reservations are # preempted to not block service start-up. If the start-up was not # legitimate the data are still protected from being written over from both # nodes. # If set to 'false' or not set, 'scsireserv' can be activated on a per- # resource basis. # ;scsireserv = false # # 'bwlimit' # optional. Bandwidth limit in KB applied to all rsync transfers # ;bwlimit = 3000 # # 'sync_min_delay' # optional. Set the minimum delay between syncs in minutes. If a sync is # triggered through crond or manually, it is skipped if last sync occured # less than 'sync_min_delay' ago. # The mecanism is enforced by a timestamp created upon each sync completion # in /opt/opensvc/var/sync/[service]![dst] # ;sync_min_delay = 30 # # 'sync_max_delay' # optional. Default value is 1440 minutes (1 day). Unit is minutes. # This sets to delay above which the sync status of the resource is to be # considered down. Should be set according to your application service # level agreement. The cron job frequency should be set between # 'sync_min_delay' and 'sync_max_delay'. # ;sync_max_delay = 1440 # # 'vm_name' # optional. Defaults to service name. This need to be set if the virtual # machine name is different from the service name. # ;vm_name = teddybear ############################################################################## # # Service resources # ############################################################################## ############################################################################## # # 'ip' resources # describe which ip to plumb for the service. Any number of ips can be # attached to the service, but ips are to be uniquely assigned to it. # In case of ip conflict, the service refuses to start. # ;[ip#1] ;disable = true ;optional = true # # 'ipname' # the DNS name of the ip resource. Can be different from one node to the # other, in which case '@nodename' can be specified. This is most # useful to specify a different ip when the service starts in DRP mode, # where subnets are likely to be different than those of the production # datacenter. # ;ipname@zezette = unxdevweb ;ipname@vm5 = unxdrpweb # # 'ipdev' # the interface name over which OpenSVC will try to stack the service # ip. Can be different from one node to the other, in which case the # '@nodename' can be specified. # ;ipdev@zezette = br0 ;ipdev@vm5 = eth0 # # 'netmask' # optional if an ip is already plumbed on the root interface (if which # case the netmask is deduced from this ip). Mandatory if the interface # is dedicated to the service (dummy interface are likely to be in this # case). # the format is decimal, ex: 255.255.252.0 # ;netmask = 255.255.255.0 # # 'always_on' # optional. Possible values are 'nodes', 'drpnodes' or 'nodes drpnodes', # or a list of nodes. # Sets the nodes on which the resource is always kept up. Primary usage is # file synchronization receiving on non-shared disks. Don't set this on # shared disk !! danger !! # ;always_on = drpnodes ############################################################################## # # 'vg' resource # Disk group in the sense of volume managers, whatever the implementation. # Attaching a 'vg' to a service will make OpenSVC check and drive its # imported/exported status. # ;[vg#1] ;disable = true ;optional = true # # 'vgname' # nothing special there # ;vgname = unxtstsvc02 # # 'dsf' # optional. Boolean. HP-UX only. Default value is True. # 'dsf' must be set to false for LVM to use never-multipathed /dev/dsk/... # devices. Otherwize, ad-hoc multipathed /dev/disk/... devices. # ;dsf = true # # 'scsireserv' # optional. Possible values are 'true' or 'false'. Default is 'false'. # If set to 'true', OpenSVC will try to acquire a type-5 (write exclusive, # registrant only) scsi3 persistent reservation on every path to disks of # every disk group attached to this service. Existing reservations are # preempted to not block service start-up. If the start-up was not # legitimate the data are still protected from being written over from both # nodes. # If set to 'false' or not set, 'scsireserv' can still be activated globally # from the 'default' section. # ;scsireserv = false # # 'always_on' # optional. Possible values are 'nodes', 'drpnodes' or 'nodes drpnodes', # or a list of nodes. # Sets the nodes on which the resource is always kept up. Primary usage is # file synchronization receiving on non-shared disks. Don't set this on # shared disk !! danger !! # ;always_on = drpnodes ############################################################################## # # 'pool' resource # zfs pool the sense of volume managers, whatever the implementation. # Attaching a ZFS 'pool' to a service will make OpenSVC check and drive its # imported/exported status. # ;[pool#1] ;disable = true ;optional = true # # 'poolname' # nothing special there # ;poolname = zpool # # tags = preboot may be used when zfs pool is required before container boot # else postboot is presumed # ;tags = preboot # # 'scsireserv' # optional. Possible values are 'true' or 'false'. Default is 'false'. # If set to 'true', OpenSVC will try to acquire a type-5 (write exclusive, # registrant only) scsi3 persistent reservation on every path to disks of # every disk group attached to this service. Existing reservations are # preempted to not block service start-up. If the start-up was not # legitimate the data are still protected from being written over from both # nodes. # If set to 'false' or not set, 'scsireserv' can still be activated globally # from the 'default' section. # ;scsireserv = false # # 'always_on' # optional. Possible values are 'nodes', 'drpnodes' or 'nodes drpnodes', # or a list of nodes. # Sets the nodes on which the resource is always kept up. Primary usage is # file synchronization receiving on non-shared disks. Don't set this on # shared disk !! danger !! # ;always_on = drpnodes ############################################################################## # # 'vmdg' resource # HP-UX only, HP-VM only. The virtual machine disk group is the group of # disks given to a VM (pass-through device). As such, there can be only one # vmdg section for a hpvm-mode service. # This resource type is only present to allow setting the scsireserv option. # ;[vmdg] ;scsireserv = false ############################################################################## # # 'drbd' resource # Linux only. Set up the attachment, connection and role of a defined drbd # resource. Depending on weather this resource is stacked over or under # other disk group resources we need to start it respectively late or early. # This is controlled by a set of tags: 'prevg', 'postvg'. # ;[drbd#0] ;scsireserv = false # # 'res' # mandatory. String. The name of the drbd resource associated with this # service resource. OpenSVC expect the resource configuration file to # reside in '/etc/drbd.d/resname.res'. The 'sync#i0' resource will take # care of replicating this file to remote nodes. # ;res = data ;always_on = drpnodes ;tags = prevg ############################################################################## # # 'fs' resource # describes filesystems to mount on service startup and umount on service # shutdown. # The options are aligned to the Unix fstab fields. Whatever is possibly # described in the fstab should be supported in there. # ;[fs#1] ;disable = true ;optional = true ;dev = /opt/unxtstsvc01.img ;mnt = /opt/unxtstsvc01 ;mnt_opt = rw,loop ;type = ext4 ;[fs#2] ;dev = zpool/app ;mnt = /unxtstsvc01/app ;type = zfs # # 'type' # possible values: # zfs extx ... # # 'dev' # can have per-node value, using the 'dev@node' parameter syntax for # each node. You can mix 'dev' with 'dev@node' syntax to obtain a default # plus exceptions behaviour. This facility is most useful for replicating # nas heads, when you want the nodes to use the closest head. # ;dev@prdnode = prdnas:/vol/vol1 ;dev@drpnode = drpnas:/vol/vol1 # # 'always_on' # optional. Possible values are 'nodes', 'drpnodes' or 'nodes drpnodes', # or a list of nodes. # Sets the nodes on which the resource is always kept up. Primary usage is # file synchronization receiving on non-shared disks. Don't set this on # shared disk !! danger !! # ;always_on = drpnodes ############################################################################## # # 'loop' resource # linux-only. # describes a loop device attached to the service. startup triggers the # allocation of a block device (usualy major 7) mapped over the specified # file. The created loop dev can be used to stack disk group also attached # to the service. # ;[loop#1] ;disable = true ;optional = true ;file = /opt/unxtstsvc02.img ############################################################################## # # 'sync' resource # describes a rsync-based data synchronization job. By default the sync # is run daily. # ;[sync#1] ;disable = true ;optional = true # # 'src' # source of the sync. Can be a whitespace-separated list of files or dirs # passed as-is to rsync. Beware of the meaningful ending '/'. Refer to # the rsync man page for details. # ;src = /unxdevweb/ # # 'dst' # destination of the sync. Beware of the meaningful ending '/'. Refer to # the rsync man page for details. # ;dst = /unxdevweb # # 'exclude' # optional. A whitespace-separated list of --exclude params passed unchanged # to rsync. # ;exclude = --exclude=cache # # 'target' # mandatory. Possible values are 'nodes', 'drpnodes' or 'nodes drpnodes'. # Describes which nodes should receive this data sync from the PRD node # where the service is up and running. # # SAN storage shared 'nodes' must not be sync to 'nodes'. # SRDF-like paired storage must not be sync to 'drpnodes'. # ;target = nodes drpnodes # # 'snap' # optional. Possible values are 'true' or 'false'. Default is 'false'. # If set to true, OpenSVC will try to snapshot the first snapshottable # parent of the source of the sync and try to sync from the snap. # ;snap = true # # 'dstfs' # optional. If set to a remote mount point, OpenSVC will verify that the # specified mount point is really hosting a mounted FS. This can be used # as a safety net to not overflow the parent FS (may be root). # ;dstfs = /remote/dir # # 'bwlimit' # optional. Bandwidth limit in KB applied to this rsync transfer. Takes # precedence over 'bwlimit' set in [default]. # ;bwlimit = 3000 # # 'sync_min_delay' # optional. Set the minimum delay between syncs in minutes. If a sync is # triggered through crond or manually, it is skipped if last sync occured # less than 'sync_min_delay' ago. If no set in a resource section, fallback # to the value set in the 'default' section. The mecanism is enforced by a # timestamp created upon each sync completion in # /opt/opensvc/var/sync/[service]![dst] # ;sync_min_delay = 30 # # 'type' # optional. Default is 'rsync'. Specify a data sync mode. Supported values # are: zfs, netapp, rsync # ;type = netapp ;type = zfs # # 'netapp' type specific parameter. # The synchronization mecanism used is snapmirror. # # 'zfs' type specific parameter. # The synchronization mecanism used is zfs send / zfs receive. # src and dst may refer a dataset instead of directory # src and dst can be different from one node to the # other, in which case '@nodename' can be specified. # ;recursive = False # # 'recusive' # optional. (used when type = 'zfs') # Default is 'True'. So snapshots are created recursivly # # # 'filer' # mandatory. 'filer' points the nas head to pass commands to. In most case # you need to specify localized filers using the 'filer@node' syntax. # ;filer@vm4 = nasprd ;filer@vm5 = nasdrp # # 'path' # mandatory. Specifies the volume or qtree to drive snapmirror on. # ;path = /vol/vol1 # # 'user' # mandatory. Specifies the user used to ssh connect the filers. Nodes should # be trusted by keys to access the filer with this user. # ;user = nasadm ############################################################################## # # Symmetrix clones # ;[sync#2] ;type = symclone # # 'symdg' # mandatory. name of the symmetrix device group where the source and target # devices are grouped. # ;symdg = DGCVI # # 'precopy_timeout' # optional. default 300 secs. seconds to wait for a precopy (syncresync) to # finish before returning with an error. In this case, the precopy proceeds # normally, but the opensvc leftover actions must be retried. The precopy # time depends on the amount of changes logged at the source, which is # context-dependent. Tune to your needs. # ;precopy_timeout = 300 # # # 'symdevs' # 'symdevs@node' # mandatory. whitespace-separated list of devices to drive with this resource. # devices are specified as 'symmetrix identifier:symmetrix device identifier' # ;symdevs@node109 = 000290101370:380D ;sync_min_delay = 30 ;sync_max_delay = 1440 ############################################################################## # # Binary deltas based sync resource for Linux LVM. # [sync#3] ;type = dds # # 'src' # source logical volume. Mandatory. Points the origin of the snapshots to # replicate from. # ;src = /dev/mapper/unxtstsvc02-data # # 'dst' # target file or block device. Optional. Defaults to src. Points the media # to replay the binary-delta received from source node to. This media must have # a size superior or equal to source. # ;dst = /tmp/dds.img # # 'target' # Mandatory. Accepted values are 'drpnodes', 'nodes' or both, whitespace-separated. # Points the target nodes to replay the binary-deltas on. Be warned that starting # the service on a target node without a 'stop-syncupdate-start cycle, will break # the synchronization, so this mode is usually restricted to drpnodes sync, and # should not be used to replicate data between nodes with automated services failover. # ;target = drpnodes # # 'sender' # Optional. Accepted value is 'nodes'. Defaults to single sender. # Points the sender nodes to send the sync status files to. Should be set to 'nodes' # when nodes use shared disks and send their deltas to off-site nodes. Should not # be set when dds is used to keep in sync peer nodes. # ;sender = nodes # # 'snap_size' # Optional. Default to 10% of origin. In MB, rounded to physical extent boundaries # by lvm tools. # Size of the snapshots created by OpenSVC to extract binary deltas from. Opensvc # creates at most 2 snapshots : one short-lived to gather changed data from, and one # long-lived to gather changed chunks list from. Volume groups should have the # necessary space always available. # ;snap_size = 4 ;sync_min_delay = 1450 ;sync_max_delay = 1 |
|||||||||
|
Copyright © 2010 OpenSVC - Powered by web2py |
|||||||||