Sample configurations

group ApacheG1(

SystemList = { host1 = 0, host2 = 1 }

)

Apache httpd_server (

Critical = 0

httpdDir = "/apache/bin"

HostName = vcshp1

Port = 8888

User = root

SecondLevelMonitor = 1

ConfigFile = "/apache/conf/httpd.conf"

)

DiskGroup Apache_dg (

Critical = 0

DiskGroup = apc1

)

IP Apache_ip (

Critical = 0

Device = lan0

Address = "11.123.99.168"

NetMask = "255.255.254.0"

)

Mount Apache_mnt (

Critical = 0

MountPoint = "/apache"

BlockDevice = "/dev/vx/dsk/apc1/apcvol1"

FSType = vxfs

FsckOpt = "-y"

)

Apache_mnt requires Apache_dg

httpd_server requires Apache_mnt

httpd_server requires Apache_ip


Running two versions of httpd

This example shows how two versions of httpd can run from different locations. In group Apache_1, httpd runs from Port 80, the default location. The configuration file in /usr/local/apache/conf/httpd.conf should indicate DocumentRoot, address, port, and other parameters. In group Apache_2, httpd runs from /home/web/apache. The PID file for this is created in /home/web/apache/logs/httpd.pid. The configuration file in /home/web/apache/conf/httpd.conf should define parameters for running this version of httpd.

Each Apache resource requires an online IP resource. In this example, each Apache resource requires an online mount resource to mount block devices from disks reserved by the Disk Reservation agent.

system sysa

system sysb

group Apache_1 (

SystemList = { sysa ,sysb}

AutoStartList = { sysa}

)

Apache myapacheWeb

httpdDir = "/mnt/apache/bin"

SecondLevelMonitor = 1

ConfigFile = "/mnt/apache/conf/httpd.conf"

HostName = "server1.mydomain.com"

Port = 80

)

IP myapacheIP(

Device = "eth0"

Address="192.168.50.50"

NetMask="255.255.255.0"

)

NIC myapacheNIC(

Device="eth0"

NetworkHosts={"172.29.9.178","172.29.9.179"}

)

Mount myapacheMnt(

MountPoint="/mnt/apache/"

BlockDevice="/dev/sdd2"

)

DiskReservation myapacheDiskRes(

Disks ="/dev/sdd"

)

myapacheMnt requires myapacheDiskRes

myapacheIP requires myapacheNIC

myapacheWeb requires myapacheIP

myapacheWeb requires myapacheMnt

group Apache_2 (

SystemList = { sysa,sysb}

AutoStartList = { sysa}

)

Apache myapacheWeb2(

httpdDir = "/mnt/apache1/bin"

SecondLevelMonitor = 1

ConfigFile = "/mnt/apache1/conf/httpd.conf"

HostName = "server2.mydomain.com"

Port = 8080

)

IP myapacheIP2(

Device = "eth1"

Address="192.168.60.50"

NetMask="255.255.255.0"

)

NIC myapacheNIC2(

Device="eth1"

)

Mount myapacheMnt2(

MountPoint="/mnt/apache1/"

BlockDevice="/dev/sdc3"

)

DiskReservation myapacheDiskRes2(

Disks ="/dev/sdc"

)

myapacheMnt2 requires myapacheDiskRes2

myapacheIP2 requires myapacheNIC2

myapacheWeb2 requires myapacheIP2

myapacheWeb2 requires myapacheMnt2


Sample main.cf file

include "types.cf"

cluster Cluster1 (

UserNames = { admin = xxxxxx }

)

system SystemA (

)

system SystemB (

)

group Web1 (

SystemList = { SystemA = 0, SystemB = 1 }

)

DiskGroup Web1_dg (

DiskGroup = web1

)

Volume Web1_vol (

DiskGroup = web1

Volume = volweb1

)

IP Web1_ip (

Device = eth0

Address = "10.212.88.220"

NetMask = "255.255.254.0"

)

Mount Web1_mnt (

MountPoint = "/apache/srvr01"

BlockDevice = "/dev/vx/dsk/web1/volweb1 "

FSType = vxfs

FsckOpt = "-y"

)

NIC Web1_nic (

Device = eth0

)

Apache Web1_http (

HostName = spartan

Port = 80

SecondLevelMonitor = 1

SecondLevelTimeout = 25

httpdDir = "/apache/srvr01/bin"

EnvFile = "/apache/srvr01/bin/envvars"

PidFile = /apache/srvr01/log/httpd.pid"

ConfigFile = "/apache/srvr01/conf/httpd.conf"

IntentionalOffline = 1

)

Web1_ip requires Web1_nic

Web1_mnt requires Web1_vol

Web1_vol requires Web1_dg

Web1_http requires Web1_ip

Web1_http requires Web1_mnt

group ApacheG1(

SystemList = { host1 = 0, host2 = 1 }

)

Apache httpd_server (

Critical = 0

httpdDir = "/apache/bin"

HostName = vcssol1

Port = 8888

User = root

SecondLevelMonitor = 1

ConfigFile = "/apache/conf/httpd.conf"

)

DiskGroup Apache_dg (

Critical = 0

DiskGroup = apc1

)

IP Apache_ip (

Critical = 0

Device = bge0

Address = "11.123.99.168"

NetMask = "255.255.254.0"

)

Mount Apache_mnt (

Critical = 0

MountPoint = "/apache"

BlockDevice = "/dev/vx/dsk/apc1/apcvol1"

FSType = vxfs

FsckOpt = "-y"

)

Apache_mnt requires Apache_dg

httpd_server requires Apache_mnt

httpd_server requires Apache_ip