Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

391 lines
14 KiB

use Time::Local;
printf "Configuration generated at %s\n\n", scalar localtime;
$stage = "j:\\frs-staging"; ## NOTE: double slash needed when variable is used.
#
# COMPUTER: ENT-DPO-01
# Computer FQDN is cn=ent-dpo-01,ou=servers,ou=depot,ou=enterprise services,dc=nos,dc=boeing,dc=com
#
# SUBSCRIPTION: SWDEPOT
# SUBSCRIBER: SWDEPOT
#
# DN : cn=swdepot,
# cn=swdepot,
# cn=8efcb42b-5a92-4153-90e8-b71c62a7f5b2,
# cn=dfs volumes,
# cn=ntfrs subscriptions,
# cn=ent-dpo-01,
# ou=servers,
# ou=depot,
# ou=enterprise services,
# dc=nos,
# dc=boeing,
# dc=com
#
#
#
# The depot server table
#
HUB1: FRS_SERVER (/RP="i:\swd" /SP="$stage"
/MNAME="{4230E73D-D796-4017-9224-7788C4F6A6EE}" # member names
/SHNAME='DPO-01' # Short name for cxtion RDNs
/COMPUTER='NOS\ENT-DPO-01$' ## note use of single quote because of $
/site=site01 /sitename=bellevuewa /timezone="-8"
/DNS_NAME="ENT-DPO-01.nos.boeing.com")
HUB2: FRS_SERVER (/RP="i:\swd" /SP="$stage"
/MNAME="{7DD1D84E-63B4-43B2-85B9-35E319C80887}"
/SHNAME='DPO-02'
/COMPUTER='NOS\ENT-DPO-02$'
/site=site02 /sitename=kentwa /timezone="-8"
/DNS_NAME="ent-dpo-02.nos.boeing.com")
REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
/MNAME="{BD6579E9-4A35-40CA-8A53-846B3BBC824D}"
/SHNAME='DPO-03'
/COMPUTER='NOS\ENT-DPO-03$'
/site=site10 /sitename=mesaaz /timezone="-7"
/DNS_NAME="ent-dpo-03.nos.boeing.com")
REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
/MNAME="{5F3266EC-F4F1-40EB-AB2A-B7F07F72C963}"
/SHNAME='DPO-04'
/COMPUTER='NOS\ENT-DPO-04$'
/site=site11 /sitename=longbeachca /timezone="-8"
/DNS_NAME="ENT-DPO-04.nos.boeing.com")
REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
/MNAME="{C1349084-39E6-489F-9ED8-47933B81720E}"
/SHNAME='DPO-05'
/COMPUTER='NOS\ENT-DPO-05$'
/site=site03 /sitename=sealbeachca /timezone="-8"
/DNS_NAME="ent-dpo-05.nos.boeing.com")
REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
/MNAME="{2FBB8F31-91A6-4952-83DE-E92146B4E2E6}"
/SHNAME='DPO-06'
/COMPUTER='NOS\ENT-DPO-06$'
/site=site04 /sitename=huntca /timezone="-8"
/DNS_NAME="ent-dpo-06.nos.boeing.com")
PLAN: FRS_SERVER (/RP="i:\swd" /SP="$stage"
/MNAME="{2FBB8F31-91A6-4952-83DE-E92146B4E2E6}"
/SHNAME='DPO-07'
/COMPUTER='NOS\ENT-DPO-07$'
/site=site04 /sitename=anaheimca /timezone="-8"
/DNS_NAME="ent-dpo-07.nos.boeing.com")
PLAN: FRS_SERVER (/RP="i:\swd" /SP="$stage"
/MNAME="{2FBB8F31-91A6-4952-83DE-E92146B4E2E6}"
/SHNAME='DPO-08'
/COMPUTER='NOS\ENT-DPO-08$'
/site=site04 /sitename=canogaca /timezone="-8"
/DNS_NAME="ent-dpo-08.nos.boeing.com")
REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
/MNAME="{A0EDA05A-8043-442D-A5A7-E2DA2408F8BF}"
/SHNAME='DPO-09'
/COMPUTER='NOS\ENT-DPO-09$'
/site=site09 /sitename=wichitaks /timezone="-6"
/DNS_NAME="ent-dpo-09.nos.boeing.com")
REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
/MNAME="{C249A70F-5245-4920-AB03-FD8BE1B9D3F2}"
/SHNAME='DPO-10'
/COMPUTER='NOS\ENT-DPO-10$'
/site=site08 /sitename=stlouismo /timezone="-6"
/DNS_NAME="ent-dpo-10.nos.boeing.com")
REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
/MNAME="{A85A1163-9829-4AC3-B4DF-C3EF10BEC63F}"
/SHNAME='DPO-11'
/COMPUTER='NOS\ENT-DPO-11$'
/site=site07 /sitename=philly /timezone="-5"
/DNS_NAME="ent-dpo-11.nos.boeing.com")
REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
/MNAME="{21181900-CDB5-49CE-9ACE-42ED136FC3E9}"
/SHNAME='DPO-12'
/COMPUTER='NOS\ENT-DPO-12$'
/site=site06 /sitename=huntsvilleal /timezone="-6"
/DNS_NAME="ent-dpo-12.nos.boeing.com" )
REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
/MNAME="{D7B53F57-B039-4C68-BA46-A9B9BC95E49B}"
/SHNAME='DPO-13'
/COMPUTER='NOS\ENT-DPO-13$'
/site=site05 /sitename=irvingtx /timezone="-6"
/DNS_NAME="ent-dpo-13.nos.boeing.com")
HUB1: FRS_SERVER (/RP="i:\swd" /SP="$stage"
/MNAME="{D84D2F8D-9D0B-4F6C-B59A-685EC6675145}"
/SHNAME='DPO-14'
/COMPUTER='NOS\ENT-DPO-14$'
/site=site01 /sitename=bellevuewa /timezone="-8"
/DNS_NAME="ENT-DPO-14.nos.boeing.com")
# The FRS_SCHEDULE command does not actually create any FRS objects in the DS,
# rather it defines the parameters to use when creating a schedule.
#
# Restriction: Any time with a ":" must be enclosed in quotes. See /REPL_DURATION,
# /TIME_ZONE and /DISABLE below.
# /DISABLE="mo:07:30-mo:18:00,tu:07:30-tu:18:00,we:07:30-we:18:00,th:07:30-th:18:00,fr:07:30-fr:18:00"
#
PRIMARY_SCH: FRS_SCHEDULE (/REPL_INTERVAL=4 /REPL_DURATION=2
/TIME_ZONE="-8" /REPL_OFFSET=0 /STAGGER=4
/METHOD=1 /NAME='Primary Sched'
)
BACKUP_SCH: FRS_SCHEDULE (/REPL_INTERVAL=4 /REPL_DURATION=2
/TIME_ZONE="-8" /REPL_OFFSET=2 /STAGGER=4
/METHOD=1 /NAME='Backup Sched'
)
#
# The following function creates the connection objects for a hub spoke topology.
#
FRS_SUB CREATE_HUB_SPOKE_CONN(/HUBSET=SET_REF_SET # Hubs
/BCHSET=SET_REF_SET # Branches
/SC1=SCHEDULE )
$Hx = 0;
$NHub = FRS_COUNT_SET(/SET=%HUBSET%);
print " NHUB = $NHub\n\n";
#
# RESTRICTION: don't PUT FRS FUNCTION REFS INSIDE A QUOTED STRING.
#
print " NBCH FRS _COUNT_SET( /SET= % BCHSET % ) ", FRS_COUNT_SET(/SET= %BCHSET% ), "\n" ;
#
# Create the topology
#
foreach $bch (FRS_ARRAY(/SET=%BCHSET%)) {
print "working on branch: $bch->{SHNAME}\n";
$hubsrv = %HUBSET%[$Hx];
#
# RESTRICTION: need braces around ONAME and MNAME.
#
FRS_CONNECTION (/TO=$bch /FROM=%HUBSET%[$Hx] /SCHED=%SC1%
/ONAME="FROM-".$hubsrv->{SHNAME}."-TO-".$bch->{SHNAME} )
FRS_CONNECTION (/TO=%HUBSET%[$Hx] /FROM=$bch /SCHED=%SC1%
/ONAME="FROM-".$bch->{SHNAME}."-TO-".$hubsrv->{SHNAME} )
$Hx=($Hx+1) % $NHub;
if ($Hx == 0) {
FRS_STAGGER (/SCHED=%SC1%)
}
}
FRS_END_SUB
#
# The following function creates the connection objects for a
# hub spoke topology with redundant connection objects.
#
FRS_SUB CREATE_REDUNDANT_HUB_SPOKE_CONN(/HUBSET1=SET_REF_SET # primary Hubs
/HUBSET2=SET_REF_SET # backup Hubs
/BCHSET=SET_REF_SET # Branches
/SC1=SCHEDULE # primary schedule
/SC2=SCHEDULE ) # backup schedule
$Hx = 0;
$NHub = FRS_COUNT_SET(/SET=%HUBSET1%);
print " NHUB = $NHub\n\n";
$Hx2 = 0;
$NHub2 = FRS_COUNT_SET(/SET=%HUBSET2%);
print " NHUB = $NHub2\n\n";
#
# RESTRICTION: don't PUT FRS FUNCTION REFS INSIDE A QUOTED STRING.
#
print " NBCH FRS _COUNT_SET( /SET= % BCHSET % ) ", FRS_COUNT_SET(/SET= %BCHSET% ), "\n" ;
#
# Create the topology
#
foreach $bch (FRS_ARRAY(/SET=%BCHSET%)) {
print "working on branch: $bch->{SHNAME}\n";
$hubsrv = %HUBSET1%[$Hx];
$hubsrv2 = %HUBSET2%[$Hx2];
# Set the connection to the primary hub
# RESTRICTION: need braces around ONAME and MNAME.
#
FRS_CONNECTION (/TO=$bch /FROM=%HUBSET1%[$Hx] /SCHED=%SC1%
/ONAME="FROM-".$hubsrv->{SHNAME}."-TO-".$bch->{SHNAME} )
FRS_CONNECTION (/TO=%HUBSET1%[$Hx] /FROM=$bch /SCHED=%SC1%
/ONAME="FROM-".$bch->{SHNAME}."-TO-".$hubsrv->{SHNAME} )
$Hx=($Hx+1) % $NHub;
if ($Hx == 0) {
FRS_STAGGER (/SCHED=%SC1%)
}
#
# Set the connection to the backup hub
#
FRS_CONNECTION (/TO=$bch /FROM=%HUBSET2%[$Hx2] /SCHED=%SC2%
/ONAME="FROM-".$hubsrv2->{SHNAME}."-TO-".$bch->{SHNAME} )
FRS_CONNECTION (/TO=%HUBSET2%[$Hx2] /FROM=$bch /SCHED=%SC2%
/ONAME="FROM-".$bch->{SHNAME}."-TO-".$hubsrv2->{SHNAME} )
$Hx2=($Hx2+1) % $NHub2;
if ($Hx2 == 0) {
FRS_STAGGER (/SCHED=%SC2%)
}
}
FRS_END_SUB
#
# The following function creates the connection objects for a ring topology.
#
FRS_SUB CREATE_RING_CONN(/HUBSET=SET_REF_SET )
FRS_SHOW(/SET=%HUBSET%)
$Ringx = 0;
$RingCount = FRS_COUNT_SET(/SET=%HUBSET%);
print " RingCount = $RingCount\n\n";
#
# Create the topology
#
for ($Ringx=0; $Ringx < $RingCount; $Ringx++) {
$RM1 = %HUBSET%[$Ringx];
$RM2 = %HUBSET%[($Ringx+1) % $RingCount];
#
# RESTRICTION: need braces around ONAME and MNAME.
#
FRS_CONNECTION (/TO=$RM1 /FROM=$RM2 /SCHED=ON
/ONAME="FROM-".$RM2->{SHNAME}."-TO-".$RM1->{SHNAME} )
FRS_CONNECTION (/TO=$RM2 /FROM=$RM1 /SCHED=ON
/ONAME="FROM-".$RM1->{SHNAME}."-TO-".$RM2->{SHNAME} )
}
FRS_END_SUB
#
# The following function builds the member objects for a hub spoke topology
# and creates the connection objects.
#
FRS_SUB CREATE_HUB_SPOKE(/HUBSET1=SET_REF_SET # primary Hubs
/HUBSET2=SET_REF_SET # backup Hubs
/BCHSET=SET_REF_SET # Branches
/SC1=SCHEDULE # primary schedule
/SC2=SCHEDULE # backup schedule
/REPSETDN=SET_ELEMENT)
FRSSUP::PrintHash(\%__args);
FRS_SHOW(/SET=%HUBSET1%)
FRS_SHOW(/SET=%HUBSET2%)
#
# Create the hub member objects
#
# Restriction: All subroutine argument refs are surrounded by "%".
# References to parameters in other objects use the
# notation "->{...}". e.g. COMPUTER, MNAME, id
#
foreach $hub (FRS_ARRAY(/SET=%HUBSET1%)) {
MOBJALLHUB: MOBJHUB1: FRS_MEMBER (/UNDER=%REPSETDN%
/SERVER=$hub
/COMPUTER=$hub->{COMPUTER}
/ONAME=$hub->{MNAME} )
}
foreach $hub (FRS_ARRAY(/SET=%HUBSET2%)) {
MOBJALLHUB: MOBJHUB2: FRS_MEMBER (/UNDER=%REPSETDN%
/SERVER=$hub
/COMPUTER=$hub->{COMPUTER}
/ONAME=$hub->{MNAME} )
}
#
# create the branch member objects.
#
foreach $bch (FRS_SET(/SET=%BCHSET%)) {
MOBJBCH: FRS_MEMBER (/UNDER=%REPSETDN%
/SERVER=$bch
/COMPUTER=$bch->{COMPUTER}
/ONAME=$bch->{MNAME} )
}
#
# Create a ring topology among all the hub servers.
#
CREATE_RING_CONN(/HUBSET=<MOBJALLHUB> )
#
# Create a redundant hub-spoke topology between the primary and backup
# hub servers and the branch servers.
#
CREATE_REDUNDANT_HUB_SPOKE_CONN(/HUBSET1=<MOBJHUB1> # primary Hubs
/HUBSET2=<MOBJHUB2> # backup Hubs
/BCHSET=<MOBJBCH> # Branches
/SC1=%SC1% # primary schedule
/SC2=%SC2% ) # backup schedule
FRS_END_SUB
#
# Create the replica set under the FRS Settings object.
# The FRS Settings object must already exist in the DS.
#
SETTINGS: FRS_SETTINGS (/DN="cn=dfs volumes,cn=file replication service,cn=system,dc=nos,dc=boeing,dc=com"
/ONAME="cn=swdepot")
SET: FRS_REPLICASET (/UNDER=<SETTINGS> /TYPE=DFS /ONAME="swdepot")
CREATE_HUB_SPOKE(/HUBSET1=<HUB1> # primary Hubs
/HUBSET2=<HUB2> # backup Hubs
/BCHSET=<REMOTE> # Branches
/SC1=<PRIMARY_SCH> # primary schedule
/SC2=<BACKUP_SCH> # backup schedule
/REPSETDN=<SET>)