Monday 22 August 2022

Automating Native Installation of C2M on Weblogic using WLST

This blog is targeting at automating the steps for native Weblogic installation of any OUAF product (CC&B, C2M, MDM etc.). These steps helps in saving time and reduces errors. WLST (Weblogic scripting) is used for automating the installation steps.


First step is to create all the necessary property and script files which we would be running. I have listed down each files and the file content for your reference. Just create all these files and keep in one directory for easy access. Location can be any directory.


domain.properties

MW_HOME=C:/c2m/weblogic/12.2.1.4.0/Oracle/Middleware/Oracle_Home

TEMPLATE=C:/c2m/weblogic/12.2.1.4.0/Oracle/Middleware/Oracle_Home/wlserver/common/templates/wls/wls.jar 

DOMAIN_DIR=C:/c2m/weblogic/12.2.1.4.0/Oracle/Middleware/Oracle_Home/user_projects/domains/

ADMIN_LISTEN_ADDRESS=localhost

ADMIN_PORT=7001

ADMIN_USER=weblogic

ADMIN_PWD=Welcome1

SYSTEM_USER_PWD=ouafadmin SYSUSER_USER_PWD=sysuser00

NODEMANAGER_LISTEN_ADDRESS=localhost

NODEMANAGER_PORT=5556

DOMAIN_NAME=c2m2900g_domain

OUAF_SERVER_NAME=c2m2900server

OUAF_MAC_NAME=c2m2900mac

OUAF_PORT=6500

OUAF_SSL_PORT=6501

SPLEBASE=C:/c2m/ouaf/C2M2900

OUAF_CLASSES=C:/c2m/ouaf/C2M2900/splapp/standalone/lib/antlr-2.7.7.jar;C:/c2m/weblogic/12.2.1.4.0/Oracle/Middleware/Oracle_Home/wlserver/server/lib/weblogic_sp.jar;C:/c2m/weblogic/12.2.1.4.0/Oracle/Middleware/Oracle_Home/wlserver/server/lib/weblogic.jar


createdomain.py

def create_domain():

print "Reading base domain template"

readTemplate(TEMPLATE)

cd('/')

 

print "AdminServer settings"

cmo.setName(DOMAIN_NAME)

cd('Servers/AdminServer')

cmo.setListenAddress(ADMIN_LISTEN_ADDRESS)

cmo.setListenPort(int(ADMIN_PORT))

cd( '/' )

cd( 'Security/'+DOMAIN_NAME+'/User/' +ADMIN_USER)

cmo.setPassword(ADMIN_PWD)

cd('/')

 

print "Domain setup.."

setOption("ServerStartMode", "dev")

setOption("OverwriteDomain", "true")

setOption('JavaHome','C:/c2m/java/jdk')

writeDomain( DOMAIN_DIR+'/'+DOMAIN_NAME )

print "=============================================="

print "Domain created successfully..."

print "=============================================="

 

closeTemplate()

 

 

def apply_jrf2domain():

# Apply the JRF Template.

print "reading domain:"+DOMAIN_NAME

readDomain(DOMAIN_DIR+'/'+DOMAIN_NAME )

addTemplate(MW_HOME + '/oracle_common/common/templates/wls/oracle.jrf_restricted_template.jar')

print "Adding Template :oracle.jrf_restricted_template.jar"

 


updateDomain()

print "Updated the domain with Restricted JRF"

closeDomain()

print "Close the domain"

exit()

 

def main():

print "=============================================="

print "Welcome to Restricted JRF domain configuration"

print "=============================================="

 

create_domain()

print "Domain created successfully..."

apply_jrf2domain()

 

main()


createouafserver.py

connect(ADMIN_USER, ADMIN_PWD ,'t3://'+ ADMIN_LISTEN_ADDRESS +':' + ADMIN_PORT)


edit()

startEdit()


cd('/JTA/'+DOMAIN_NAME)

cmo.setTimeoutSeconds(86400)


activate()


startEdit()


cd('/')


cmo.setInternalAppsDeployOnDemandEnabled(false)


activate()


startEdit()

