ConfigToScript command


The WLST command ConfigToScript converts an existing server configuration (config directory) to an executable WLST python script.The syntax for this command is :
configToScript([configPath], [pyPath], [overwrite], [propertiesFile], [createDeploymentScript])

– configPath : Optional value. This is the path to the config directory that contains the configuration of the domain that you want to convert.  The default location is domain/config directory.
– pyPath : Optional value. This is the path and filename to which you want to write the converted WLST script. This argument defaults to domain/config/
– overwrite : Optional value. This is a boolean value specifying whether the script file should be overwritten if it already exists. This argument defaults to true, indicating that the script file is overwritten.
– propertiesFile : Optional value. This is a path to the directory in which you want WLST to write the properties files. This argument defaults to the pathname specified for the scriptPath argument.
– createDeploymentScript : Optional value. This is a boolean value specifying whether WLST creates a script that performs deployments only. This argument defaults to false, indicating that a deployment script is not created. The file named will be created.
Here is an example in weblogic server 10.3, where I have created WLST scripts which include a properties file, python script which has configurations of the domain, file to store the passwords used in the domain by the servers.
From the command prompt, start the WLST.cmd file from the path D:\BEA103\wlserver_10.3\common\bin. WLST will start in offline mode.
Execute the command configToScript as below:
Below are the files that will be created in the D:/Files/MyScripts directory:
–    c2sConfigexample_domain
–    c2sSecretexample_domain

Latest Comments

  1. Rahul Gupta November 19, 2010
    • divya November 23, 2010
  2. Rahul Gupta November 19, 2010
  3. Rahul Gupta December 2, 2010
    • divya December 4, 2010
  4. Ravi June 20, 2011
  5. vish August 29, 2011
  6. Mukul August 22, 2013
    • Administrator August 27, 2013
    • Shiva Shankar September 12, 2013

Leave a Reply