Parallels H-Sphere Documentation Developer Guide

 

Adding Custom MS Exchange Plans into H-Sphere

(H-Sphere 2.5 and up)
 
 

Related Docs:   MS Exchange Hosting (Admin Guide) Creating Mail Plan on MPS Server (Sysadmin Guide)

Last modified: 28 Dec 2007

 

WARNING: This documentation covers Parallels H-Sphere versions up to 3.1. For the latest up-to-date Parallels H-Sphere documentation, please proceed to the official Parallels site.

Since version 2.5 H-Sphere provides integration with Microsoft Exchange mail hosting plans. The following four default MS Exchange plans are already included into H-Sphere as resources:

  • Base Mail
  • Gold Mail
  • Platinum Mail
  • Platinum Mail Pro

H-Sphere admin can also import more plans created on MS Exchange server into H-Sphere as MS Exchange hosting resources. This document is an example of a step-by-step procedure on how to do it:

  1. Create custom msExchangePlans.xml file with description of your new custom MsExchange plan (it will be merged with the standard msExchangePlans.xml):

    <plans>
       <plan type="new_plan">
          <planName>NewPlanName</planName>
          <planDescription>New MS Exchange Plan Name</planDescription>
          <planFeatures>
    . . . .
             <feature>
                <featureName>some_feature</featureName>
                <featureDescription>This feature's description</featureDescription>
                <featureValue>some_value</featureValue>
             </feature>
    . . . .
          </planFeatures>
       </plan>
    </plans>

    and the msexchange.xml file that will be merged with the standard hsphere plan wizard xml (msexchange.xml):

    <PlanWizard name="msexchange" description="planeditor.res_msexchange">
    <categories>
       <category description="planeditor.other">
          <resource name="new_plan" required="1" class="psoft.hsphere.resource.mpf.hostedexchange.HostedExchangePlan"/>
       </category>
    </categories>
    <resources>
       <res_bizuser>
          <mod name="new_plan">
             <initresource name="new_plan"/>
          </mod>
       </res_bizuser>
    </resources>
    </PlanWizard>

    where new_plan is the name of the MS Exchange hosting plan you are adding. This name must not exceed 10 symbols.

    Notes:

    • Don't copy content of the existing standard HS MsExchange plan xml file.
    • H-Sphere 2.5 Beta 4 and up implements a Java utility that fetches this information from MS Exchange hosting server:

      java psoft.hsphere.tools.HePlanExctractor

      This utility prints XML output with properties of all available MS Exchange hosting plans. Or, you can obtain plan features in XML form in the HostedExchange Web interface under the GetPlanDetail service.

    More on how to merge xml configuration files

  2. Log into the CP server as cpanel user.

  3. Create a special location where you will assemble and build a package describing your MsExchange plan, for example, ~cpanel/shiva/custom/Packages:

    mkdir ~cpanel/shiva/custom/Packages

  4. Run package configurator:

    cd ~cpanel/shiva/custom/Packages
    java psoft.hsp.tools.PkgConfigurator --with-prefix=./ms_customization --with-xmls --with-properties --with-sql

    Package configurator will create the ms_customization directory, which includes the following structure:

    src/pkg_config/ - directory with default.properties file
    src/pkg_xmls/ - directory directory where you will place msExchangePlans.xml and msexchange.xml
    src/_pkg.xml - file to set package name, version, build, vendor and description
    src/_SCRIPTS/_pkg.sql - file to add the SQL query that will be executed during the package installation
  5. Set the package name, version, build, vendor, description in src/_pkg.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <pkg build="00" description="Description for test package" info="Additional information" name="MSExchangeCustomization"
    vendor="Vendor" version="00.00.00">
    <xmls src="pkg_xmls/"/>
    <config path="pkg_config/default.properties"/>

    Package name can't contain spaces and special characters.

  6. Edit src/_SCRIPTS/_pkg.sql. Add the following line into it:
    INSERT INTO type_name (id, name, price, description, rprice) VALUES ('resource_type_id', 'new_plan', 'RFS', 'resource_type_description', 'RFS');
    where:
    - 'resource_type_id' is an integer from the range 20100-21490, unique in the type_name.
    - 'new_plan' is a resource type name, up to 10 symbols string without spaces.
    - 'resource_type_description', string. This is your plan description.
    - 'RFS' - price type, should be 'RFS' for all MS Exchange plans you add.

    For example, a standart MS Exchange plan will have the following records:

    hsphere=# SELECT * from type_name where description like 'Hosted Exchange%';
    id | name | price | description | rprice | required | priority | ttl
    ------+------------+-------+-----------------------------------------+--------+----------+----------+-----
    7222 | plat_mailp | RFS | Hosted Exchange Platinum Mail Plus Plan | RFS | | |
    7219 | base_mail | RFS | Hosted Exchange Base Mail Plan | RFS | | |
    7221 | plat_mail | RFS | Hosted Exchange Platinum Mail Plan | RFS | | |
    7220 | gold_mail | RFS | Hosted Exchange Gold Mail Plan | RFS | | |

  7. Copy the prepared msExchangePlans.xml and msexchange.xml files to ms_cutomization/src/pkg_xmls/:

    cp /some/location/msExchangePlans.xml ~cpanel/shiva/custom/Packages/ms_customization/src/pkg_xmls/
    cp /some/location/msexchange.xml ~cpanel/shiva/custom/Packages/ms_customization/src/pkg_xmls/

  8. Edit src/pkg_config/default.properties:

    1. Add properties that specify location of xml file implemented in this package:

      PLAN_WIZARDS_DIR=.
      HOSTED_EXCHANGE_PLANS = msExchangePlans.xml

    2. Return from the package directory and run package builder:

      cd ~cpanel/shiva/custom/Packages
      java psoft.hsp.tools.PkgBuilder --with-source=ms_customization

      The hsp package, for example MSExchangeCustomization-00.00.00-01.hsp will be created in the directory. It is ready to be installed on any H-Sphere 2.5 and up.


Related Docs:   MS Exchange Hosting (Admin Guide) Creating Mail Plan on MPS Server (Sysadmin Guide)



© Copyright 2017. Parallels Holdings. All rights reserved.