cmo.createMachine(OUAF_MAC_NAME)


cd('/Machines/' + OUAF_MAC_NAME + '/NodeManager/' + OUAF_MAC_NAME)

cmo.setNMType('SSL')

cmo.setListenAddress(NODEMANAGER_LISTEN_ADDRESS)

cmo.setListenPort(int(NODEMANAGER_PORT))

cmo.setDebugEnabled(false)


activate()


startEdit()


cd('/')

cmo.createServer(OUAF_SERVER_NAME)


cd('/Servers/' + OUAF_SERVER_NAME)

cmo.setListenAddress('')

cmo.setListenPort(int(OUAF_PORT))


startEdit()


cd('/Servers/' + OUAF_SERVER_NAME + '/ServerDiagnosticConfig/' + OUAF_SERVER_NAME)

cmo.setDiagnosticContextEnabled(true)


cd('/Servers/' + OUAF_SERVER_NAME + '/WebServer/' + OUAF_SERVER_NAME + '/WebServerLog/' + OUAF_SERVER_NAME)

cmo.setLogFileFormat('extended')

cmo.setELFFields('date time cs-method ctx-ecid ctx-rid cs-uri sc-status bytes')


cd('/AppDeployments/DMS Application#12.2.1.1.0')

cmo.addTarget(getMBean('/Servers/' + OUAF_SERVER_NAME))


cd('/AppDeployments/coherence-transaction-rar')

cmo.addTarget(getMBean('/Servers/' + OUAF_SERVER_NAME))


cd('/ShutdownClasses/DMSShutdown')

cmo.addTarget(getMBean('/Servers/' + OUAF_SERVER_NAME))


cd('/StartupClasses/JRF Startup Class')

cmo.addTarget(getMBean('/Servers/' + OUAF_SERVER_NAME))


cd('/StartupClasses/ODL-Startup')

cmo.addTarget(getMBean('/Servers/' + OUAF_SERVER_NAME))


cd('/StartupClasses/DMS-Startup')

cmo.addTarget(getMBean('/Servers/' + OUAF_SERVER_NAME))


cd('/StartupClasses/AWT Application Context Startup Class')

cmo.addTarget(getMBean('/Servers/' + OUAF_SERVER_NAME))


cd('/StartupClasses/WSM Startup Class')

cmo.addTarget(getMBean('/Servers/' + OUAF_SERVER_NAME))


cd('/WLDFSystemResources/Module-FMWDFW')

cmo.addTarget(getMBean('/Servers/' + OUAF_SERVER_NAME))


cd('/')


libr = cmo.getLibraries()


for x in libr:

x.addTarget(getMBean('/Servers/' + OUAF_SERVER_NAME))



activate()


startEdit()


cd('/Servers/' + OUAF_SERVER_NAME)

cmo.setListenPortEnabled(true)

cmo.setClientCertProxyEnabled(false)

cmo.setJavaCompiler('javac')

cmo.setMachine(getMBean('/Machines/' + OUAF_MAC_NAME))

cmo.setCluster(None)


cd('/Servers/' + OUAF_SERVER_NAME + '/SSL/' + OUAF_SERVER_NAME)

cmo.setEnabled(true)

cmo.setListenPort(int(OUAF_SSL_PORT))


cd('/Servers/' + OUAF_SERVER_NAME + '/ServerDiagnosticConfig/' + OUAF_SERVER_NAME)

cmo.setWLDFDiagnosticVolume('Low')


activate()


startEdit()


cd('/Servers/' + OUAF_SERVER_NAME + '/ServerStart/' + OUAF_SERVER_NAME)

cmo.setClassPath(OUAF_CLASSES)

cmo.setArguments('-Xms3072m -Xmx3072m -XX:PermSize=300m')


activate()


startEdit()


cd('/')

cmo.createXMLRegistry('myxmlregistry')


cd('/Servers/' + OUAF_SERVER_NAME)

cmo.setXMLRegistry(getMBean('/XMLRegistries/myxmlregistry'))


cd('/XMLRegistries/myxmlregistry')

cmo.setSAXParserFactory('com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl')

