Why use this deployment scenario?
- This scenario is useful if the developer machines don't have the resources required to run a local Portal server.
- Deploying to a remote portal server allows multiple members of the development team to deploy their portlet applications to a common portal server.
- Deploying to a remote portal server allows for development on a portal server that will more closely resemble the production server.
Description of the scenario
- The development WAR is deployed to a remote WebSphere Portal server.
- The portlet WAR is also deployed to a remote WebSphere Portal server.
- Map a drive on the local machine to the remote machine that will run the portal server.
- Create a new project.
- On the Project Name page of the wizard, enter a name for your project. Click Next.
- On the Add Feature Sets page of the wizard, check off the feature sets you want in your project. Click Next.
- On the Java Settings page of the wizard, accept the defaults. Click Next.
- On the Deployment Configuration screen, click the Add button for the Application Server Deployment Configuration.
- Enter a name for the configuration. Make it descriptive since you will be able to reuse this configuration for other projects.
- Enter a description for this configuration. Provide information about this configuration for future reference.
- Select the server type, either WebSphere Application server 5.x or WebSphere Application server 6.x
- Installed Applications directory will default to C:\ibm\WebSphere\profiles\wp_profile\installedApps\ for WebSphere Portal 6.x and C:\Program Files\WebSphere\AppServer\installedApps\ for WebSphere Portal 5.x. Use the path from your mapped drive. For example Y:\ibm\WebSphere\profiles\wp_profile\installedApps\
- If you remove the string and click the choose button, the file browser should open to the installedApps directory on your remote server, if you installed WebSphere with defaults. From here, expand the installedApps directory and select the cell name. Click Ok in the file browser.
- Set the name of the host.
- Enter a new port number only if you know it is different from the default. The default for this configuration is 10038.
- Uncheck Auto Deploy. Auto deploy of the development WAR is not supported.
- Click the Add button for the Portal Server Deployment Configuration.
- Select the server type, either WebSphere Portal 5.x or WebSphere Portal 6.x
- Select a portlet API setting.
- Select the path to the WPRoot using the mapped drive. This is the path to the "PortalServer" folder.
- If you selected WebSphere Native (deprecated) you will have to enter the location to the pbportlet.jar file.
- Auto Deploy can be left checked.
- Enter the path to your JRE Home.
- Enter values for admin URL, admin user and admin password.
- Click the test server connection button to confirm that you have used the correct username and password. Click ok when the results are displayed.
- Click finish. The project will be created and ask if you want to deploy now. Click no. Since you need to deploy the development WAR manually, there is no reason to have the wizard attempt to deploy.
Deploy the development WAR
- Ensure that both "server1" and the portal server are running on the remote machine.
- Logon to WAS Admin Console as the WAS administrator (e.g. "https://(your server name):10003/ibm/console/logon.jsp").
- Click "Applications" in the navigation panel on the left which will expand it, then click on the "Install New Application" link.
- In the "Enterprise Applications" section of the web page, for the "Path to the new ap plication", select "Local file system", and click the "Browse" button for the "Specify path" field. Navigate to the development EAR under installableApps where you specified your development EAR during project creation, select your EAR and click "Open". For example: "C:\ibm\WebSphere\profiles\wp_profile\installableApps(yournodename)" ("yourWP6.ear"), then click "Next".
- In the "Choose to generate default bindings and mappings" panel, click "Next".
- In the "Specify options for installing enterprise applications and modules" panel, for the "Step 1: Select installation options", click "Next".
- In the "Step 2: Map modules to servers", select the Portal server by selecting "WebSphere:cell=(your cell),node=(your node),server=WebSphere_Portal" from the list of Clusters and Servers, select the Module "IBM WebSphere Portlet Factory", and click "Apply", (assure the "Server" in the table reflects "WebSphere_Portal"), then click "Next".
- In the "Step 3: Map virtual hosts for Web modules", click "Next".
- In the "Step 4: Map security roles to users/groups, click "Next".
- In the "Step 5: Summary", click "Finish".
- Installation will proceed (this will take a few minutes"), then click "Save to master configuration", and then, when prompted to Save, click the "Save" button.
- You can shut down server1. Since the development WAR is now deployed to WebSphere_Portal, you only need to run the portal server.
- Restart the Portal server in order to start the WPF application.
- Create a new model.
- Right click on an open model. Click Run As > Run.
- Create a new model configuration.
- Click the Run button and verify that the model renders correctly.
Deploy the Portlet WAR
- Add a new model to the project with a Portlet Adapter. Provide a name and title for the Portlet Adapter.
- Right click on the project in the WPF designer.
- Select Build Portlet Factory WAR > Build Portlet WAR
- This will build the portlet WAR and automatically deploy it.
- Verify that the portlet model you created is available to be added to a page.