The Support Authority: Take the confusion (and errors) out of managing profiles for WebSphere Application Server

Using the Manage Profiles Interactive utility

Using the manageprofiles command for creating and managing profiles for IBM® WebSphere® Application Server can be confusing and error prone. A new interactive utility lets you select specific options and settings from a list, then calls the manageprofiles command and passes it all your selected parameters. This greatly reduces the time it takes to create a new profile for WebSphere Application Server and reduces the opportunity for user errors. This content is part of the IBM WebSphere Developer Technical Journal.

Share:

Paul Van Norman (vanno@us.ibm.com), WebSphere Application Server L2 Team, IBM

Paul Van Norman received B.Sc. in Computer Science in 1996 from the University of Regina. He moved from Regina, Canada to Austin, Texas where he has been working in WebSphere Application Server Level 2 support since May, 2000. Paul is the team lead of the WASADM team and has previously led several other L2 teams. Paul enjoys the outdoors and can often be seen in the Texas hill country back roads on his trusted Honda motorcycle.



Dr. Mahesh Rathi (mrathi@us.ibm.com), WebSphere Application Server SWAT Team, IBM

Dr. Mahesh Rathi has been involved with WebSphere Application Server product since its inception. He led the security development team before joining the L2 Support team, and joined the SWAT team in 2005. He thoroughly enjoys working with demanding customers, on hot issues, and thrives in pressure situations. He received his PhD in Computer Sciences from Purdue University and taught Software Engineering at Wichita State University before joining IBM.



25 August 2010

Also available in Chinese Russian Japanese

In each column, The Support Authority discusses resources, tools, and other elements of IBM® Technical Support that are available for WebSphere® products, plus techniques and new ideas that can further enhance your IBM support experience.

This just in...

As always, we begin with some new items of interest for the WebSphere community at large:

Continue to monitor the various support-related Web sites, as well as this column, for news about other tools as we encounter them.

And now, on to our main topic...


Using interactive tools to avoid confusion and errors (Part 2)

Earlier this year, The Support Authority presented an interactive tool for the WASService command. This time, we present yet another such tool that was recently developed.

All screen captures in this article are from WebSphere Application Server on a Windows® platform. The same steps are also applicable on other platforms. For example, on UNIX® platforms, you would run run_manageprofilesInteractive.sh, instead of run_manageprofilesInteractive.bat.

At the heart of this interactive tool is the manageprofiles command, which provides the means for performing normal maintenance activities for profiles. For example, you can call this command to create profiles natively or silently, to list or delete profiles, to validate the profile registry, and more. The manageprofiles command can be found in the install_root/bin directory. The syntax is:

manageprofiles(.sh) –mode –arguments

There are 18 modes available, as shown in the tool’s main menu (Figure 1) and in Table 1.

Figure 1. manageprofiles command menu
Figure 1. manageprofiles command menu
Table 1. manageprofiles modes
ModeUse
-createCreates a new profile.
-deleteDeletes a profile.
-augmentAugments the given profile using the given profile template.
-unaugmentUnaugments the profile.
-unaugmentAllUnaugments all the profiles.
-deleteAllDeletes all registered profiles.
-listProfilesLists the profiles in the profile registry.
-listAugmentsLists the registered augments on a profile that is in the profile registry.
-getnameReturns the name of the profile at the path specified.
-getPathReturns the path of the profile name specified.
-validateRegistryValidates the profile registry and returns a list of profiles that are not valid.
-validateAndUpdateRegistryValidates the profile registry and lists the non-valid profiles that it purges.
-getDefaultNameReturns the name of the default profile.
-setDefaultNameSets the default profile.
-backupProfileBacks up the given profile into a.zip file.
-restoreProfileRestores the given profile from a .zip file.
-responseManage profiles from a response file.
-helpShows help.

Each mode takes several arguments -- in some cases, as many as 50 or more. Some of these arguments include several long path strings; in fact, there can be several nested levels. For example, if you choose mode 1 (create), then you are asked to choose a template path from among eight choices. Different templates take a different number of optional parameters. Not only can this be easily confusing, but it also presents an excellent opportunity to make a mistake.

Figures 2 and 3 show the steps needed for the create mode. Don’t worry if they are not terribly legible. You can see that there are many optional parameters. In fact, there are more than 200 combinations possible just for the create mode alone; there are 40 optional parameters for the appserver template, 39 for the cell template, 29 for the deployment manager template … you get the idea.

Figure 2. Steps for the create mode
Figure 2. Steps for the create mode
Figure 3. Steps for the create mode, continued
Figure 3. Steps for the create mode, continued

In addition to being confusing and error prone, entering all these parameters on the command line can also be time consuming and frustrating. Beyond that, it can sometimes take an hour or more to determine why a WebSphere Application Server failed to start, based on a profile created this way.