cmo.setXMLOutputFactory('weblogic.xml.jaxp.WebLogicXMLOutputFactory')

cmo.setSchemaFactory('weblogic.xml.jaxp.WebLogicSchemaFactory')

cmo.setXMLInputFactory('weblogic.xml.jaxp.WebLogicXMLInputFactory')

cmo.setXpathFactory('weblogic.xml.jaxp.WebLogicXPathFactory')

cmo.setDocumentBuilderFactory('com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl')

cmo.setXMLEventFactory('weblogic.xml.jaxp.WebLogicXMLEventFactory')

cmo.setTransformerFactory('com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl')


activate()


startEdit()


cd('/SecurityConfiguration/'+DOMAIN_NAME+'/Realms/myrealm')

cmo.setCombinedRoleMappingEnabled(false)


activate()


startEdit()


cd('/SecurityConfiguration/'+DOMAIN_NAME+'/Realms/myrealm/PasswordValidators/SystemPasswordValidator')

cmo.setMinNumericOrSpecialCharacters(0)


activate()


startEdit()


cd('/SecurityConfiguration/'+DOMAIN_NAME)

cmo.setWebAppFilesCaseInsensitive('false')

cmo.setPrincipalEqualsCompareDnAndGuid(false)

cmo.setUseKSSForDemo(false)

cmo.setCrossDomainSecurityEnabled(false)

cmo.setPrincipalEqualsCaseInsensitive(false)

cmo.setAnonymousAdminLookupEnabled(false)

cmo.setClearTextCredentialAccessEnabled(false)

cmo.setEnforceStrictURLPattern(true)

cmo.setIdentityDomainAwareProvidersRequired(false)

cmo.setCompatibilityConnectionFiltersEnabled(false)

cmo.setDowngradeUntrustedPrincipals(false)


cd('/SecurityConfiguration/'+DOMAIN_NAME+'/SecureMode/'+DOMAIN_NAME)

cmo.setWarnOnInsecureSSL(true)

cmo.setWarnOnInsecureApplications(true)

cmo.setWarnOnJavaSecurityManager(true)

cmo.setSecureModeEnabled(false)

cmo.setRestrictiveJMXPolicies(true)

cmo.setWarnOnAuditing(true)

cmo.setWarnOnInsecureFileSystem(true)


cd('/JTA/'+DOMAIN_NAME)

cmo.setSecurityInteropMode('default')


cd('/SecurityConfiguration/'+DOMAIN_NAME)

cmo.setDefaultRealm(getMBean('/SecurityConfiguration/'+DOMAIN_NAME+'/Realms/myrealm'))


activate()





createouafusers.py

from weblogic.management.security.authentication import UserEditorMBean, UserReaderMBean


print("Connecting to server …")

connect(ADMIN_USER, ADMIN_PWD ,'t3://'+ ADMIN_LISTEN_ADDRESS +':' + ADMIN_PORT)



atnr = cmo.getSecurityConfiguration().getDefaultRealm().lookupAuthenticationProvider("DefaultAuthenticator")


print("*********Group Creation***********")

group_name = 'cisusers'

try:

print("Creating Group cisusers")

atnr.createGroup('cisusers','OUAF Default Group')

print("Group created successfully!!")

except Exception:

print("Error creating new Group ")



print("*********User Creation***********") try: atnr.createUser('system',SYSTEM_USER_PWD,'System Administrator') print("User system created successfully!!") except Exception: print("Error: User system already exists!!") print("*********User Creation***********") try: atnr.createUser('SYSUSER',SYSUSER_USER_PWD,'Initial User') print("User SYSUSER created successfully!!") except Exception: print("Error: User SYSUSER already exists!!")



print("*********Adding User to New created Group***********")

try:

atnr.addMemberToGroup('Administrators','system')

atnr.addMemberToGroup('Deployers','system')

atnr.addMemberToGroup('Operators','system')

atnr.addMemberToGroup('cisusers','system')

atnr.addMemberToGroup('cisusers','SYSUSER')

print("User system added to  Group successfully!!")

except Exception:

