This gradle script will create the profile that will be administrative secure with the usename "admin" and the password "admin"
More about passed parameters and the parameter that you could additionalyy pass, you can read here:
http://pic.dhe.ibm.com/infocenter/wxdinfo/v6r1/index.jsp?topic=%2Fcom.ibm.websphere.ops.doc%2Finfo%2Finstall%2Frinstallprofile_silent.html
The webshere ports will be starting from the 13000.
To delete profile, you can use the script simmilar like in the http://b1102.blogspot.de/2014/07/gradle-escaping-spaces-in-arguments-for.html
More about passed parameters and the parameter that you could additionalyy pass, you can read here:
http://pic.dhe.ibm.com/infocenter/wxdinfo/v6r1/index.jsp?topic=%2Fcom.ibm.websphere.ops.doc%2Finfo%2Finstall%2Frinstallprofile_silent.html
The webshere ports will be starting from the 13000.
To delete profile, you can use the script simmilar like in the http://b1102.blogspot.de/2014/07/gradle-escaping-spaces-in-arguments-for.html
import org.apache.tools.ant.taskdefs.condition.Os
task createProfile(type: Exec) {
description = 'Create WebSphere Application Server profile.'
def isWindows = Os.isFamily(Os.FAMILY_WINDOWS)
def cmdExtension = isWindows ? 'bat' : 'sh'
def manageProfilesFileName = File.separator + "manageprofiles." + cmdExtension
//Path to your webshere installation
def wasHome = 'C:/IBM/WebSphere/AppServer'
def templatePath = wasHome + File.separator + "profileTemplates" + File.separator + "default"
//Path to the wsadmin.bat or wsadmin.sh
def wsadminLocation = wasHome + File.separator + "bin"
def manageProfilesFile = new File(wsadminLocation, manageProfilesFileName)
executable = manageProfilesFile
def argsList = ["-create", "-profileName", "Profile1", "-templatePath", templatePath,
"-nodeName", "AppSrv01", "-cellName", "AppSrv01Node1",
"-serverName", "AppSrv01Node1Serve1", "-enableAdminSecurity", "true",
"-startingPort", "13000", "-adminUserName", "admin",
"-adminPassword", "admin"]
//defines will this profile will be the default one or not
def isDefault = true
if (isDefault) {
args.add("-isDefault")
}
if (isWindows) {
argsList.add("-winserviceCheck")
argsList.add("true")
argsList.add("-winserviceUserName")
argsList.add("Administrator")
argsList.add("-winserviceStartupType")
argsList.add("automatic")
} else {
argsList.add("-enableService")
argsList.add("true")
argsList.add("-serviceUserName")
//any desired service user name
argsList.add("root")
}
args = argsList
}
No comments:
Post a Comment