Previous page

Next page

Locate page in Contents

Print this page

Packaging SugarCRM Application

Suga CRM Community Edition enables organizations to efficiently organize, populate, and maintain information on all aspects of their customer relationships. It is a bit more complex application then WordPress one. It consists of modules, each of which represents a specific functional aspect of CRM such as Accounts, Activities, Leads and Opportunities. These modules are designed to help managing customer accounts through each step of their lifecycle, starting with generating and qualifying leads to customer support and resolving reported bugs. The application is managed by administrator, who has power to regulate access for the application modules, customize the look and feel of the application across an organization. The application is accessed by users through Internet, so it requires a network access to be configured to a server that is running the Sugar software. SugarCRM uses GNU General Public License version 3 for the Sugar Community Edition. It requires the following components to be installed on server: PHP with memory limit 40Mb or higher, Apache and MySQL.

Note: above information is taken from application vendor home page.

Listed below are the sections of an APP-META.xml file supplied with your package:

  1. Type of environment. The application vendor states that Sugar CRM can be installed on shared hosting. So, we can draw a conclusion that the application is a multi-instance one.
  2. Model of service provisioning. The application is managed by administrator (top-level user) with access to each application module. It is possible to create more than one such user within one application instance. Administrator enables users and regulates their access rights. Still, all data is shared between users and stored within the application instance. So, Sugar Pro is a single-tenant or simple application and application files are simply copied to location dedicated to customer.
  3. Services hierarchy. Sugar CRM allows creating more than one top-level user within the application instance. Let's write down it in the Specification terms:
    <service id="instance">
    <service id="account">
    </service>
    </service>
  4. Used technologies. Sugar CRM requires PHP 5.1. or higher with memory limit 40Mb or higher, and MySQL. Let's write down it in the Specification terms:
    <requirements xmlns:php="http://apstandard.com/ns/1/php" 
                  xmlns:db="http://apstandard.com/ns/1/db"
                  xmlns:apache="http://apstandard.com/ns/1/apache">
      <php:version min="5.1.0"/>
      <php:memory-limit>41943040</php:memory-limit>
      <php:extension>mysql</php:extension>
      <php:extension>mbstring</php:extension>
      <db:db>
       <db:id>main</db:id>
       <db:default-name>sugarce</db:default-name>
       <db:can-use-tables-prefix>true
       </db:can-use-tables-prefix>
       <db:server-type>mysql</db:server-type>
       <db:server-min-version>4.1.2
       </db:server-min-version>
      </db:db>
    </requirements>
  5. Presentation details and settings. We defined earlier that SugarCRM provides two services - instance and account. Application requires the following settings on installation: 'admin' user login and password, system name to be displayed in the browser title bar, whether application sends usage statistics and how checks for upgrade are performed. The second-level service - account - requires user login and password and profile information. APS allows assigning the class attribute to setting or setting group. This attribute inform Controller about the setting meaning. The Controller may decide whether to prompt customer or use some pre-defined values, basing on attribute meaning. Let's group these settings for better presentation, and write down it in the Specification terms. Here, we demonstrate only instance settings, to view the whole set, refer to the Appendix B. Sugar CRM Sample Metadata section.
    <service id="instance">
     <settings>
      <group class="authn">
       <name>Administrator's Account</name>
       <setting id="admin_name" type="string" default-value="admin"
                min-length="1" max-length="32" 
                regex="^[a-zA-Z][0-9a-zA-Z_\-]*" class="login">
        <name>Administrator's Login</name>
        <error-message>Please make sure the text
                       you entered starts with a letter and 
                       continues with either numbers, letters, 
                       underscores or hyphens.
        </error-message>
       </setting>
       <setting id="admin_password" type="password" class="password">
        <name>Administrator's Password</name>
       </setting>
      </group>
      <group class="web">
       <setting id="title" type="string" default-value="SugarCRM" 
                class="title">
        <name>System Name</name>
        <description>This name will be displayed
                    in the browser title bar when users 
                    visit the Sugar application.
        </description>
       </setting>
       <setting id="send_usage_statistics"
                type="enum" default-value="true" 
                installation-only="true">
        <name>Send Anonymous Usage Statistics</name>
        <description>If selected 'Yes', Sugar will
                      send anonymous statistics about your 
                      installation to SugarCRM Inc. every 
                      your system checks for new versions.
        </description>
        <choice id="true">
         <name>Yes</name>
        </choice>
        <choice id="false">
         <name>No</name>
        </choice>
       </setting>
       <setting id="check_for_updates" type="enum" 
                default-value="automatic">
        <name>Check For Updates</name>
        <description>How the system will check
                     for updated versions of the application.
        </description>
        <choice id="automatic">
         <name>Automatic</name>
        </choice>
        <choice id="manual">
         <name>Manual</name>
        </choice>
       </setting>
      </group>
     </settings>
    </service>
  6. Content delivery method. Sugar CRM is a simple application and should be accessible via Internet. So, delivery method is Inside package and URL mapping rules should be declared. URL mapping rules declaration is needed only for instance service. Let's write down URL mapping rules and specify required amount of disk space in the Specification terms:
    <provision>
     <url-mapping>
      <default-prefix>sugarcrm</default-prefix>
      <installed-size>53547008</installed-size>
      <mapping url="/" path="htdocs" 
               xmlns:php="http://apstandard.com/ns/1/php">
       <php:handler>
        <php:extension>php</php:extension>
       </php:handler>
       <mapping url="cache">
        <php:permissions writable="true"/>
       </mapping>
       <mapping url="custom">
        <php:permissions writable="true"/>
       </mapping>
       <mapping url="data">
        <php:permissions writable="true"/>
       </mapping>
       <mapping url="modules">
        <php:permissions writable="true"/>
       </mapping>
       <mapping url="tmp">
        <php:permissions writable="true"/>
       </mapping>
       <mapping url="config.php" virtual="virtual">
        <php:permissions writable="true"/>
       </mapping>
      </mapping>
     </url-mapping>
    </provision>
  7. Draft of metadata file. Now, it is time to make a draft of the application metadata file. Describe application general information in the Specification terms. For details, refer to the 5.1 Common Application Properties section of the Specification. Add information written down on previous steps and replenish it with details.
  8. Configuration script. Sugar CRM provides two services, consider possibility to write separate configuration scripts for each service as in our example. Configuration script should perform all actions required for application configuration using environment variables defined on previous steps. For the list of environment variables, refer to the Sample Environment Variables section further in this guide.

    The application vendor states that any user could not be deleted, the only way to restrict access at all is to disable user. Considering this information, we added <status-control/> element to the "usermanager" script.

    Add information about scripts to the respective provision sections of the metadata file. For example,

    <service id="instance">
     <provision>
      <configuration-script name="configure">
       <script-language>php</script-language>
      </configuration-script>
     </provision>
     <service id="account">
      <provision>
       <configuration-script name="usermanager">
        <script-language>php</script-language>
        <status-control/>
       </configuration-script>
      </provision>
     </service>
    </service>
  9. Archiving application. Form application package according URL mapping rules defined and requirements in the 4. Basic Package Format section of the Specification and archive it. In our case, the structure is the following:

APP-META.xml

# Metadata container. XML file.

scripts/

 

configure

usermanager

# This script will be invoked when application instance is to be setup.

images/

 

icon.png

...

screen_admin.png

# Icon and screenshots of the application

htdocs/

 

cache/

...

modules/

index.php

...

# SugarCRM files

See Also

Packaging Scenarios

Packaging WordPress Application

Packaging Open-Xchange Application

Packaging German Translation Add-on for WordPress

Packaging SpamExperts Incoming Email Security Firewall Application

Packaging Applications with Upsell Services

Please send us your feedback on this help page