print("Error: Failed to add User to Group!!")



deployouafapps.py

print("Connecting to server …")

connect(ADMIN_USER, ADMIN_PWD ,'t3://'+ ADMIN_LISTEN_ADDRESS +':' + ADMIN_PORT)


print("*** Deploying SPLService")

edit()

startEdit()


deploy('SPLService', SPLEBASE + '/splapp/applications/SPLService.ear', targets=OUAF_SERVER_NAME, stageMode="stage")


activate()



print("*** Deploying SPLWeb")


startEdit()


progress = deploy('SPLWeb', SPLEBASE + '/splapp/applications/SPLWeb.ear', targets=OUAF_SERVER_NAME, stageMode="stage")


activate()


print("*** Deploying ohelp")

startEdit()


progress = deploy('ohelp', SPLEBASE + '/splapp/applications/ohelp.ear', targets=OUAF_SERVER_NAME, stageMode="stage")


activate()


startEdit()

cd('/AppDeployments/SPLService')

cmo.setDeploymentOrder(100)


cd('/AppDeployments/SPLWeb')

cmo.setDeploymentOrder(200)


cd('/AppDeployments/ohelp')

cmo.setDeploymentOrder(100)


activate()




As seen below I have created all these files and placed them in ‘C:\c2m\weblogic\wlst’ directory. Now these files can be run from any location. So you can place them anywhere.


Next step is to open a command prompt window with ‘Run as Administrator’ option.



Next navigate to following location where Weblogic is installed.

C:\c2m\weblogic\12.2.1.4.0\Oracle\Middleware\Oracle_Home\wlserver\server\bin


Run the command ‘setWLSEnv.cmd’ from this location. This sets the environment variables and classpath needed to run WLST.

As seen below the command has run successfully.


Now navigate to the directory where all scripts files were placed

cd C:\c2m\weblogic\wlst



Run the below command to create new domain in weblogic.

java weblogic.WLST -loadProperties domain.properties createdomain.py


I had set the domain name to ‘c2m2900g_domain’ in domain.properties file.

Below is screenshot of domain directory before executing command.


Below is screenshot of domain directory after executing command. As seen below ‘c2m2900g_domain’ domain folder has got created.

Open the domain folder. As seen below, it has been properly created.

Next navigate to the bin folder under the newly created domain folder.

Open the file ‘startWeblogic.cmd’

Add below line to the file

set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.deploy.MaxPostSize="2000000000"

Refer below screenshot for location where the line is to be added in the file.


Next create and add file ‘setUserOverrides.cmd ‘ to ‘C:\c2m\weblogic\12.2.1.4.0\Oracle\Middleware\Oracle_Home\user_projects\domains\c2m2900g_domain\bin’ location


The sample file for ‘setUserOverrides.cmd’ is available in following location “C:\c2m\ouaf\C2M2800\tools\examples\bin”

Below highlighted values should be updated in file

SERVER_NAME condition below should be updated the OUAF_SERVER_NAME value given earlier in domain.properties.

Also SPLEBASE should be set to the splbase location of the OUAF application.

setUserOverrides.cmd

@echo off

REM

REM This is a WebLogic domain customized domain overide utility to ensure the appropriate environmental values are set for the domain startup

REM

REM


set USER_MEM_ARGS=-Xms3072m -Xmx3072m -XX:PermSize=512m


if "%SERVER_NAME%"=="c2m2900server" (

set SPLEBASE=C:\c2m\ouaf\C2M2900

set USER_MEM_ARGS=-Xms3072m -Xmx3072m -XX:PermSize=512m

)


if "%SPLEBASE%" == "" (

   echo SPLEBASE needs to be set in environment

   exit /b 0

)


if "%TRUST_TYPE%" == "DEMO" (

   set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.security.TrustKeyStore=DemoTrust

)


if "%USER_MEM_ARGS%" == "" (

   set USER_MEM_ARGS=-Xms1024m -Xmx2048m

)



