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"
| 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
with this content
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"
}
]
});
This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.