KBEC-00401 - Create a WebLogic configuration through the command line

Summary

This article will describe how you can create a WebLogic configuration through the command line using ectool or ec-perl.

Solution

ectool

The bolded lines are required fields. All other lines can be left out if you wish to keep the default settings for those parameters.

ectool runProcedure EC-WebLogic-3.2.3.108 \
--procedureName CreateConfiguration --actualParameter \
"config=config_name" \
"debug_level=1" \
"weblogic_url=url-name" \
"enable_named_sessions=0" \
"java_home=HOME" \
"java_vendor=VENDOR" \
"mw_home=HOME2" \
"credential=cred1" \
--credential "cred1=username"

Note: If you plan on using credentials, this process is not fully automated because you must enter the password after running this command. A workaround to make this command fully automated would be to store the password in a file and pass it in:

ectool runProcedure EC-WebLogic-3.2.3.108 \
--procedureName CreateConfiguration --actualParameter \
"config=config_name" \
"debug_level=1" \
"weblogic_url=url-name" \
"enable_named_sessions=0" \
"java_home=HOME" \
"java_vendor=VENDOR" \
"mw_home=HOME2" \
"credential=cred1" \
--credential "cred1=username" < password.txt

ec-perl

Create a new file createWLConfig.pl

Copy and paste the below script into the file

Run the following command:

ec-perl createWLConfig.pl

use ElectricCommander;
my $cmdr = ElectricCommander->new();
$cmdr->runProcedure("EC-WebLogic-3.2.3.108", {procedureName => "CreateConfiguration",
actualParameter => [
{actualParameterName => "config", value => "config_name"},
{actualParameterName => "debug_level", value => "1"},
{actualParameterName => "weblogic_url", value => "url-name"},
{actualParameterName => "credential", value => "cred1"}
],
credential => [
{
credentialName => "cred1",
userName => "admin",
password => "changeme"
}
]
});

Have more questions? Submit a request

Comments

Powered by Zendesk