set JAVA_OPTIONS=-XX:CompileThreshold=8000 -Djava.security.auth.login.config=%SPLEBASE%\splapp\config\java.login.config -Dfile.encoding=UTF8 -Djavax.xml.soap.MessageFactory=com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl -Djavax.xml.soap.SOAPConnectionFactory=weblogic.wsee.saaj.SOAPConnectionFactoryImpl -Dcom.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace=false -Dcom.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0 -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -Dweblogic.security.SSL.ignoreHostnameVerification=true -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=C:\temp -Djava.net.preferIPv4Stack=true %JAVA_OPTIONS%


REM set OUAF_DEBUG_PORT (E.g. set OUAF_DEBUG_PORT=6599) prior to starting to enable server debugging 

if DEFINED OUAF_DEBUG_PORT (

   set JAVA_OPTIONS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=%OUAF_DEBUG_PORT% %JAVA_OPTIONS%

)


echo SPLEBASE %SPLEBASE%

echo SERVER_NAME %SERVER_NAME%


Next start the Admin server of the domain

Navigate back to domain folder, right click on startWeblogic.cmd and select ‘Run as administrator’

As seen the admin server is starting. Wait for it start completely


As seen below admin server has started up completely

Next go back to the earlier command prompt where we were running wlst scripts.

Run below command

java weblogic.WLST -loadProperties domain.properties createouafserver.py


As seen below the command has executed successfully. This command creates the ouaf managed server on the domain along with other updates to the domain.

WLST output

C:\c2m\weblogic\wlst>java weblogic.WLST -loadProperties domain.properties createouafserver.py


Initializing WebLogic Scripting Tool (WLST) ...


Welcome to WebLogic Server Administration Scripting Shell


Type help() for help on available commands


Connecting to t3://localhost:7001 with userid weblogic ...

Successfully connected to Admin Server "AdminServer" that belongs to domain "c2m2900g_domain".


Warning: An insecure protocol was used to connect to the server.

To ensure on-the-wire security, the SSL port or Admin port should be used instead.


Location changed to edit tree.

This is a writable tree with DomainMBean as the root.

To make changes you will need to start an edit session via startEdit().

For more help, use help('edit').


Starting an edit session ...

Started edit session, be sure to save and activate your changes once you are done.

Activating all your changes, this may take a while ...

The edit lock associated with this edit session is released once the activation is completed.

Activation completed

Starting an edit session ...

Started edit session, be sure to save and activate your changes once you are done.

Activating all your changes, this may take a while ...

The edit lock associated with this edit session is released once the activation is completed.


The following non-dynamic attribute(s) have been changed on MBeans

that require server re-start:

MBean Changed : com.bea:Name=c2m2900g_domain,Type=Domain

Attributes changed : InternalAppsDeployOnDemandEnabled


Activation completed

Starting an edit session ...

Started edit session, be sure to save and activate your changes once you are done.

Activating all your changes, this may take a while ...

The edit lock associated with this edit session is released once the activation is completed.

Activation completed

Starting an edit session ...

Started edit session, be sure to save and activate your changes once you are done.

Starting an edit session ...

Started edit session, be sure to save and activate your changes once you are done.

Activating all your changes, this may take a while ...

The edit lock associated with this edit session is released once the activation is completed.

Activation completed

Starting an edit session ...

Started edit session, be sure to save and activate your changes once you are done.

Activating all your changes, this may take a while ...

The edit lock associated with this edit session is released once the activation is completed.


The following non-dynamic attribute(s) have been changed on MBeans

that require server re-start:

MBean Changed : com.bea:Name=c2m2900server,Type=Server

Attributes changed : Machine


Activation completed

Starting an edit session ...

Started edit session, be sure to save and activate your changes once you are done.

Activating all your changes, this may take a while ...

The edit lock associated with this edit session is released once the activation is completed.

Activation completed

Starting an edit session ...

Started edit session, be sure to save and activate your changes once you are done.

Activating all your changes, this may take a while ...

The edit lock associated with this edit session is released once the activation is completed.


The following non-dynamic attribute(s) have been changed on MBeans

that require server re-start:

MBean Changed : com.bea:Name=c2m2900server,Type=Server

Attributes changed : XMLRegistry


