3316. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 6/9/2017 3:50:04 PM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

3316.1 Files compared

# Location File Last Modified
1 Fri Jun 9 19:50:04 2017 UTC
2 eHealth_Exch (eHealth Exchange Enhancements) Build 3 docs & code_May_2017.zip\VAP_CIF_CODE0502.zip\VAP_CIF_CODE0502\VAP_CIF_CODE0502\nvap-env\src\main\python configdomain.py Tue May 30 18:19:18 2017 UTC

3316.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 0 0
Changed 0 0
Inserted 1 278
Removed 0 0

3316.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

3316.4 Active regular expressions

No regular expressions were active.

3316.5 Comparison detail

        1   import sys
        2   import os
        3   from util  import par ams
        4   from util  import dom ainconfig
        5   from util. propertyhe lp import  PropertyHe lper
        6  
        7   try:
        8       print  "[WLST] -- ---------- ---------- ---------- ---------- ---------- ---------- ---------- "
        9       print  "[WLST] "
        10       print  "[WLST] Lo ading Scri pt Paramet ers"
        11       print  "[WLST] "
        12       
        13       params  = params. getScriptP arameters( sys.argv)
        14       
        15       pc = P ropertyHel per(params ['props.fi le'])
        16       overwr iteDomain  = params[' overwrite' ]
        17       domain Name = pc. getDomainN ame()
        18       domain Directory  = pc.getDo mainsDirec tory(pc.ge tAdminServ erAttribut es()['mach ine']) + " /" + domai nName
        19       domain Exists = N one
        20       
        21       print  "[WLST] -- ---------- ---------- ---------- ---------- ---------- ---------- ---------- "
        22       print  "[WLST] "
        23       print  "[WLST]  S cript Para meters Loa ded"
        24       print  "[WLST]      Domain N ame: " + d omainName
        25       print  "[WLST]      Domain D irectory:"  + domainD irectory
        26       print  "[WLST]      Applicat ion Name:  " + pc.get AppName()
        27       print  "[WLST] "
        28       
        29       
        30       print  "Parameter s set succ essfully."
        31       
        32       if (Fi le(domainD irectory). exists() = = 1) :
        33           do mainExists  = True
        34       else :   
        35           do mainExists  = False
        36  
        37       if(ove rwriteDoma in == "fal se" and do mainExists ) :
        38           ra ise Illega lArgumentE xception(" Domain dir ectory exi sts.")
        39       
        40       print  "Domain do esn't exis t."
        41       
        42       domain config.ini tConfigToS criptRun(d omainName,  domainDir ectory, pc .getAdminS erverAttri butes())
        43       
        44       domain config.sta rtTransact ion()
        45       
        46       ###### ########## ########## ########## ########## ########## ########## ########## ######
        47       # Clus ter and Ma chine Crea tion and C onfigurati on
        48       # Star t - creati on of clus ter and ma chines
        49       ###### ########## ########## ########## ########## ########## ########## ########## ######
        50       
        51       # Clus ter Config uration
        52       cluste rs = pc.ge tClusters( )
        53       print  "Printing  clusters m ap:"
        54       print  clusters
        55       if(clu sters != N one) :
        56           fo r name, c  in cluster s.iteritem s() :
        57                domainco nfig.creat e_Cluster( "/", c['na me'])
        58                domainco nfig.setCl usterAttri butes(c['n ame'])
        59           
        60       # Mach ine Config uration
        61       machin es = pc.ge tMachines( )
        62       if(mac hines != N one) :
        63           fo r name, m  in machine s.iteritem s() : 
        64                domainco nfig.creat e_Machine( "/", m['na me'])
        65                domainco nfig.setNo deManagerA ttributes( m['name'],  m['listen Address'],  m['nmType '])
        66       
        67       # JMS  Resource C onfigurati on  
        68       jmsRes ources = p c.getJmsRe sources()
        69       if(jms Resources  != None) :
        70           fo r name, jr  in jmsRes ources.ite ritems() :
        71                if(jr.ge t('moduleN ame') != N one and jr .get('modu leName') ! = '') :  
        72                    doma inconfig.c reate_JMSS ystemResou rce("/", j r['moduleN ame'])
        73                    doma inconfig.c reate_SubD eployment( "/JMSSyste mResources /"+jr['mod uleName'],  jr['subde ployment'] )
        74                    doma inconfig.s etJmsModul eAttribute s(jr['modu leName'],  jr['subdep loyment'],  jr['targe t'])
        75       
        76       ###### ########## ########## ########## ########## ########## ########## ########## ######
        77       #
        78       # End  - creation  of cluste r and mach ines
        79       #
        80       ###### ########## ########## ########## ########## ########## ########## ########## ######
        81       
        82       server s = pc.get ManagedSer vers()
        83       if(ser vers != No ne):
        84           fo r name, at tributes i n servers. iteritems( ) :
        85                domainco nfig.creat e_Server(" /", attrib utes['name '], attrib utes['list enPort'],  attributes ['listenAd dress'])
        86                domainco nfig.setMa nagedServe rAttribute s(attribut es['name'] , attribut es.get('cl uster'), a ttributes. get('machi ne'))
        87                
        88                if(attri butes['isM igratable' ] == 'true ') :
        89                    doma inconfig.c reate_Migr atableTarg et("/", at tributes[' name'] + "  (migratab le)")
        90                    doma inconfig.s etMigratab leTagetAtt ributesFor (attribute s['name'],  attribute s.get('clu ster'))
        91                    doma inconfig.s etJTAMigra tableTarge tAttribute s(attribut es['name'] , attribut es.get('cl uster'))
        92                
        93                if(len(a ttributes[ 'sslPort'] ) > 0) :
        94                    doma inconfig.s etServerSS LAttribute s(attribut es['name'] , attribut es['sslPor t'])
        95                
        96                jvmargs  = attribut es.get('jv margs')
        97                if(jvmar gs != None  and len(j vmargs) >  0) :    
        98                    doma inconfig.s etServerSt artAttribu tes(attrib utes['name '], attrib utes['jvma rgs'])
        99                    
        100                if(attri butes['ini tJms'] ==  'true'):
        101                    mach ineDomainD irectory =  pc.getDom ainsDirect oryByMachi neName(att ributes['m achine'])  + "/" + do mainName
        102                    doma inconfig.c reate_File Store("/",  attribute s['fsName' ])
        103                    doma inconfig.c reate_JMSS erver("/",  attribute s['jmsServ erName'])
        104                    doma inconfig.s etJMSFileS toreAttrib utes(machi neDomainDi rectory, a ttributes[ 'name'], a ttributes[ 'fsName']  )
        105                    doma inconfig.s etJmsServe rAttribute s(attribut es['jmsSer verName'],  attribute s['name'],  attribute s['fsName' ])
        106                    
        107       
        108       ###### ########## ########## ########## ########## ########## ########## ########## ######
        109       #
        110       # End  - build th e servers  from the k nown prope rties
        111       #
        112       ###### ########## ########## ########## ########## ########## ########## ########## ######
        113       
        114       
        115       domain config.set DefaultIde ntityAsser terAttribu tes(domain Name)
        116       domain config.set DomainAttr ibutes(dom ainName, p c.getAdmin ServerAttr ibutes()[' name'])
        117       domain config.set EmbeddedLD APAttribut es(domainN ame)
        118       #setSe curityConf igurationA ttributes( domainName )
        119       
        120       # Secu rity Realm  Creation  and Config uration
        121       domain config.cre ate_Realm( "/Security Configurat ion/" + do mainName,  "myrealm")
        122       domain config.cre ate_Author izer("/Sec urityConfi guration/"  +domainNa me + "/Rea lms/myreal m", "XACML Authorizer ")
        123       domain config.cre ate_Adjudi cator("/Se curityConf iguration/ "+ domainN ame +"/Rea lms/myreal m", "Defau ltAdjudica tor")
        124       domain config.cre ate_Authen ticationPr ovider("/S ecurityCon figuration /" + domai nName +"/R ealms/myre alm", "Def aultAuthen ticator")
        125       domain config.cre ate_Authen ticationPr ovider("/S ecurityCon figuration /"+ domain Name +"/Re alms/myrea lm", "Defa ultIdentit yAsserter" )
        126       domain config.cre ate_CertPa thProvider ("/Securit yConfigura tion/"+ do mainName + "/Realms/m yrealm", " WebLogicCe rtPathProv ider")
        127       domain config.cre ate_Creden tialMapper ("/Securit yConfigura tion/"+ do mainName + "/Realms/m yrealm", " DefaultCre dentialMap per")
        128       domain config.cre ate_RoleMa pper("/Sec urityConfi guration/" + domainNa me +"/Real ms/myrealm ", "XACMLR oleMapper" )
        129       
        130       ###### ########## ########## ########## ########## ########## ########## ########## ######
        131       #
        132       # Queu e Connecti on Factory  & Queues  Creation a nd Configu ration
        133       # Star t - build  the connec tion facto ries and q ueues from  the known  propertie s
        134       #
        135       ###### ########## ########## ########## ########## ########## ########## ########## ######
        136       
        137       factor ies = pc.g etConnecti onFactorie s()
        138       if(fac tories !=  None) :
        139           fo r name, cf  in factor ies.iterit ems() :
        140                domainco nfig.creat e_Connecti onFactory( cf['module '], cf['na me'])
        141                domainco nfig.setQu eueConnect ionFactory Attributes (cf['modul e'], cf['n ame'], cf[ 'jndiName' ], xaConne ctionFacto ryEnabled  = cf['xaEn abled'])
        142       
        143                
        144       queues  = pc.getQ ueues()
        145       if(que ues != Non e):
        146           fo r name, q  in queues. iteritems( ) :
        147                domainco nfig.creat e_UniformD istributed Queue(q['m odule'], q ['name'])
        148                domainco nfig.setQu eueAttribu tes(q['mod ule'], q[' name'], q[ 'subdeploy ment'], q[ 'jndiName' ], errorDe stination  = q['error Destinatio n'], expir yPolicy =  q['expiryP olicy'])
        149                
        150                
        151       ###### ########## ########## ########## ########## ########## ########## ########## ######
        152       #
        153       # Queu e Connecti on Factory  & Queues  Creation a nd Configu ration
        154       # End  - build th e connecti on factori es and que ues from t he known p roperties
        155       #
        156       ###### ########## ########## ########## ########## ########## ########## ########## ######
        157       
        158       ###### ########## ########## ########## ########## ########## ########## ########## ######
        159       #
        160       # JDBC  Datasourc e Creation  and Confi guration
        161       # Star t - build  the dataso urces for  the domain  
        162       #
        163       ###### ########## ########## ########## ########## ########## ########## ########## ######
        164       
        165       dataso urces = pc .getDataso urces()
        166       if(dat asources ! = None) :
        167           fo r name, ds  in dataso urces.iter items() :
        168                domainco nfig.creat e_JDBCSyst emResource ("/", ds[' name'])
        169                
        170                userProp Path = "/J DBCSystemR esources/" +ds['name' ]+"/JDBCRe source/"+d s['name']+ "/JDBCDriv erParams/" +ds['name' ]+"/Proper ties/"+ds[ 'name']
        171                domainco nfig.creat e_Property (userPropP ath, "user ")
        172                domainco nfig.setDa taSourceAt tributes(d s['name'],  ds['targe t'], ds['u sername'],  ds['jndiN ame'], ds[ 'txnProtoc ol'])
        173                domainco nfig.setJD BCConnecti onPoolPara msAttribut es(ds['nam e'], ds['i nitialCapa city'], ds ['maxCapac ity'], ds[ 'capacityI ncrement'] , ds['test TableName' ], ds['sta tementCach eSize'], d s['stateme ntCacheTyp e'])
        174                domainco nfig.setJD BCDriverPa ramsAttrib ute(ds['na me'], ds[' password'] , ds['driv er'], ds[' url'])
        175       
        176       ###### ########## ########## ########## ########## ########## ########## ########## ######
        177       #
        178       # JDBC  Datasourc e Creation  and Confi guration
        179       # End  - build th e datasour ces for th e domain 
        180       #
        181       ###### ########## ########## ########## ########## ########## ########## ########## ######  
        182       
        183       ###### ########## ########## ########## ########## ########## ########## ########## ######
        184       #
        185       # Depl oy the JST L library  that the N VAP web ap plication  needs to w ork.
        186       #
        187       ###### ########## ########## ########## ########## ########## ########## ########## ######
        188   #    appIn fo = pc.ge tApplicati onInfo('js tl')
        189   #    try: 
        190   #        p rint 1
        191   #        p rint appIn fo
        192   #        d eployAppli cation(app Info['name '] + '#1.2 @1.2.0.1',  appInfo[' path'],app Info['targ ets'], app Info.get(' securityMo del', 'DDO nly'), app Info.get(' libraryMod ule', 'fal se'), appI nfo.get('b lock', 'tr ue'))
        193   #        p rint 2
        194   #    excep t: 
        195   #        d umpVariabl es()
        196   #        d umpStack()
        197       
        198       ###### ########## ########## ########## ########## ########## ########## ########## ######
        199       #
        200       # End  deploy JST L library.
        201       #
        202       ###### ########## ########## ########## ########## ########## ########## ########## ######
        203       
        204       domain config.end Transactio n()
        205       
        206       ###### ########## ########## ########## ########## ########## ########## ########## ######
        207       #
        208       # Depl oy the app lication t o the doma in 
        209       #
        210       ###### ########## ########## ########## ########## ########## ########## ########## ######
        211       
        212   #    deplo yments = p c.getDeplo yments()
        213   #    if(de ployments  != None) :
        214   #        f or name, d  in deploy ments.iter items() :
        215   #             deployA pp(d['name '], d['pat h'], d['ta rgets'], d ['security Model'], d ['libraryM odule'], d ['block'])
        216                
        217       ###### ########## ########## ########## ########## ########## ########## ########## ######
        218       #
        219       # Enro ll each ma chine in t he domain.
        220       #
        221       ###### ########## ########## ########## ########## ########## ########## ########## ######
        222       adminA ttribs = p c.getAdmin ServerAttr ibutes()
        223       machin es = pc.ge tMachines( )
        224       if(mac hines != N one) :
        225           
        226           re moteDirect ory = '/tm p/' + doma inName + ' -deploy'
        227           fo r name, m  in machine s.iteritem s() :
        228                if( m['l istenAddre ss'] != 'l ocalhost')  :
        229                    try  :
        230                         # ssh IP        'cd / tmp; mkdir  vap-deplo y;
        231                         command =  "ssh " + m ['listenAd dress'] +  " 'mkdir "  + remoteD irectory +  "'" 
        232                         print "Exe cuting Rem ote Comman d: " + com mand
        233                         os.system( command)
        234                        
        235                         # scp nmen roll.py IP       :/tm p/vap-depl oy
        236                         command =  "scp nmenr oll.py " +  m['listen Address']  +':' + rem oteDirecto ry
        237                         print "Cop ying nmenr oll.py scr ipt to rem ote system . " + comm and
        238                         os.system( command)
        239                        
        240                         # ssh IP        '. .b ash_profil e;cd /tmp/ vap-deploy ;$MW_HOME/ wlserver/c ommon/bin/ wlst.sh nm enroll.py  -domainNam e=vap -dom ainUser=we blogic -do mainPasswo rd=weblogi c1 -adminU rl=t3://IP              -domainD irectory=$ MW_HOME/us er_project s/domains/ vap -domai nManagerHo me=$MW_HOM E/wlserver /common/no demanager'
        241                         command =  "ssh " + m ['listenAd dress'] +  " '. .bash _profile;c d " + remo teDirector y + ";$WL_ HOME/commo n/bin/wlst .sh nmenro ll.py " 
        242                         command =  command +  "-domainNa me=" + dom ainName +  " "
        243                         command =  command +  "-domainUs er=" + adm inAttribs[ 'username' ] + " "
        244                         command =  command +  "-domainPa ssword=" +  adminAttr ibs['passw ord'] + "  "
        245                         command =  command +  "-adminUrl =" + admin Attribs['u rl'] + " "  
        246                         command =  command +  "-domainDi rectory=$D OMAINS_HOM E/" + doma inName + "  " 
        247                         command =  command +  "-domainMa nagerHome= $WL_HOME/c ommon/node manager'" 
        248                         print "Exe cuting Rem ote Comman d: " + com mand
        249                         os.system( command)
        250                        
        251                         # ssh IP        'mkdi r $MW_HOME /user_proj ects/domai ns/vap/fil estores'
        252                         command =  "ssh " + m ['listenAd dress'] +  " '. .bash _profile;m kdir $DOMA INS_HOME/"  + domainN ame + "/fi lestores'"
        253                         print "Exe cuting Rem ote Comman d: " + com mand
        254                         os.system( command)
        255                        
        256                         # ssh IP        'rm - rf /tmp/va p-deploy/; ls -la /tm p/vap-depl oy'
        257                         command =  "ssh " + m ['listenAd dress'] +  " 'rm -rf  " + remote Directory  + "'"
        258                         print "Exe cuting Rem ote Comman d to Remov e Director y"
        259                         os.system( command)
        260                        
        261                    exce pt: 
        262                         print "An  unexpected  error occ ured while  enrolling  the machi n in the d omain."
        263                         print ""
        264                         print sys. exc_info() ;
        265                         print "Err or value:  ", sys.exc _info()[1]
        266                         pass
        267                
        268   except :
        269       print  "Unexpecte d Error Oc curred: ",   sys.exc_ info()[1]
        270       print  sys.exc_in fo()
        271       pass
        272    
        273   domainconf ig.endOfCo nfigToScri ptRun()
        274   print "[WL ST] ------ ---------- ---------- ---------- ---------- ---------- ---------- ------"
        275   print "[WL ST] "
        276   print "[WL ST]                   DOMAIN CRE ATED SUCCE SSFULLY                                "
        277   print "[WL ST] "
        278   print "[WL ST] ------ ---------- ---------- ---------- ---------- ---------- ---------- ------"