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

  1. use Time::Local;
  2. printf "Configuration generated at %s\n\n", scalar localtime;
  3. $stage = "j:\\frs-staging"; ## NOTE: double slash needed when variable is used.
  4. #
  5. # COMPUTER: ENT-DPO-01
  6. # Computer FQDN is cn=ent-dpo-01,ou=servers,ou=depot,ou=enterprise services,dc=nos,dc=boeing,dc=com
  7. #
  8. # SUBSCRIPTION: SWDEPOT
  9. # SUBSCRIBER: SWDEPOT
  10. #
  11. # DN : cn=swdepot,
  12. # cn=swdepot,
  13. # cn=8efcb42b-5a92-4153-90e8-b71c62a7f5b2,
  14. # cn=dfs volumes,
  15. # cn=ntfrs subscriptions,
  16. # cn=ent-dpo-01,
  17. # ou=servers,
  18. # ou=depot,
  19. # ou=enterprise services,
  20. # dc=nos,
  21. # dc=boeing,
  22. # dc=com
  23. #
  24. #
  25. #
  26. # The depot server table
  27. #
  28. HUB1: FRS_SERVER (/RP="i:\swd" /SP="$stage"
  29. /MNAME="{4230E73D-D796-4017-9224-7788C4F6A6EE}" # member names
  30. /SHNAME='DPO-01' # Short name for cxtion RDNs
  31. /COMPUTER='NOS\ENT-DPO-01$' ## note use of single quote because of $
  32. /site=site01 /sitename=bellevuewa /timezone="-8"
  33. /DNS_NAME="ENT-DPO-01.nos.boeing.com")
  34. HUB2: FRS_SERVER (/RP="i:\swd" /SP="$stage"
  35. /MNAME="{7DD1D84E-63B4-43B2-85B9-35E319C80887}"
  36. /SHNAME='DPO-02'
  37. /COMPUTER='NOS\ENT-DPO-02$'
  38. /site=site02 /sitename=kentwa /timezone="-8"
  39. /DNS_NAME="ent-dpo-02.nos.boeing.com")
  40. REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
  41. /MNAME="{BD6579E9-4A35-40CA-8A53-846B3BBC824D}"
  42. /SHNAME='DPO-03'
  43. /COMPUTER='NOS\ENT-DPO-03$'
  44. /site=site10 /sitename=mesaaz /timezone="-7"
  45. /DNS_NAME="ent-dpo-03.nos.boeing.com")
  46. REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
  47. /MNAME="{5F3266EC-F4F1-40EB-AB2A-B7F07F72C963}"
  48. /SHNAME='DPO-04'
  49. /COMPUTER='NOS\ENT-DPO-04$'
  50. /site=site11 /sitename=longbeachca /timezone="-8"
  51. /DNS_NAME="ENT-DPO-04.nos.boeing.com")
  52. REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
  53. /MNAME="{C1349084-39E6-489F-9ED8-47933B81720E}"
  54. /SHNAME='DPO-05'
  55. /COMPUTER='NOS\ENT-DPO-05$'
  56. /site=site03 /sitename=sealbeachca /timezone="-8"
  57. /DNS_NAME="ent-dpo-05.nos.boeing.com")
  58. REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
  59. /MNAME="{2FBB8F31-91A6-4952-83DE-E92146B4E2E6}"
  60. /SHNAME='DPO-06'
  61. /COMPUTER='NOS\ENT-DPO-06$'
  62. /site=site04 /sitename=huntca /timezone="-8"
  63. /DNS_NAME="ent-dpo-06.nos.boeing.com")
  64. PLAN: FRS_SERVER (/RP="i:\swd" /SP="$stage"
  65. /MNAME="{2FBB8F31-91A6-4952-83DE-E92146B4E2E6}"
  66. /SHNAME='DPO-07'
  67. /COMPUTER='NOS\ENT-DPO-07$'
  68. /site=site04 /sitename=anaheimca /timezone="-8"
  69. /DNS_NAME="ent-dpo-07.nos.boeing.com")
  70. PLAN: FRS_SERVER (/RP="i:\swd" /SP="$stage"
  71. /MNAME="{2FBB8F31-91A6-4952-83DE-E92146B4E2E6}"
  72. /SHNAME='DPO-08'
  73. /COMPUTER='NOS\ENT-DPO-08$'
  74. /site=site04 /sitename=canogaca /timezone="-8"
  75. /DNS_NAME="ent-dpo-08.nos.boeing.com")
  76. REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
  77. /MNAME="{A0EDA05A-8043-442D-A5A7-E2DA2408F8BF}"
  78. /SHNAME='DPO-09'
  79. /COMPUTER='NOS\ENT-DPO-09$'
  80. /site=site09 /sitename=wichitaks /timezone="-6"
  81. /DNS_NAME="ent-dpo-09.nos.boeing.com")
  82. REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
  83. /MNAME="{C249A70F-5245-4920-AB03-FD8BE1B9D3F2}"
  84. /SHNAME='DPO-10'
  85. /COMPUTER='NOS\ENT-DPO-10$'
  86. /site=site08 /sitename=stlouismo /timezone="-6"
  87. /DNS_NAME="ent-dpo-10.nos.boeing.com")
  88. REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
  89. /MNAME="{A85A1163-9829-4AC3-B4DF-C3EF10BEC63F}"
  90. /SHNAME='DPO-11'
  91. /COMPUTER='NOS\ENT-DPO-11$'
  92. /site=site07 /sitename=philly /timezone="-5"
  93. /DNS_NAME="ent-dpo-11.nos.boeing.com")
  94. REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
  95. /MNAME="{21181900-CDB5-49CE-9ACE-42ED136FC3E9}"
  96. /SHNAME='DPO-12'
  97. /COMPUTER='NOS\ENT-DPO-12$'
  98. /site=site06 /sitename=huntsvilleal /timezone="-6"
  99. /DNS_NAME="ent-dpo-12.nos.boeing.com" )
  100. REMOTE: FRS_SERVER (/RP="i:\swd" /SP="$stage"
  101. /MNAME="{D7B53F57-B039-4C68-BA46-A9B9BC95E49B}"
  102. /SHNAME='DPO-13'
  103. /COMPUTER='NOS\ENT-DPO-13$'
  104. /site=site05 /sitename=irvingtx /timezone="-6"
  105. /DNS_NAME="ent-dpo-13.nos.boeing.com")
  106. HUB1: FRS_SERVER (/RP="i:\swd" /SP="$stage"
  107. /MNAME="{D84D2F8D-9D0B-4F6C-B59A-685EC6675145}"
  108. /SHNAME='DPO-14'
  109. /COMPUTER='NOS\ENT-DPO-14$'
  110. /site=site01 /sitename=bellevuewa /timezone="-8"
  111. /DNS_NAME="ENT-DPO-14.nos.boeing.com")
  112. # The FRS_SCHEDULE command does not actually create any FRS objects in the DS,
  113. # rather it defines the parameters to use when creating a schedule.
  114. #
  115. # Restriction: Any time with a ":" must be enclosed in quotes. See /REPL_DURATION,
  116. # /TIME_ZONE and /DISABLE below.
  117. # /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"
  118. #
  119. PRIMARY_SCH: FRS_SCHEDULE (/REPL_INTERVAL=4 /REPL_DURATION=2
  120. /TIME_ZONE="-8" /REPL_OFFSET=0 /STAGGER=4
  121. /METHOD=1 /NAME='Primary Sched'
  122. )
  123. BACKUP_SCH: FRS_SCHEDULE (/REPL_INTERVAL=4 /REPL_DURATION=2
  124. /TIME_ZONE="-8" /REPL_OFFSET=2 /STAGGER=4
  125. /METHOD=1 /NAME='Backup Sched'
  126. )
  127. #
  128. # The following function creates the connection objects for a hub spoke topology.
  129. #
  130. FRS_SUB CREATE_HUB_SPOKE_CONN(/HUBSET=SET_REF_SET # Hubs
  131. /BCHSET=SET_REF_SET # Branches
  132. /SC1=SCHEDULE )
  133. $Hx = 0;
  134. $NHub = FRS_COUNT_SET(/SET=%HUBSET%);
  135. print " NHUB = $NHub\n\n";
  136. #
  137. # RESTRICTION: don't PUT FRS FUNCTION REFS INSIDE A QUOTED STRING.
  138. #
  139. print " NBCH FRS _COUNT_SET( /SET= % BCHSET % ) ", FRS_COUNT_SET(/SET= %BCHSET% ), "\n" ;
  140. #
  141. # Create the topology
  142. #
  143. foreach $bch (FRS_ARRAY(/SET=%BCHSET%)) {
  144. print "working on branch: $bch->{SHNAME}\n";
  145. $hubsrv = %HUBSET%[$Hx];
  146. #
  147. # RESTRICTION: need braces around ONAME and MNAME.
  148. #
  149. FRS_CONNECTION (/TO=$bch /FROM=%HUBSET%[$Hx] /SCHED=%SC1%
  150. /ONAME="FROM-".$hubsrv->{SHNAME}."-TO-".$bch->{SHNAME} )
  151. FRS_CONNECTION (/TO=%HUBSET%[$Hx] /FROM=$bch /SCHED=%SC1%
  152. /ONAME="FROM-".$bch->{SHNAME}."-TO-".$hubsrv->{SHNAME} )
  153. $Hx=($Hx+1) % $NHub;
  154. if ($Hx == 0) {
  155. FRS_STAGGER (/SCHED=%SC1%)
  156. }
  157. }
  158. FRS_END_SUB
  159. #
  160. # The following function creates the connection objects for a
  161. # hub spoke topology with redundant connection objects.
  162. #
  163. FRS_SUB CREATE_REDUNDANT_HUB_SPOKE_CONN(/HUBSET1=SET_REF_SET # primary Hubs
  164. /HUBSET2=SET_REF_SET # backup Hubs
  165. /BCHSET=SET_REF_SET # Branches
  166. /SC1=SCHEDULE # primary schedule
  167. /SC2=SCHEDULE ) # backup schedule
  168. $Hx = 0;
  169. $NHub = FRS_COUNT_SET(/SET=%HUBSET1%);
  170. print " NHUB = $NHub\n\n";
  171. $Hx2 = 0;
  172. $NHub2 = FRS_COUNT_SET(/SET=%HUBSET2%);
  173. print " NHUB = $NHub2\n\n";
  174. #
  175. # RESTRICTION: don't PUT FRS FUNCTION REFS INSIDE A QUOTED STRING.
  176. #
  177. print " NBCH FRS _COUNT_SET( /SET= % BCHSET % ) ", FRS_COUNT_SET(/SET= %BCHSET% ), "\n" ;
  178. #
  179. # Create the topology
  180. #
  181. foreach $bch (FRS_ARRAY(/SET=%BCHSET%)) {
  182. print "working on branch: $bch->{SHNAME}\n";
  183. $hubsrv = %HUBSET1%[$Hx];
  184. $hubsrv2 = %HUBSET2%[$Hx2];
  185. # Set the connection to the primary hub
  186. # RESTRICTION: need braces around ONAME and MNAME.
  187. #
  188. FRS_CONNECTION (/TO=$bch /FROM=%HUBSET1%[$Hx] /SCHED=%SC1%
  189. /ONAME="FROM-".$hubsrv->{SHNAME}."-TO-".$bch->{SHNAME} )
  190. FRS_CONNECTION (/TO=%HUBSET1%[$Hx] /FROM=$bch /SCHED=%SC1%
  191. /ONAME="FROM-".$bch->{SHNAME}."-TO-".$hubsrv->{SHNAME} )
  192. $Hx=($Hx+1) % $NHub;
  193. if ($Hx == 0) {
  194. FRS_STAGGER (/SCHED=%SC1%)
  195. }
  196. #
  197. # Set the connection to the backup hub
  198. #
  199. FRS_CONNECTION (/TO=$bch /FROM=%HUBSET2%[$Hx2] /SCHED=%SC2%
  200. /ONAME="FROM-".$hubsrv2->{SHNAME}."-TO-".$bch->{SHNAME} )
  201. FRS_CONNECTION (/TO=%HUBSET2%[$Hx2] /FROM=$bch /SCHED=%SC2%
  202. /ONAME="FROM-".$bch->{SHNAME}."-TO-".$hubsrv2->{SHNAME} )
  203. $Hx2=($Hx2+1) % $NHub2;
  204. if ($Hx2 == 0) {
  205. FRS_STAGGER (/SCHED=%SC2%)
  206. }
  207. }
  208. FRS_END_SUB
  209. #
  210. # The following function creates the connection objects for a ring topology.
  211. #
  212. FRS_SUB CREATE_RING_CONN(/HUBSET=SET_REF_SET )
  213. FRS_SHOW(/SET=%HUBSET%)
  214. $Ringx = 0;
  215. $RingCount = FRS_COUNT_SET(/SET=%HUBSET%);
  216. print " RingCount = $RingCount\n\n";
  217. #
  218. # Create the topology
  219. #
  220. for ($Ringx=0; $Ringx < $RingCount; $Ringx++) {
  221. $RM1 = %HUBSET%[$Ringx];
  222. $RM2 = %HUBSET%[($Ringx+1) % $RingCount];
  223. #
  224. # RESTRICTION: need braces around ONAME and MNAME.
  225. #
  226. FRS_CONNECTION (/TO=$RM1 /FROM=$RM2 /SCHED=ON
  227. /ONAME="FROM-".$RM2->{SHNAME}."-TO-".$RM1->{SHNAME} )
  228. FRS_CONNECTION (/TO=$RM2 /FROM=$RM1 /SCHED=ON
  229. /ONAME="FROM-".$RM1->{SHNAME}."-TO-".$RM2->{SHNAME} )
  230. }
  231. FRS_END_SUB
  232. #
  233. # The following function builds the member objects for a hub spoke topology
  234. # and creates the connection objects.
  235. #
  236. FRS_SUB CREATE_HUB_SPOKE(/HUBSET1=SET_REF_SET # primary Hubs
  237. /HUBSET2=SET_REF_SET # backup Hubs
  238. /BCHSET=SET_REF_SET # Branches
  239. /SC1=SCHEDULE # primary schedule
  240. /SC2=SCHEDULE # backup schedule
  241. /REPSETDN=SET_ELEMENT)
  242. FRSSUP::PrintHash(\%__args);
  243. FRS_SHOW(/SET=%HUBSET1%)
  244. FRS_SHOW(/SET=%HUBSET2%)
  245. #
  246. # Create the hub member objects
  247. #
  248. # Restriction: All subroutine argument refs are surrounded by "%".
  249. # References to parameters in other objects use the
  250. # notation "->{...}". e.g. COMPUTER, MNAME, id
  251. #
  252. foreach $hub (FRS_ARRAY(/SET=%HUBSET1%)) {
  253. MOBJALLHUB: MOBJHUB1: FRS_MEMBER (/UNDER=%REPSETDN%
  254. /SERVER=$hub
  255. /COMPUTER=$hub->{COMPUTER}
  256. /ONAME=$hub->{MNAME} )
  257. }
  258. foreach $hub (FRS_ARRAY(/SET=%HUBSET2%)) {
  259. MOBJALLHUB: MOBJHUB2: FRS_MEMBER (/UNDER=%REPSETDN%
  260. /SERVER=$hub
  261. /COMPUTER=$hub->{COMPUTER}
  262. /ONAME=$hub->{MNAME} )
  263. }
  264. #
  265. # create the branch member objects.
  266. #
  267. foreach $bch (FRS_SET(/SET=%BCHSET%)) {
  268. MOBJBCH: FRS_MEMBER (/UNDER=%REPSETDN%
  269. /SERVER=$bch
  270. /COMPUTER=$bch->{COMPUTER}
  271. /ONAME=$bch->{MNAME} )
  272. }
  273. #
  274. # Create a ring topology among all the hub servers.
  275. #
  276. CREATE_RING_CONN(/HUBSET=<MOBJALLHUB> )
  277. #
  278. # Create a redundant hub-spoke topology between the primary and backup
  279. # hub servers and the branch servers.
  280. #
  281. CREATE_REDUNDANT_HUB_SPOKE_CONN(/HUBSET1=<MOBJHUB1> # primary Hubs
  282. /HUBSET2=<MOBJHUB2> # backup Hubs
  283. /BCHSET=<MOBJBCH> # Branches
  284. /SC1=%SC1% # primary schedule
  285. /SC2=%SC2% ) # backup schedule
  286. FRS_END_SUB
  287. #
  288. # Create the replica set under the FRS Settings object.
  289. # The FRS Settings object must already exist in the DS.
  290. #
  291. SETTINGS: FRS_SETTINGS (/DN="cn=dfs volumes,cn=file replication service,cn=system,dc=nos,dc=boeing,dc=com"
  292. /ONAME="cn=swdepot")
  293. SET: FRS_REPLICASET (/UNDER=<SETTINGS> /TYPE=DFS /ONAME="swdepot")
  294. CREATE_HUB_SPOKE(/HUBSET1=<HUB1> # primary Hubs
  295. /HUBSET2=<HUB2> # backup Hubs
  296. /BCHSET=<REMOTE> # Branches
  297. /SC1=<PRIMARY_SCH> # primary schedule
  298. /SC2=<BACKUP_SCH> # backup schedule
  299. /REPSETDN=<SET>)