Activation completed

Starting an edit session ...

Started edit session, be sure to save and activate your changes once you are done.

Activating all your changes, this may take a while ...

The edit lock associated with this edit session is released once the activation is completed.

Activation completed

Starting an edit session ...

Started edit session, be sure to save and activate your changes once you are done.

Activating all your changes, this may take a while ...

The edit lock associated with this edit session is released once the activation is completed.

Activation completed

Starting an edit session ...

Started edit session, be sure to save and activate your changes once you are done.

Activating all your changes, this may take a while ...

The edit lock associated with this edit session is released once the activation is completed.

Activation completed


C:\c2m\weblogic\wlst>



Next Admin server needs to be restarted. So close the admin server cmd window. And start the server again. This is needed as password parameters were changed in earlier script and server restart is needed before users are created.

Click on close and stop admin server.


As seen below admin server is restarted.


Now go back to the command prompt where wlst scripts were run and run the next script for creating ouaf users

java weblogic.WLST -loadProperties domain.properties createouafusers.py

This script creates users, groups and assigns users to groups

WLST output

C:\c2m\weblogic\wlst>java weblogic.WLST -loadProperties domain.properties createouafusers.py


Initializing WebLogic Scripting Tool (WLST) ...


Welcome to WebLogic Server Administration Scripting Shell


Type help() for help on available commands


Connecting to server …

Connecting to t3://localhost:7001 with userid weblogic ...

Successfully connected to Admin Server "AdminServer" that belongs to domain "c2m2900g_domain".


Warning: An insecure protocol was used to connect to the server.

To ensure on-the-wire security, the SSL port or Admin port should be used instead.


*********Group Creation***********

Creating Group cisusers

Group created successfully!!

*********User Creation***********

User system created successfully!!

*********User Creation***********

User SYSUSER created successfully!!

*********Adding User to New created Group***********

User system added to  Group successfully!!


C:\c2m\weblogic\wlst>


As seen below the script executed successfully

Next run the below command to deploy the EAR application files for SPLService.ear, SPLWeb.ear and ohelp.ear

java weblogic.WLST -loadProperties domain.properties deployouafapps.py



WLST output

C:\c2m\weblogic\wlst>java weblogic.WLST -loadProperties domain.properties deployouafapps.py


Initializing WebLogic Scripting Tool (WLST) ...


Welcome to WebLogic Server Administration Scripting Shell


Type help() for help on available commands


Connecting to server …

Connecting to t3://localhost:7001 with userid weblogic ...

Successfully connected to Admin Server "AdminServer" that belongs to domain "c2m2900g_domain".


Warning: An insecure protocol was used to connect to the server.

To ensure on-the-wire security, the SSL port or Admin port should be used instead.


*** Deploying SPLService

Location changed to edit tree.

This is a writable tree with DomainMBean as the root.

To make changes you will need to start an edit session via startEdit().

For more help, use help('edit').


Starting an edit session ...

Started edit session, be sure to save and activate your changes once you are done.

Deploying application from C:\c2m\ouaf\C2M2900\splapp\applications\SPLService.ear to targets c2m2900server (upload=false) ...

<22 Aug, 2022 2:46:26 AM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, SPLService [archive: C:\c2m\ouaf\C2M2900\splapp\applications\SPLService.ear], to c2m2900server .>

You have an edit session in progress, hence WLST will not block for your deployment to complete.

Started the Deployment of Application. Please refer to the returned WLSTProgress object or variable LAST to track the status.

Activating all your changes, this may take a while ...

The edit lock associated with this edit session is released once the activation is completed.

Activation completed

*** Deploying SPLWeb

Starting an edit session ...

Started edit session, be sure to save and activate your changes once you are done.

Deploying application from C:\c2m\ouaf\C2M2900\splapp\applications\SPLWeb.ear to targets c2m2900server (upload=false) ...

<22 Aug, 2022 2:46:28 AM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, SPLWeb [archive: C:\c2m\ouaf\C2M2900\splapp\applications\SPLWeb.ear], to c2m2900server .>

You have an edit session in progress, hence WLST will not block for your deployment to complete.

