User Tools

Site Tools


sccl:configuration

Configuration

This chapter describes the configuration of the Script-CLuster.

A SCript-CLuster is configured in three ascii files:

  • sccl.conf
  • packages.conf
  • resources.conf

All files are located in

cd /etc/sccl/

sccl.conf

This is the upper level configuration file of the script cluster. The arbitrary name of the cluster (CLUSTER) is defined and all associated cluster nodes (NODES) are listed.

:NOTE: This file is source'd, so be careful when editing.

sccl.conf
# Definition der Variablen fuers Script-Cluster
#
# Clustername
CLUSTER=SCCL001
#
# Physische Nodes im Cluster
NODES="host001 host002"
# HBNODE_EXT="hb1"
# HBNODES=""

# Pakete bei sccl_show_cluster sortieren
SHOWSORTED=1

# Start und Stopp-Zeiten ans ULS liefern?
ULS="1"
# ULS=""

############################################################
# Verzeichnis zum Speichern der Cluster-Lockdateien
LOCKDIR=/var/clusterlocks

# Datei mit den Paketen des Clusters
PACKAGES=/etc/sccl/packages.conf

# Datei mit den Resourcen des Clusters
RESOURCES=/etc/sccl/resources.conf

# Directory mit den Start-Stop und Test-Scripten der Resourcen
STARTSTOPDIR=/usr/local/sccl

# Einstellungen fuer die Clusterkommunikation ueber unix2web
U2WHOME=/usr/local/sccl/bin
U2WPWDDAT=/usr/local/sccl/bin/u2w_pwd.dat
U2WPORT=3579

:TODO: missing explanation


packages.conf

The packages are configured in the file indicated by the (showing the default entry):

PACKAGES=/etc/sccl/packages.conf

entry in the /etc/sccl/sccl.conf.

The PACKAGES file contains all packages belonging to the cluster. Each package lists one or more cluster nodes (NODES) on which they may be started. The first node defines the default node.

/etc/sccl/packages.conf
# packages.conf
#
# <package> { - | <stdnode> } [<altnode1> [<altnode2> ...]]
#

p1   host001  host002
db - host001
other_package - host002

:TODO: needs translation :TODO: needs verification of exact usage

Das Clusterpaket <package> wird automatisch beim Start des Clusters auf seinem Standard-Clusterknoten <stdnode> gestartet und darf auf allen <altnodeX> laufen. Ein '-' anstelle von <stdnode> verhindert das automatische Starten des Clusterpakets beim Starten des Clusters oder des Clusterknotens.


resources.conf

The resources are configured in the file indicated by the (showing the default entry):

RESOURCES=/etc/sccl/resources.conf

entry in the /etc/sccl/sccl.conf.

The RESOURCES file contains all definitions of the resources belonging to the cluster packages.

It may also contain resource definitions belonging to sub-packages which are not listed as packages in the PACKAGES file but only used in the RESOURCES file. Sub-packages are used to bundle resources under one definition, which is useful if several packages make use of that sub-package. Sub-packages cannot be started stand-alone and they do not appear as package in the output of the sccl_show_cluster command and their status cannot be determined.

The resource definition **must** be in one line!

/etc/sccl/resources.conf
# The general syntax of a resource definition:
<package> <description_no_spaces> [MULTI] <resource> <resource> ...

# example
db My_Database IP:AUTO:10.1.2.4.255.255.255.240 PRG:/home/db/scripts/sccl_startstop

When the package ist “started”, all resources are activated or started in the sequence the resources are given in the resource definition line (from left to right/forward).

When the package ist “stopped”, all resources are deactivated or stopped in the sequence the resources are given in the resource definition line (from right to left/backwards).

<package> The name of a cluster package.
<description_no_spaces> Long description of the package, may not contain spaces, use underscore instead.
MULTI The cluster package may be simultaneously active on more than one cluster node.
<resource> A specification of a resource (described later)

:TODO: Link to examples

The resources are described in [[sccl:configuration:resource_description]].


examples

db       host1   host2
tomcat   host3
apache   host4  host5
db         MySQL_DB    PRG:/etc/init.d/mysql     RST:tomcat,apache:CLUSTER
tomcat     Tomcat         CPKG:db:WAIT   PRG:/etc/init.d/tomcat6
apache     Apache         CPKG:db:WAIT   PRG:/etc/init.d/apache2
sccl/configuration.txt · Last modified: 2015-07-07 15:35 by uls