To help you create WebSphere Application Server profiles quickly and without confusion, the Manage Profiles Interactive utility was developed. This new, interactive wizard can help you quickly manage the profiles for WebSphere Application Server V6.x and V7x. This wizard is a front end to the manageprofiles command line utility shipped with WebSphere Application Server in the bin dir. You can download and run this tool from <WebSphere_Install_Root>\bin\.

To illustrate how to use this utility, let’s step through the procedure for two separate scenarios: first, to augment a profile, then to create a profile.

To use the utility to augment a profile:

  1. Run the run_manageprofilesInteractive command from the WebSphere/AppServer/bin directory (Figure 1).
  2. For Select number next to the options on the main menu, select item 2 to augment a profile (Figure 4).
    Figure 4. Augment
    Figure 4. Augment
  3. For Enter number to select or change, select 1 to choose a profile to augment, as shown at the bottom of Figure 4.
  4. After selecting the profile (select 1 for AppSrv01 profile), you are instructed to select the templatePath (Figure 5). There are eight options shown for the template path. If you choose 7 (Other), you must enter the full template path. (In the create example, you will see what happens when you choose a given templatePath option rather than Other.
    Figure 5. Augment, continuation
    Figure 5. Augment, continuation
  5. For the augment mode, there are only two required parameters, profileName and templatePath. The tool now displays the required parameters selected, as shown in Figure 6 (which is a continuation of Figure 5). The tool displays the required parameters selected, and, if you are satisfied, displays the full command and adds it to the log file that shows that profile augmentation succeeded.
    Figure 6. Augment, completion
    Figure 6. Augment, completion

Now, contrast this with the task of creating a profile. The regular steps to do this were shown in Figures 2 and 3. Let’s look at those steps in the tool and compare them to the steps for augmenting a profile.

To use the utility to create a profile:

  1. Run the run_manageprofilesInteractive command from the WebSphere/AppServer/bin directory (Figure 1).
  2. For Select number next to the options on the main menu, select item 1 to create a profile (Figure 7).
    Figure 7. Create
    Figure 7. Create
  3. You are instructed to select the templatePath (Figure 8).
    Figure 8. templatePath for create
    Figure 8. templatePath for create

    There are nine options shown for the template path. In the augment example, there were eight template path options. Each selection at a given step affects the options you are presented with at the next step. The tool helps you by listing all the available options at every step and always offers you the choice of choosing the default value.

    This time, you select 2 for Application server profile (default).

  4. Next, you are asked for the profile name, hostname, and profile path, pressing the Enter key each time to select the default values (Figure 9). Notice that there are four required parameters for create mode, compared to only two for augment (Figure 6).
    Figure 9. Required parameters for create
    Figure 9. Required parameters for create
  5. Press Enter to accept the required parameters summary, and the tool displays the optional parameters. In the case of create using the application server template, there are 40 optional parameters (Figure 10).
    Figure 10. Optional parameters for create
    Figure 10. Optional parameters for create
  6. You can skip the optional parameters by entering a c, as shown in Figure 10. At this point, the final steps for create are same as for augment. The CREATE command summary is displayed. If you accept it, the full command is listed, executed, and added to the log file, which shows that the profile was successfully created (Figure 11).
    Figure 11. Completion of create
    Figure 11. Completion of create

As mentioned above, a command log is also kept for every command that gets issued. If the command contains a password, the password appears as "*******" in the <WebSphere_Install_Root>\logs\manageprofilesInteractive.log file. Figure 12 shows an example of what the log file contains.

Figure 12. Example log contents
Figure 12. Example log contents

One unique benefit of using this utility is that it lets you easily create a separate response file. Figure 13 shows an example of a response file.

Figure 13. Example of a response file
Figure 13. Example of a response file

If you select option 17 (response) on the main menu (Figure 13), you are asked to supply the name of the response file, which the tool will read and execute. This functionality is supplied by manageprofiles command and enables you to carry out the tasks silently.

Figure 14. Using a response file
Figure 14. Using a response file

Before this utility, you had to create this response file manually, which is again error prone. This tool enables you to create this response file automatically, after you have seen the command at the end and are satisfied with your selections. At that point, it gives you the choice of either running the command or adding to a response file for later use. This way, you can also run multiple commands at the same time.

You can see this in the middle of Figure 11. After giving the command summary, you are asked by the utility to choose q to quit, r to add to the response file, or c to run the command. In the figure, c was entered and the command was run. If r had been entered instead, then a response file, similar to the one shown in Figure 12 would have been created.


Conclusion

This article explained how the Manage Profiles Interactive utility guides you through the creation, listing, deleting, and augmenting of profiles for WebSphere Application Server quickly and without making common errors. This is a great tool for administrators in production environments, as well as in development and test systems where more frequent profile creation and deletions might be required.

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into WebSphere on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere
ArticleID=513163
ArticleTitle=The Support Authority: Take the confusion (and errors) out of managing profiles for WebSphere Application Server
publish-date=08252010