Started the Deployment of Application. Please refer to the returned WLSTProgress object or variable LAST to track the status.

Activating all your changes, this may take a while ...

The edit lock associated with this edit session is released once the activation is completed.

Activation completed

*** Deploying ohelp

Starting an edit session ...

Started edit session, be sure to save and activate your changes once you are done.

Deploying application from C:\c2m\ouaf\C2M2900\splapp\applications\ohelp.ear to targets c2m2900server (upload=false) ...

<22 Aug, 2022 2:46:29 AM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, ohelp [archive: C:\c2m\ouaf\C2M2900\splapp\applications\ohelp.ear], to c2m2900server .>

You have an edit session in progress, hence WLST will not block for your deployment to complete.

Started the Deployment of Application. Please refer to the returned WLSTProgress object or variable LAST to track the status.

Activating all your changes, this may take a while ...

The edit lock associated with this edit session is released once the activation is completed.

Activation completed

Starting an edit session ...

Started edit session, be sure to save and activate your changes once you are done.

Activating all your changes, this may take a while ...

The edit lock associated with this edit session is released once the activation is completed.


The following non-dynamic attribute(s) have been changed on MBeans

that require server re-start:

MBean Changed : com.bea:Name=SPLWeb,Type=AppDeployment

Attributes changed : DeploymentOrder


Activation completed

<22 Aug, 2022 2:46:31 AM IST> <Warning> <JNDI> <BEA-050001> <WLContext.close() was called in a different thread than the one in which it was created.>


C:\c2m\weblogic\wlst>




As seen below the script executed successfully

Next go to your browser and connect to the admin server.

Use the admin url and port specified in domain.properties earlier.

http://localhost:7001/console

Login with the ADMIN user and Admin password provided in domain.properties earlier

Once you have logged in, navigate to Servers and verify that the ouaf managed server name given in domain.properties is created. As seen below ‘c2m2900server’ is created.


Verify that the ports of server are correct by opening the server config -> General

Verify that the OUAF ports are same as given in domain.properties file.

Next navigate to Security Realms -> myrealm -> Users and Groups

Verify that the users system and SYSUSER have been created.

Verify that the group cisusers is created

Navigate to deployments tab. Verify that SPLService, SPLWeb and ohelp are deployed on the server.


Next navigate to the domain bin location and run startNodeManager.cmd with ‘Run as Administrator’ option.

As seen below the nodemanager has started up

Next go to the servers screen -> Control. Select the ouaf managed server ‘c2m2900server’ and click on Start button.

As seen below start request has been sent to nodemanager

As seen below the managed server has started successfully.


Next open your browser and enter the application url.

https://localhost:6501/ouaf/cis.jsp



As seen below the C2M server is up and running properly.


Finally providing the main steps again so that you don’t get lost in above screenshots.

Steps Summary

  • Create wlst files

  • Open cmd prompt and run setWLSEnv.cmd for setting WLST environment

  • Run ‘java weblogic.WLST -loadProperties domain.properties createdomain.py’

  • Next update startWeblogic.cmd file and add setUserOverrides.cmd file in bin location

  • Start weblogic admin server for domain

  • Run ‘java weblogic.WLST -loadProperties domain.properties createouafserver.py’

  • Restart weblogic admin server for domain

  • Run ‘java weblogic.WLST -loadProperties domain.properties createouafusers.py’

  • Run ‘java weblogic.WLST -loadProperties domain.properties deployouafapps.py’

  • start nodemanager server

  • Open admin server console in browser and start managed server. Verify it moves to RUNNING state.

  • Enter URL of application server in browser and verify that application is loading up.



Thus you can automate the steps for native installation of C2M on weblogic server using such scripts. This reduces your time by a big amount and also reduces errors. Try it out, post comments on the blog if you face any issue or have any queries.

 

OUAF Oracle Utilities WAM / ODM 2.4.0.0 installation on Windows

  This blog is for anyone looking to install Oracle Utilities WAM or ODM 2.4.0.0 (Oracle Utilities Workflow and Asset Management) or (Orac...