In a flexible management environment, you can submit the Configure
properties job to apply properties files to application
servers managed by the job manager. After you edit a properties file
that is intended for a managed application server target, use the
job manager to distribute the properties file to the managed target
and apply the changed file to update the application server configuration.
Before you begin
Properties files provide a way to query and change the
product configuration. The files list the most commonly used properties
in name and value pairs.
Before you can submit a job to apply
a properties file, do the following:
- Start the job manager. If you are applying the properties file
to a deployment manager target, start the deployment manager and the
federated node of the deployment manager. If you are applying the
properties file to a stand-alone application server target, start
the administrative agent. The targets must be managed by the job manager.
- Use the extractConfigProperties command in the PropertiesBasedConfiguration
command group for the AdminTask object to extract a properties file
of an application server that is managed by the job manager. You must
run the extractConfigProperties command locally or run a wsadmin script
that extracts the properties file in a Run wsadmin script job.
The job manager does not have a job that specifically extracts a properties
file.
For example, suppose you want to extract the server configuration
of an application server target that has a server named server1 and
a profile named AppSrv02. Run the following wsadmin
commands from the bin directory of the AppSrv02
profile:
wsadmin -lang jython
AdminTask.extractConfigProperties('[-propertiesFileName server.props -configData Server=server1 ]')
The
product extracts the server configuration to a file named server.props in
the bin directory of the AppSrv02 profile.
- Open an editor on the properties file, change the value of one
or more properties, and save the file.
Important: The properties
file must be in UTF-8. The generated file is in UTF-8 automatically.
Ensure that the file remains in UTF-8 after any edits. Use an editor
that handles UTF-8, or US-ASCII if the file does not have characters
outside the 7-bit US-ASCII character set.
- Copy the properties file to the /config/temp/JobManager directory
of the job manager profile.
If the JobManager directory
does not exist, create the JobManager directory
in the job manager profile /config/temp directory.
To create and access the directory, you must have the appropriate
authority.
If the properties file exists on a managed target,
you can run the Collect file job to copy the
properties file from the managed target to the job_manager_profile/config/temp/JobManager/jobToken/targetName directory.
See the topic on the collect file job.
- Run the Distribute file job to distribute
the properties file from the job manager to one or more application
server targets. Remember any value that you specify for Destination because
you use that location for the job that applies the properties file.
Avoid trouble: You must distribute the properties file to the
targets before you can run the
Configure properties job.
The distribute file job copies the properties file in the /config/temp/JobManager
directory of the job manager profile to the targets. The name of the
properties file on the targets becomes whatever value that you specify
for the destination when distributing the file. See the topic on the
distribute file job.
gotcha
- If the properties file uses a variable map file, run the Distribute
file job to distribute the variable map file. Remember
any value that you specify for Destination.
Your ID at the job manager must be authorized for the administrator
role or the operator role to submit jobs. When you submit a job, you
can specify a user name and password for authentication and authorization
at the target or targets. When you submit a job to multiple targets,
the user name and password or the credentials for the submitter must
be applicable to all the job targets.
About this task
You can use the administrative console of the job manager
or the deployment manager to submit a job that applies a properties
file and configures an application server. From the console, choose
the Configure properties job, specify the properties
file to apply, specify job options, schedule the job, review the summary,
and submit the job.
The job makes the following changes to an
application server configuration:
- Sets the attribute corresponding to each property specified in
the properties file to the new value.
- If an attribute corresponding to the specified property does not
exist in the configuration, creates an attribute in the configuration.
- If a configuration object specified in the properties file does
not exist in the configuration, creates a configuration object.
Optionally, you can specify that the job manager use variables
that are set in a variable map file when applying the properties file.
Specify the location of a variable map file to include with the properties
file.
The steps describe how to use the job manager console
or the deployment manager to submit the job. Instead of using a console,
you can submit the job by running the configProperties command
in the AdministrativeJobs command group to configure the properties
for the application server target. See the Administrative job types
topic.
The configure properties job uses the applyConfigProperties command
in the PropertiesBasedConfiguration command group for the AdminTask
object to configure the properties for the target.
Procedure
- Click from the navigation tree of the administrative console.
- Choose a job to apply a properties file to one or more
application server targets.
- Select the Configure properties job
type from the list.
- Optionally describe the job.
- Click Next.
- For the job target, choose the application server targets
that you want to configure by applying a properties file.
- Select Target names.
- Specify the target names to which you previously distributed
the properties file and click Add, or click Find and
specify the application server targets as chosen targets on the Find
targets page.
- Click Next.
- If user authentication is required, specify a user name,
password, or any other authentication values as needed.
- Click Next.
- Specify parameters for the configure properties job.
- Specify the location of the properties file that you
want to apply.
The properties file location is the destination
value that you specified for the Distribute file job.
- If the properties file uses a variable map file, specify
the location of the variable map file.
Use the destination
value that you specified for the Distribute file job.
- Click Next.
- Schedule the job.
The times and dates that
you specify are relative to the job manager.
- Optionally specify one or more email addresses where
notifications are sent when the job is done.
If you
specify multiple email addresses, separate them by commas. The email
addresses are saved in your console preferences. Each email address
is validated for format errors.
- Select when the job is available for submission.
You can submit the job to be available now, or specify a
time and date that the job is retrieved from the job manager.
- Select the job expiration.
The job expiration
is the time at which the job will no longer be available for targets
to run. You can use the default expiration, specify a time and date
for the job expiration, or specify an amount of time in which the
job expires. The default expiration is defined on the Job manager
configuration page.
- Optionally specify a recurring interval for the job,
a start date and time for the interval, and an end date and time for
the interval.
- Click Next.
- Review the summary, and click Finish to
submit the job.
Results
The job manager performs the following operations:
- Makes the Configure properties job available
to the targets.
- Reports on the status of the job at each target.
What to do next
On the Job status page, click the job ID and view the
job status. Click the status refresh icon
to refresh the displayed status.
If
the job is not successful, view any error messages that result from
running the job, correct the error condition, and submit the job again.
If
the job status is Succeeded, check a target to ensure
that the properties file was applied.