Sun Java System Portal Server 6 2004Q2 Migration Guide |
Chapter 5
Migrating The Desktop
This chapter provides procedures to migrate the Sun ONE Portal Server 3.0 Desktop to the Sun ONE Portal Server 6.2 Desktop. In particular, migration of the Desktop includes:
This chapter also discusses customizations that the migration tools do not migrate automatically and the steps you need to take to migrate these customizations.
This chapter contains the following sections:
Desktop Pre-Migration Issues and TasksThis section describes manual tasks that you may need to carry out before running the export tool.
Ensuring Files are Migrated
The installation of Sun ONE Portal Server 6.2 creates the BaseDir/SUNWps/migration/modules/desktop/migrate_files.txt file containing the default location of the notes provider text file. If you have moved files to non-default locations (for example, locations other than the public_html and templates directories), or if you have created a provider similar to the notes provider, you must add file system directories or files to the migrate_files.txt file before running the export tool in order to have them migrated. Files and resources listed in the migrate_files.txt are not translated. They are migrated “as is.”
Using the Export ToolThe export tool, exportps, stores data from the Sun ONE Portal Server 3.0 system to an export directory. To migrate the Sun ONE Portal Server 3.0 Desktop to Sun ONE Portal Server 6.2, you need to begin by running the export tool to gather the various Desktop data and store it to disk.
To Run the Export Tool
- On the Sun ONE Portal Server 3.0 system, change to the migration tool directory:
cd BaseDir/SUNWps/migration/bin/
- Run the exportps command:
./exportps [-a] [-p LDAP passphrase] [ExportDir]
Table 5-1 describes the options available for exporting the Sun ONE Portal Server 3.0 Desktop. This two-column table lists the options in the first column and their descriptions in the second column.
- The system displays a message similar to the following:
Which directory should be created to store the Portal Server system? [/tmp/psExport]
You see this prompt only if you do not specify the output directory on the command line. You can choose the default directory /tmp/psExport or enter the export directory.
Type the directory and press Enter.
- The system displays a message similar to the following:
Delete the directory /tmp/psExport?
You see this message only if there is already exported data in the ExportDir directory. If you have not already exported the Desktop, you may keep the export directory without risking any conflicts in the data. If you have already exported the Desktop, you should delete the directory to avoid conflicts.
- The system displays a message similar to the following:
Found iPS version 3.0sp5
Begin export process at Tue Jul 23 15:28:42 PDT 2003
Error file: /tmp/psExport/logs/error.20370
Report file: /tmp/psExport/logs/report.20370
Metrics file: /tmp/psExport/logs/export_metrics.20370
Export Menu:
1) LDAP Database
2) Desktop
3) Certificate Databases
4) All of the above
5) Exit
Select one of the listed options to export:
You see the export menu only if you do not specify the -a option.
- Type 2 and press Enter to export the Desktop only.
- The system displays the following message:
Enter the LDAP admin passphrase :
You see this prompt only if you select a full export using the -a option and you do not specify the -p LDAP passphrase option.
Type the LDAP admin passphrase and press Enter.
You see output similar to the following:
Copying templates and resource bundles
.......
Successful completion of export process at Tue Jul 23 15:29:41 PDT 2003
cd ExportDir
Substitute the export directory for ExportDir. If you used the default export directory, for example, use /tmp/psExport.
Type ls to see the directories and files created by the export tool.
Table 5-2 shows the directories and files created by the export tool. This two-column table lists the directories and files in the first column and their descriptions in the second column.
After the export has completed, or if you run into problems, check the ExportDir/logs directory for the report.PID, error.PID, and export_metrics.PID files (where PID is the process ID). The report.PID file contains actions the export tool has or has not taken. The error.PID file contains warnings or errors so that you can correct any problems. The export_metrics.PID file contains metrics detailing when various elements of the export tool started, stopped, and the total time it took to export the data. You can look at the stdout header to know which log and report files to examine for the exportps command you are running.
- Examine the exported data and manually change, before converting the data, all instances of the name of the Sun ONE Portal Server 3.0 system to the name of the Sun ONE Portal Server 6.2 system. If the port numbers on the two systems are different, you must change these manually as well.
If you are performing a single-system migration, server names will be the same, but port numbers will be different. You need to change port numbers manually before converting the data.
The migration tools do not modify server names and port numbers.
For example, in the following extract of the exported data in the ExportDir/config/platform.config file, you need to change manually all instances of host1.siroe.com, which is the name of the Sun ONE Portal Server 3.0 system, to the name of the Sun ONE Portal Server 6.2 system if the systems use different names. If the systems use different port numbers, you need to change them as well.
ips.defaultDomain=siroe.com
ips.server.protocol=http
ips.server.host=host1.siroe.com
ips.server.port=8080
ips.profile.host=host1.siroe.com
ips.profile.port=8080
ips.gateway.protocol=https
ips.gateway.host=host1.siroe.com
ips.gateway.port=443
ips.gateway.trust_all_server_certs=false
ips.virtualhost=host1.siroe.com 192.18.66.42
ips.naming.url=http://host1.siroe.com:8080/namingservice
ips.notification.url=http://host1.siroe.com:8080/
notificationservice
- If you have customized Sun ONE Portal Server 3.0 iwtLogin provider templates, you should modify the display*.html templates in Sun ONE Portal Server 6.2 before migrating your templates. The migrated iwtLoginProvider channel uses the Sun ONE Portal Server 6.2 Login templates.
If you do not modify the display*.html templates in Sun ONE Portal Server 6.2 before migrating the templates, you will need to update the Login templates with your Sun ONE Portal Server 3.0 customizations.
- Because the Sun ONE Portal Server 3.0 iwtLoginProvider templates are not being migrated, the Sun ONE Portal Server 6.2 templates must be manually edited.
Using the Conversion ToolThe conversion tool, convertps, enables you to select which data to convert from the data exported from a valid installation of Sun ONE Portal Server 3.0. Because the conversion tool runs on the Sun ONE Portal Server 6.2 system, you need to move the export directory from the Sun ONE Portal Server 3.0 system to the Sun ONE Portal Server 6.2 system.
To Run the Conversion Tool
- On the Sun ONE Portal Server 3.0 system, change to the directory above the export directory containing the data output by the export tool.
For example, if you used the default directory (/tmp/psExport) for exporting the Desktop, you would type:
cd /tmp
- Save the export directory using the tar command. For example:
tar cvf export.tar psExport
- Use an FTP program to transfer the export.tar file to the Sun ONE Portal Server 6.2 system.
- Extract the files from export.tar using the tar command. For example:
tar xvf export.tar
- On the Sun ONE Portal Server 6.2 system, change to the migration tool directory:
cd BaseDir/SUNWps/migration/bin
- Run the convertps command:
./convertps [-a] [-f] [-i ExportDir] [-o ImportDir]
Table 5-3 describes the options available for the convertps command. This two-column table lists the options in the first column and their descriptions in the second column.
- The system displays the following messages:
Found Portal Server version 6.2
Enter Identity Server Internal LDAP Authentication User password:
Type in a valid password.
Which directory should be created to store the converted data? [/tmp/psImport]
You see this prompt only if you do not specify the output directory using the -o ImportDir option. You can choose the default directory or enter another import directory.
Import directory /tmp/psImport already exists.
If you do not wish to overwrite data within this directory, please exit this migration process and rename the directory.
Delete the directory /tmp/psImport?
You see the message about an existing import directory only if the import directory already contains converted data. If you have already converted the Desktop, you should exit this migration process by pressing Ctrl-C and rename the directory before converting the data.
- After you choose the output directory, you see output similar to the following:
Begin conversion process at Wed Jul 24 15:19:34 PDT 2003
Error file: /tmp/psImport/logs/error.28128
Report file: /tmp/psImport/logs/report.28128
Metrics file: /tmp/psImport/logs/convert_metrics.28128
Conversion Menu
1) LDAP Database
2) Gateway Rules to Rewriter Rules
3) Desktop
4) Certificate Databases
5) All of the above
6) Exit
Select one of the listed options to convert:
You see the conversion menu only if you do not specify the -a option.
- Type 3 and press Enter to convert only the Desktop.
The system displays messages similar to the following:
*** Extracting templates ***
*****
Begin desktop conversion process at Wed Jul 24 15:36:06 PDT 2003
*** Converting templates ***
*** Converting jsp ***
*** Converting soft links ***
*** Converting resource bundles ***
*** Converting static web content ***
End desktop conversion process at Wed Jul 24 15:38:13 PDT 2003
Successful completion of conversion process at Wed Jul 24 15:38:13 PDT 2003
- Change to the import directory making sure to substitute the import directory that you selected in Step 7. For example:
cd ImportDir
Substitute the import directory for ImportDir. If you used the default import directory, for example, use /tmp/psImport.
- Type ls to see the directories and files created by the conversion tool.
Table 5-4 shows the directories and files created by the conversion tool when converting the Desktop. This two-column table lists the directories and files in the first column and their descriptions in the second column.
After the conversion has completed, or if you run into problems, check the ImportDir/logs directory for the report.PID, error.PID, and convert_metrics.PID files (where PID is the process ID). The report.PID file contains actions the conversion tool has or has not taken and also alerts you to any customizations which you need to convert manually. The error.PID file contains warnings or errors so that you can correct any problems. The convert_metrics.PID file contains metrics detailing when various elements of the conversion tool started, stopped, and the total time it took to convert the data. You can look at the stdout header to know which log and report files to examine for the convertps command you are running.
- If you run the convertps tool again in order to convert data other than the Desktop, the tool will prompt you to delete the import directory. Type no if you wish to keep the Desktop data you have already converted.
Using the Import ToolThe import tool, importps, enables you to import the data exported and converted using the export and conversion tools to a Sun ONE Portal Server 6.2 system. The import tool searches for a directory containing valid data created by the conversion tool.
To Run the Import Tool
- On the Sun ONE Portal Server 6.2 system, change to the import tool directory. For example:
cd BaseDir/SUNWps/migration/bin
- Run the importps command:
./importps [-a] [-k] [-m] [ImportDir]
Table 5-5 describes the options available for importing the Desktop. This two-column table lists the options in the first column and their descriptions in the second column.
- The system displays messages similar to the following:
Found Portal Server version 6.2
Enter Identity Server Internal LDAP Authentication User password:
Type in a valid password.
Enter Appserver Administrator password.
You see this prompt only if you are migrating onto a Sun ONE Application Server web container.
Begin import process at Thu Jul 25 16:20:40 PDT 2003
Error file: /tmp/psImport/logs/importerror.2560
Report file: /tmp/psImport/logs/importreport.2560
Metrics file: /tmp/psImport/logs/import_metrics.2560
Import Menu:
1) LDAP Database
2) Rewriter Rules
3) Desktop
4) Certificate Databases
5) All of the above
6) Exit
You see the import menu only if you do not specify the -a option.
- Type 3 and press Enter to import only the Desktop.
The system displays messages similar to the following:
Extracting desktop templates
Extracting locale resource bundles
Extracting static webserver data
Redeploying portal web application
Deploying to instance host1.siroe.com...
Successful completion of import process at Thu Jul 25 16:25:30 PDT 2003
After the import has completed, or if you run into problems, check the ImportDir/logs directory for the importreport.PID, importerror.PID, and import_metrics.PID files (where PID is the process ID). The importreport.PID file contains actions the import tool has or has not taken and also alerts you to any customizations which you need to import manually. The importerror.PID file contains warnings or errors so that you can correct any problems. The import_metrics.PID file contains metrics detailing when various elements of the import tool started, stopped, and the total time it took to import the data. You can look at the stdout header to know which log and report files to examine for the importps command you are running.
Desktop Post-Migration Issues and TasksDepending on customizations you have made to the Sun ONE Portal Server 3.0 Desktop and depending on your personal preferences, you may need to perform manual steps to your Sun ONE Portal Server 6.2 system after migrating the Desktop.
This section describes post migration issues and tasks you may need to perform after migrating the Desktop.
Desktop Links and Colors
If you are using a tabbed Desktop, after you migrate the Desktop from Sun ONE Portal Server 3.0 to Sun ONE Portal Server 6.2, the links and colors on the Desktop in Sun ONE Portal Server 6.2 are different from the links and colors on the Desktop in Sun ONE Portal Server 3.0. This section describes these differences.
Links
In Sun ONE Portal Server 3.0, the Desktop links are:
Home | Options | Contents | Layout | Help | Log Out
After migrating the Sun ONE Portal Server 3.0 Desktop to Sun ONE Portal Server 6.2, if using the tabbed Desktop, the Desktop has the following links:
Home | Tabs | Options | Theme | Help | Log Out
Under each tab, there is a link for Content and Layout.
Colors
If you are using a tabbed Desktop, after you migrate from Sun ONE Portal Server 3.0 to Sun ONE Portal Server 6.2, the background is navy blue rather than black. This is because the Sun ONE Portal Server 6.2 menubar template for the tabbed Desktop is used. There is no one-to-one mapping between the Sun ONE Portal Server 3.0 iwtDesktop and the Sun ONE Portal Server 6.2 TemplateTabContainer, TemplateTabContainerProvider, and each TemplateTabCustomTableContainerProvider. Therefore the customization of the tabbed Desktop menubar.template and each tab subcontainer is a manual process after migration. After migration, each tab’s Content and Layout links should be manually removed.
Background Color of the Channel Title Bar Does Not Line up with the Channel Border
Channels without action icons such as Help, Edit, and so on, do not align correctly with the channel content in Netscape 4.x. To resolve this problem, for each template container, modify providerWrapper.template by adding a non-breaking space before the provider commands tag. For example, instead of:
<TD BGCOLOR="#666699" NOWRAP>
<P ALIGN=RIGHT>
[tag:provider_cmds]
</TD>
you should use:
<TD BGCOLOR="#666699" NOWRAP>
<P ALIGN=RIGHT>
[tag:provider_cmds]
</TD>
If this is a tabbed Desktop, modify TemplateTabCustomTableContainerProvider/providerWrapper.template for each template type. You may need to modify other containers depending on your deployment.
Duplicate Portal Server / Sun ONE Portal Server Banner
It is possible, after importing with the -m option, that you will see duplicate Portal Server and Sun ONE Portal Server banners with Desktop links. This can happen when the Samples tab is looking for a SamplesTemplatePanelContainer directory in the XML documents. When it cannot find this directory it then uses the provider directory which is the TemplateTabContainerProvider. The HTML in this directory includes the additional banner. To prevent this from happening, you can simply copy an existing panel container, such as MyFrontPageTemplatePanelContainer, to SamplesTemplatePanelContainer. This will resolve this issue.
RSS Channel Does Not Display Content
The RSS channel may not display content if the channel’s display profile URL attribute value retrieves content from an external system (not the portal server itself).
To resolve this issue, take the following steps:
- On the remote host, add the entry Content-Type=text/xml File Suffix=rdf,xml to the web server’s configuration mime.types, file. For example:
type=text/xml exts=rdf,xml
- Restart the web server on the remote host. For example:
BaseDir/SUNWips/bin/ipsserver start
or
/etc/init.d/ipsserver start
- On the portal server host, add the following rule to the idsruleset:
<TagText tag="url" attributePatterns="" />
JavaScript Error
When using the Sun ONE Portal Server 6.2 menubar.template a JavaScript error is thrown because the Logout link expects to find the JavaScript function closePopup.
Online Help Is Not Localized
After a successful data migration, the channel help URLs will not have the locale in the URL. For example, the URLs will be similar to:
http://host/portal/docs/online_help/...
To localize the online help, update the display profile documents and provide the correct <ConditionalProperties> definition. For example, for the locale en_US use the <ConditionalProperties> definition to define the helpURL as:
<ConditionalProperties condition="locale" value="en">
<ConditionalProperties condition="locale" value="US">
<String name="helpURL"
value="online_help/user_help/desktop/desktopTOC.html"
advanced="true"/></ConditionalProperties>
</ConditionalProperties>
After defining the helpURL, the Desktop Channel Help URL will be similar to:
http://host/portal/docs/en_US/online_help/...
Writing Data Migration ModulesSee Appendix B, "Sun ONE Portal Server 3.0 Data Migration Module Author's Guide" for information on writing your own data migration modules.
Migrating Custom Channels and Custom ProvidersThis section discusses the steps you must take to migrate custom channels and custom providers from Sun ONE Portal Server 3.0 to Sun ONE Portal Server 6.2. In addition to following the steps for migrating the Desktop discussed in this chapter, manual changes to provider code are necessary for your custom providers to work in Sun ONE Portal Server 6.2. You will need to read the Sun ONE Portal Server 6.0 Desktop Customization Guide and the Javadocs for the Sun ONE Portal Server 6.2 Desktop in order to understand what you need to do.
Overview of the Process of Migrating Custom Providers
- Run the export tool on the Sun ONE Portal Server 3.0 system.
- Run the conversion tool on the Sun ONE Portal Server 6.2 system.
- Run the import tool on the Sun ONE Portal Server 6.2 system.
- Copy the custom Java files to a working directory where you can compile against the new install jar files.
- Follow the steps in the section on Making Manual Changes to Provider Code to rework code manually.
- Compile using javac or Forte for Java, after importing the appropriate jar.
- Add compiled provider classes to the classes directory.
- Add any utility jar files to the classes directory.
You do not have to restart the server because the class loader will pick up the new classes.
Research and Planning
This section discusses research and planning recommendations that you should follow before migrating custom channels and custom providers.
Reading Documentation
Take the time to read the Sun ONE Portal Server 6.2 documentation, Sun ONE Portal Server 6.2 APIs, Sun ONE Identity Server 6.1, and Sun ONE Identity Server SDK and API documentation.
Training Your Staff
The documentation for Sun ONE Portal Server 6.2 and Sun ONE Identity Server 6.1 is extensive and serves as a great starting point to help you migrate to Sun ONE Portal Server 6.2. You may also wish to take advantage of any training available for Sun ONE Portal Server 6.2 and Sun ONE Identity Server 6.1.
Defining the Features of Sun ONE Portal Server 6.2 You Plan to Use
After reading the available documentation and attending any subsequent training, the next recommended step is to take into account all the new features you want your providers to take advantage of as you plan to migrate them. For instance, the non-tabbed Desktop is migrated to a TemplateTableContainer and the tabbed Desktop is migrated to a TemplateTabContainer.
Taking Inventory of Custom Provider Code Used in Your Sun ONE Portal Server 3.0 Deployment
You should create an inventory of custom provider code used in your Sun ONE Portal Server 3.0 deployment. This inventory is useful when initiating a project plan for migrating custom provider code and should account for ascertaining the answers to some preliminary questions like:
- Why was the code written?
- What does the code accomplish?
- Who is available, as a knowledge resource, for questions about the code?
- Where is the latest source code?
- Who is the resource to make the necessary modifications?
- Was the code written to address any discrepancies in the Sun ONE Portal Server 3.0 APIs that the new and expanded Sun ONE Portal Server 6.2 APIs might address?
Initiating a Project Plan for Ensuring Custom Provider Conversion
In order to accomplish conversion of custom providers from Sun ONE Portal Server 3.0 to Sun ONE Portal Server 6.2, it is recommended that a project plan be developed that indicates milestones, tasks, and resources necessary to smooth the transition of these providers.
Preparing Your Test Environment
In order to migrate custom providers, you should set up a test environment of Sun ONE Portal Server 6.2. This can be done on the same system as your Sun ONE Portal Server 3.0 test environment or on a clean system.
Running the Migration Tools
Once your Sun ONE Portal Server 6.2 system is set up, you should run the migration tools as documented in this guide. This will migrate the provider's LDAP data (including custom provider attributes), provider templates, and so on to the Sun ONE Portal Server 6.2 environment.
Validating Custom Provider Data Migration
After migrating from Sun ONE Portal Server 3.0, you should see the following items already migrated for your custom providers by the tools:
- XML files. Sun ONE Portal Server 3.0 channel and provider definitions are migrated to Sun ONE Portal Server 6.2 as channel and provider definitions in the display profile documents. Sun ONE Portal Server 3.0 providers are migrated to the Sun ONE Portal Server 6.2 root suffix global display profile document. This is configurable in the admin console. See the Sun ONE Portal Server 6.2 Administrator’s Guide for information about the admin console.
- Template files. The templates have been migrated. They exist in /etc/opt/SUNWps/desktop/default/originalProviderName.
- Properties files. The properties files are migrated and deployed in BaseDir/SUNWps/web-src/WEB-INF/classes. The property files normally have the same name as the provider name. If a different name is used, you should use the getResourceBundle(theSpecificName) method in the provider code to get the resource bundle.
Making Manual Changes to Provider Code
This section discusses the steps you need to follow in order to change provider code manually so that your Sun ONE Portal Server 3.0 custom providers work in Sun ONE Portal Server 6.2. You will need to read the Javadocs for the Sun ONE Portal Server 6.2 Desktop in order to make these correctly.
- Move your source code to the Sun ONE Portal Server 6.2 system if it is different from the Sun ONE Portal Server 3.0 system. The classes directory is specified in the /etc/opt/SUNWps/desktop/desktopconfig.properties file. By default, the directory is BaseDir/SUNWps/desktop/classes.
- Set your CLASSPATH environment variable. Before compilation you need to change your CLASSPATH setting to include the Desktop SDK jar, for example:
CLASSPATH: BaseDir/SUNWps/sdk/desktop/desktopsdk.jar
If you are using any Sun ONE Identity Server APIs directly, you may also need to include the Sun ONE Identity Server SDK.
Include any other Java classes and jar files that your custom provider code relies on.
- Change import statements by removing:
- Use the new debug by making the following changes:
- Change getStringProperty calls by removing the first string in the signature, component, by changing from:
getStringProperty(component, tag, default)
to:
getStringProperty(tag, default)
Another API which enables you to get the localized version of the string from the display profile is getStringProperty(tag, default, true);.
You can also use methods such as getBooleanProperty and getIntegerProperty, which deal with Boolean and integer values.
- Wrap getStringProperty calls with try/catch for ProviderContextException. getStringProperty throws ProviderException.
- Change calls to getResourceBundle so they are wrapped in a try block that catches the ProviderException.
- Remove the store() method. This has been eliminated because getStringProperty and others have been extended to encompass this functionality.
- Changes to getContent(Map) are optional. See the provider API documentation.
- Compile your code. Use the javac command line script to compile your code. Then, discover and fix any errors. There will most likely be errors that involve the specifics of your custom provider.
- Verify your migrated custom providers by checking:
- That the channel properties in the display profile have been migrated correctly.
- That users can log in and the migrated channels based on the custom provider are available on the Desktop.
- That the custom provider has no errors in normal operation (display of content, edit, help, and so on). You can check logs in /var/opt/SUNWam/debug/.
- That your channel’s attributes based on the custom provider can be administered via the Sun ONE Portal Server 6.2 admin console and that changing these attributes has no adverse affect for your users.
- Desktop errors located in the /var/opt/SUNWam/debug/desktop.debug file and other errors located in files with corresponding names in that directory.
Common Errors Encountered and Recommended Fixes
The list below includes common errors that you may encounter when compiling your custom providers via the javac command-line script. It includes answers to these issues as known to date.
- A warning message indicates that Sun ONE Portal Server 6.2 - PAPI Class(es) not found.
- Did you modify your import statements to account for changes to Portal Server 6.2 - PAPI? See Step 3 in the section on Making Manual Changes to Provider Code.
- Did you update your CLASSPATH? See Step 2 in the section on Making Manual Changes to Provider Code.
- A warning message indicates a class or a method in the Sun ONE Portal Server 6.2 - PAPI has changed or been deprecated.
- A warning message indicates that a class is no longer available.
- A warning message indicates that a method signature is not found.
- Check the PAPI for deprecated or removed methods. In some instances, the methods have moved to a different class because they have been categorized differently. In other cases, the signature, such as getStringProperty has changed. See, for example, Step 8 in the section on Making Manual Changes to Provider Code.
Information About Channel Migration
For any channel, these are the other important components:
- The properties files, including custom provider properties files are migrated and located in BaseDir/SUNWps/web-src/WEB-INF/classes.
- The template files are migrated to /etc/opt/SUNWps/desktop/default/originalProviderName.
- The XML files are migrated. Sun ONE Portal Server 3.0 channel and provider definitions are migrated to Sun ONE Portal Server 6.2 as channel and provider definitions in the display profile documents. Depending on the customizations you have made, Sun ONE Portal Server 3.0 channels are generally migrated to organization, suborganization or role, and user level display profile documents. This includes available and selected channel lists for the Desktop container. You can access the display profile through the admin console.
Example Custom Provider: Manual Code Changes for Migration