This article was originaly published in 2016.12.07
Creating configuration snippets
To begin working with the WebSphere® – Create Configuration Snippet step, you must have configuration data stored in a
.json file. The WebSphere Configuration Discovery step returns a
.json file of configuration data when you run the step. After you have your configuration data in a
.json file, you can use the WebSphere – Create Configuration Snippet step to extract pieces of your configuration. Reasons why you might want to do so include these capabilities:
- Creating templates from subsets of configuration data
- Dividing configuration data into smaller pieces and restricting who may manage certain pieces
- Dividing configuration data into smaller pieces for easier configuration data management
Let’s now look at the properties of the WebSphere – Create Configuration Snippet step:
Original Configuration File: Specify the location and name of the configuration data
.json file. This is the file where extracted snippets come from.
Paths of Resources to Extract: Enter a new-line separated list of paths that correspond to the resource to extract from the configuration data. For example, let’s say you want to create a snippet based on a JDBC provider named CellJDBC. Locate the CellJDBC JDBC provider in your configuration data: The path for this resource is highlighted in the following figure. To extract this resource, enter the
/@websphere.cell@/JDBC Providers/CellJDBC path in the Paths of Resources to Extract field.
Object Types to Extract: Instead of listing individual configuration objects to create snippets of, snippets can be created by specifying object types. For example, if you specify JDBCProvider in this field, all objects of the JDBCProvider type in your configuration data will have snippets created for them. This field accepts a new-line separated list of object types. Values can be specified in both the Object Types to Extract and the Paths of Resources to Extract fields. For a list of WebSphere object types, run this wsadmin command:
Extracted Snippet File: The file to be created to contain the extracted resources. If the Create Snippet File for each Resource option is selected, the file name format is based on the value that is entered in the Extract Snippet File field. For more information, see the Create Snippet File for each Resource property that follows.
Create Snippet File for each Resource: If this option is selected, a new
.json file is created for each object to be extracted. For example, if you specify
JDBCProvider in the Object Types to Extract field, have five JDBC provider objects in your configuration data, and select this option, five
.json files are created. If this option is not selected, one file is produced, and it contains configuration data for all extracted resources. If this option is selected, the created files have the name format of the file that is specified in the Extracted Snippet File field with
[object type]_[integer] appended to the file name. For example, if the value of my Extracted Snippet File field is
C:\tmp\mySnippet.json, and I extract five JDBC provider resources with this option selected, the resulting files are as follows:
New Configuration File: Specify the location and name of the configuration data file to be created, which contains all initial configuration data minus the data that was extracted as snippets. This field is useful for removing objects from configuration data.
Write a comment @mention users to notify them.