You can create a custom portal using Sun GlassFish Web Space Server. The following are the two scenarios for migrating to the production environment:
Moving from development to production
The development team working on customization of Web Space Server want to go live with the product after deploying it to the production server.
Deploying content from staging to production
After the production server is successfully commissioned, further enhancements to the content of the production system can be realized using Staging and Workflow.
During the development phase a team of developers would collaborate and work on customization of Web Space Server. Customization might include creating or modifying portlets, hooks, themes, layouts and pages. Out of all these artifacts, the pages are stored in the database while others can be deployed in WAR file format. For the first time production cut-over, the database from the development environment can be exported and imported into the production environment.
The following is the process involved:
Generate the WAR files for custom portlets, themes, layouts and hooks and deploy them to the production Web Space Server. These WAR files need to be placed in the hot deploy area.
Export the database from the development environment.
Import the database that has been exported in the previous step into the production environment.
In this scenario, the content can be developed in the staging environment and can be published to the production server. The WebSpace server provides a “Staging” feature for Community and Organization pages to address this requirement.
Essentially, the community and organization "staging" feature provides an option to deploy pages to the same server. Meaning, an administrator can review the page changes before publishing them and the publishing can be scheduled. In addition, a workflow can be attached to the process so the changes can be approved by an authority.
In the "Manage Pages" there is an option for "Publish to Remote" which would actually deploy the pages to a remote server. This can be the process for promoting the content that is developed in the "staging/development" environment to the production system.
You can “Stage” pages on the production server before they are published to live. This can also include the "approval process" of different levels of authority.
Here is how it works:
Log in to Web Space Server as admin user.
Administrator or the owner of a community or an organization can enable Activate Staging via Manage Pages from the Control Panel.
Once staging is enabled, a user with appropriate privileges can add/modify pages and the content to pages and publish them when they are finalized. During the development of the pages while in the staging, live pages are not affected, and no changes are visible on live pages.
Log in to Web Space Server as admin user.
Administrator or the owner of a community or organization can enable Activate Staging and Activate Workflow via Manage Pages from the Control Panel.
Choose the number of stages for the Workflow. Default is 3.
Specify the roles for each stage of approval process. Administrator can create the roles with scope and permissions on the My Community portlet. For Content Creator Community Role assign the Manage Pages role from the Define Permissions option.
A Content Creator can create pages and submit the proposal. Once the pages are approved through the approval chain, the final approver can publish the page to live system.
Remote publishing allows publishing pages from a staging server (a staging server where the pages are approved and published locally) to production server. When using the remote publishing, the user who is publishing remotely must have a user account on both servers with the same email address and password.
The production server (where the pages are published to) must be configured to accept connections from the staging server.
For example, the following entry in portal-ext.properties would allow the remote publishing from IP address 192.18.123.38.
tunnel.servlet.hosts.allowed=127.0.0.1,SERVER_IP,192.18.123.38
If you have deployed the OpenSSO add-on, web.xml for the tunnel-web application should be configured in such a way that "Liferay Servlet Filter" and "Secure Liferay Servlet Filter" are using the default filter which is com.liferay.portal.servlet.filters.secure.SecureFilter instead of the filter that ships with the add-on which is com.sun.portal.servlet.filters.soo.accessmanager.BasicAuthFilter.
The remote publishing feature is very useful when staging and production environments are "connected". In case, they are not connected, meaning the network firewall prevents any connections from staging to production due to the company's security policy then the remote publishing will not be an option. In this event, the pages can be promoted to the production "offline".
After the pages and its content are finalized, an administrator can "export" the pages from staging environment which will generate a lar file. The same can be copied over to the production server and imported into its corresponding community/organization. The "Manage Pages" option for a community/organization contains a tab for "Export/Import" which allows an administrator to export or import the page including its content, permissions and the like.
This section discusses the procedure for activating staging and workflow for Communities and Organizations, and publishing their pages to live.
Admin user can activate staging for Communities and Organizations. When you activate staging for Communities or Organizations, you can preview their pages and make changes to them before publishing them to live production environment.
For the procedure to create a new Community, see To add a Community. The following procedure explains how you can stage Communities. You can stage Organizations by following the similar procedure.
Log in to Sun GlassFish Web Space Server as admin user.
Choose Add Application from the Welcome menu, and add My Communities portlet to your page.
Click the Communities I Own tab on the My Communities portlet.
To stage a Community, click the Actions button corresponding to a Community and choose Manage Pages from the menu.
In this example, choose the 'cms' Community.
Click the Settings tab, and enable the Activate Staging option.
The community is staged to the production environment.
Choose My Places from the Welcome menu and navigate to a page on the community.
A live page for 'cms' is displayed.
To view the staged page, choose Staging -> View Staged Page from the Welcome menu.
To publish the page to live, choose Staging -> Publish to Live from the Welcome menu.
To view the live page, choose Staging -> View Live Page from the Welcome menu.
The Publish To Live window appears.
Select the pages you want to publish and click Publish.
A dialog box with the message “Are you sure you want to publish these pages?” appears.
Click OK to publish the selected pages.