Showing posts with label Virtual portal. Show all posts
Showing posts with label Virtual portal. Show all posts

What is Virtual Portal and and what are the steps for creating a Virtual Portal?

What is Virtual Portal ?

Virtual Portals (VP) are logical portals that share the same WebSphere Portal Server hardware and software installation. WebSphere portal gives its users the ability to create multiple portals on single installation. Virtual portal is same as base portal (WebSphere Portal) which can run on same JVM. We can have as many as 150 (Yes, it's 150 :-) ) virtual portals in single installation as long as the system has enough resources to run those number of VP's. Every VP has its own unique URL such as (http://localhost:10039/wps/myportal/finance, http://localhost:10039/wps/myportal/hr and many more where finance and hr are the 2 different virtual portals with different URL's). It will be separate in all respects but share the same system resources of the server. We can also create shared or scoped resources for different virtual portals.

When to use Virtual Portal ?

  • If different departments in an enterprise want their own portal but they dont expect to use them heavily.
  • It is highly recommended that even if the enterprise is going to use one portal per installation once should always create one VP and work on that rather than playing around with default base portal (i.e. WebSphere_Portal).
 You can create a virtual portal in 2 different ways :

  1. By using Virtual Portal Manager Portlet
  2. By using create-virtual-portal task
Steps for creating a Virtual Portal using Virtual Portal Manager Portlet

Below are the simple steps for creating a virtual portal:

1. Logon to Portal admin console http://localhost:10039/wps/myportal/


Manage Virtual Portals
Manage Virtual Portals

2. Navigate to Virtual Portals -> Mange Virtual Portals at the bottom of console.


Manage Virtual Portals
Manage Virtual Portals


Manage Virtual Portals
Manage Virtual Portals
3. Click New Virtual portal and fill out the following information and click OK.

Title : VPortal
Description : Virtual Portal
URL Context : vpor
Host name : The host name of the virtual portal. This attribute is optional.
User realm : Leave it default or choose specific one you need (vpor)
Initial admin user group : Click search button besides it and click search on the next screen
and select one you need or select the default one. (wpsadmins)
Default theme : Select the default or leave it to IBM.

4. You will see a screen saying "Creating virtual portal..." and after few seconds virtual portal is created with the title specified above.

5. Click the portal created "VPortal" and you will see the the URL now changed with context we mentioned above i.e. /wps/myportal/vpor.



Manage Virtual Portals
Manage Virtual Portals

Here we go, you now have created the virtual portal. You can also refer the below article from IBM on virtual portals for more detailed information. 
http://publib.boulder.ibm.com/infocenter/wcmdoc/v6r0/index.jsp?topic=/com.ibm.lotus.wcm.doc/admin/advpref.html

Steps for creating a Virtual Portal using "create-virtual-portal" ConfigEngine task

We can use ConfigEngine task create-virtual-portal to create a virtual portal. This task will create a blank / empty virtual portal.


.\ConfigEngine.sh create-virtual-portal

Now If you want to use ConfigEngine task for creating a virtual portal then you have 2 options to set all the information required for creating a virtual portal.

Set all the configuration parameters on the command line using -D parameter

or 

Set all the values in \WebSphere\wp_profile\ConfigEngine\config\helpers\virtual_portal.properties file and pass absolute path of this properties file to ConfigEngine task using -DparentProperties=<Path of Properties file>

Exception occured while creating a Virtual Portal with same context path

If you delete a Virtual Portal and want to create another Virtual Portal with same context path immediately, you will might end up getting the following exception because database cleanup task runs only at a specified time so context path will reside in database till the cleanup happens.


"com.ibm.portal.WpsException: EJPEB0806E: Creating a virtual portal failed because a unique key constraint in the data back end was violated. Likely a virtual portal with the same context was deleted but still exists in the database. It is recommended to run the cleanup task for deleting resources by running the XML script Task.xml using the XML configuration interface."

To delete Virtual Portal Context path immediately, we have to run Task.xml file for Data store Cleanup.


Task.xml file is a scheduler file which runs at specified schedule time(once/daily/weekly/monthly). It performs Data store cleanup task(com.ibm.portal.data store.task.Resource Cleanup)

Location of Task.xml file : /IBM/WebSphere/PortalServer/doc/XML-samples

To overcome this exception we have to run cleanup task manually.

1. Navigate to following folder location "/IBM/WebSphere/wp_profile/PortalServer/bin" and execute the below command

xmlaccess.bat -in Task.xml -user wpsadmin -password wpsadmin -URL http://host:port/wps/config -out result.xml
2. After successfully running of the command, you can create new virtual portal with same context path.

Frequently used websphere portal config engine tasks

Below are some of the most commonly used WebSphere Portal ConfigEngine tasks that you must know either you are playing a role of Portal developer or administrator.

start-portal-server

This task is used to Start the portal server. Before executing this task make sure that the portal admin user id and password should be set in wkplc.properties.


./ConfigEngine.sh start-portal-server

stop-portal-server

This task is used to Stop the portal server. Before executing this task make sure that the portal admin user id and password should be set in wkplc.properties.


./ConfigEngine.sh stop-portal-server

activate-portlets

In a clustered environment when the new portlet is deployed, WebSphere Portal cannot guarantee that the portlet has been successfully synchronized to each node in the cluster and thus cannot automatically activate the portlet during deployment.

In order to fix this issue, you have to run this task to activate the deployed portlets and to synchronize the changes across all cluster members.


ConfigEngine.bat activate-portlets -DWasPassword=password task from the wp_profile_rootConfigEngine directory

configure-wcm-authoring

This task installs the WCM Authoring Portlet, Local Rendering Portlet and Web Content Manager Portal pages on top of base portal installation.


ConfigEngine.bat configure-wcm-authoring -DPortalAdminPwd=xxx -DWasPassword=xxx

Note that if the WCM Authoring portlet is invisible after running this task, try going into Portal Admin > Web Modules and make sure the modules for WCM are started.

create-virtual-portal

Use this task to create a new virtual portal.


ConfigEngine.sh create-virtual-portal

Additional custom parameters can be passed to the task depending upon your requirement, so please refer to the Virtual portals reference for more details.

delete-virtual-portal

This task is used to delete a virtual portal by using its object ID. To determine the correct object ID of the virtual portal, use the task list-all-virtual-portals.

modify-virtual-portal Use this task to modify a virtual portal by using its object ID. To determine the correct object ID of the virtual portal, use the task list-all-virtual-portals.

list-all-virtual-portals

This tasks lists all your virtual portals, together with the information like title / description / realm and object ID of virtual portal:


./ConfigEngine.sh list-all-virtual-portals

export-library-copy

This task exports a copy of a web content library. Refer this article Exporting and importing a web content library copy for more details.

export-wcm-data

This task exports a web content library. Several things need to be in place for this task to be executed properly, so please refer this article Exporting and importing web content libraries for more details.

import-library-copy

This task imports a copy of a web content library. Refer this article Exporting and importing a web content library copy for more details.

import-wcm-data

This task imports a web content library. Several things need to be in place for this task to be executed properly, so please refer this article Exporting and importing web content libraries for more details.

list-server-ports

This task list and the available server ports.


ConfigEngine.bat list-server-ports -DWasPassword=password

list-server-ports-by-name

This task list all the server ports by their name.

ConfigEngine.bat list-server-ports-by-name -DServerName=server1 -DWasPassword=password

ConfigEngine.bat list-server-ports-by-name -DServerName=WebSphere_Portal -DWasPassword=password

modify-servlet-path

Changes the default portal Uniform Resource Identifier (URI) after installation.


./ConfigEngine.sh modify-servlet-path -DPortalAdminPwd=password -DWasPassword=password

remove-wcm-authoring

This task uninstalls the WCM Authoring Portlet, Local Rendering Portlet and Web Content Manager Portal pages.

action-deploy-portlets-prereq.pzn

If you install Portal or WCM using the administration option, or base install, the Personalization features, including the Personalization Navigator and Personalization Editor, are not installed. However, you can add these features manually after installation by deploying the Personalization portlets and adding the Personalization Navigator and Personalization Editor to a page. This task deploys the personalization portlets.

UNIX:

./ConfigEngine.sh action-deploy-portlets-prereq.pzn -DPortalAdminPwd=<password> -DWasPassword=<password>

Windows:

ConfigEngine.bat action-deploy-portlets-prereq.pzn -DPortalAdminPwd=<password> -DWasPassword=<password>
Reference : https://wiki.base22.com/