DevOps Automation

 View Only

Converting WebSphere Application Server configuration data into templates

By Laurel Dickson-Bull posted Mon July 25, 2022 04:11 PM

  

This article was originaly published in 2016.01.13

The WebSphere Configuration Discovery in the WebSphere Application Server – Configure plug-in connects to WebSphere Application Server and retrieves configuration data. The configuration data is represented in JSON format and is stored in a stdOut.txt file.

This document describes how to create a process to split the JSON data into smaller pieces that represent different WebSphere Application Server scopes (cell configuration data, node configuration data, server configuration data, and so on) and convert the data into templates. In templates, some values are tokenized so that the templates can be applied to multiple environments.

Sample processes

The WebSphere Application Server – Configure plug-in includes three sample processes:

WebSphere – Example 1 – Pull & Templatize Configuration Data (WAS ND with Cluster)

WebSphere – Example 2 – Pull & Templatize Configuration Data (WAS ND with standalone server)

WebSphere – Example 3 – Pull & Templatize Configuration Data (WAS Base)

The processes are imported automatically when you install the WebSphere Application Server – Configure plug-in. The processes are available on the Processes page in IBM UrbanCode Deploy.

Process results

After you run one of the sample processes, two folders are created in the directory that you specify as the output directory:

  • extracted folder– The extracted folder contains the configuration data split into multiple JSON files. The configuration data itself is unchanged.
  • templates folder – The templates folder contains the configuration data converted into templates. Some values in the templates are tokenized so that the templates can be applied to multiple environments. For example, the cell name is tokenized. You use the files in the templates directory as component version artifacts in IBM UrbanCode Deploy. Typically, you place these files under source control.

Step descriptions

The process that you build to convert configuration data into templates must contain several steps.

WebSphere Configuration Discovery

This step connects to WebSphere Application Server, retrieves configuration information, and saves the configuration information to a file.

WebSphere – Extract Configuration Data

This step splits the configuration file into different WebSphere Application Server scopes (cell configuration data, node configuration data, server configuration data, and so on). You must run this step before any of the Templatize steps.

WebSphere – Templatize Cell Configuration Data

This step converts the cell and Deployment Manager (if applicable) configuration data into templates.

WebSphere – Templatize Node Configuration Data

This step converts node and node agent (if applicable) configuration data into templates. You must specify the name of the node to templatize. This step templatizes only one node. Use a separate WebSphere – Templatize Node Configuration Data step for each node to templatize.

WebSphere – Templatize Cluster Configuration Data

This step converts cluster configuration data into templates. You must specify the name of the cluster to templatize, or specify ALL as the cluster name to templatize all clusters.

WebSphere – Templatize Server Configuration Data

This step converts server configuration data into templates. You must specify the name of the server to templatize, the name of the node where the server resides, and the name of the node to associate the server template with. Use one WebSphere – Templatize Server Configuration Data step for each server to templatize, or templatize all servers belonging to a node by specifying ALL as the server name. If you plan to use a server as a cluster member, do not use this process. Instead, use the Templatize Server for Cluster process. The WebSphere – Templatize Node Configuration Data step must be run before the WebSphere – Templatize Server Configuration Data step.

WebSphere – Templatize Server for Cluster Configuration Data

This step converts server configuration data into a server template for use by a cluster. Use this server template to create cluster members. By using the multiplicity feature, any number of servers can be created for a cluster with this server template.

Procedure

The following steps describe building a process to templatize a configuration.

  1. Create a process. Navigate to the Configuration page, and then select Process Properties. Add a property named configurationFile and a property named outputDirectory. The configurationFile property specifies the name and location of the initial configuration file to produce. The outputDirectory property specifies the location where the templates and other files will be stored.
  2. Add a WebSphere Configuration Discovery step to the process. The WebSphere Configuration Discovery step connects to WebSphere Application Server and saves configuration data to a file. Specify ${p:configurationFile} for the Configuration Output File field.
  3. Add a WebSphere – Extract Configuration Data step to the process. Specify ${p:configurationFile} for the Configuration File field. The WebSphere – Extract Configuration Data step parses the configuration file into different WebSphere scopes: cell, node, cluster, server, node agent, and Deployment Manager.
  4. Add a WebSphere – Templatize Cell Configuration Data step to the process. The WebSphere – Templatize Cell Configuration Data step converts the cell and Deployment Manager (if applicable) configuration data into templates.
  5. Add a WebSphere – Templatize Node Configuration Data step to the process. The WebSphere – Templatize Node Configuration Data step converts node and node agent (if applicable) configuration data into a template. You must specify the name of the node to templatize.
  6. Add a WebSphere – Templatize Cluster Configuration Data step to the process. The WebSphere – Templatize Cluster Configuration Data step converts cluster configuration data into a template. You must specify the name of the cluster to templatize, or specify ALL as the cluster name to templatize all clusters.
  7. Add a WebSphere – Templatize Server for Cluster Configuration Data step for each server to convert into a cluster member template. The WebSphere – Templatize Server for Cluster Configuration Data step converts server configuration data into a template that can then be used to create a cluster member. You must specify the name of the server to templatize, the name of the node the server resides on in your configuration data, and the name of the cluster the server template will be associated with.
  8. Add a WebSphere – Templatize Server Configuration Data step for each server to templatize (and not use as a cluster member). The WebSphere – Templatize Server Configuration Data step converts server configuration data into a template. You must specify the name of the server to templatize, the name of the node the server resides on in your configuration data, and the name of the node the server template will be associated with. You can specify ALL as the server name to templatize all servers of a node.

Running the process

When you run the process, you are prompted to specify the name and location of the configuration file to create, the directory where the templates and other artifacts will be created, the WebSphereCell resource that the process runs against, and any other process properties that you specified.


#WebSphereApplicationServer(WAS)
#UrbanCodeDeploy
0 comments
7 views

Permalink