The inclusion of Zend's PHP engine (Zend Core) in i5/OS and MySQL AB's MySQL database server in i5/OS provides all of the components required for the deployment of open-source (or open-community) applications. This article explores the practical use of this web deployment stack by taking a look at one of the thousands of open-source applications that you can now deploy in i5/OS.
Customer Relationship Management
Customer relationship management (CRM) is the practice of identifying, marketing to, selling to, and servicing an organization's customers. Within the IT community, CRM is the term often used for software solutions that help an organization manage customer relationships in an organized and controlled way. One example of CRM is a database that contains complete information and details for an organization's customers, including contact information and purchase history. Typically, management and sales personnel would use and maintain the database, and they could use the data to cross-sell different products to customers based on customer requirements. The database of contact information would also provide the ability to contact customers for new product launches.
One goal of CRM is to support communication between an organization and its customers through any media, enabling realtime delivery of information to customers. You can use a CRM system to analyze customers' purchasing patterns and to provide information to the sales staff that will help them offer the best possible solutions and products to the customer.
CRM is one of the more popular functions that many organizations implement within their IT environments. Over the years, a number of vendors have begun to provide CRM solutions, including SAP, Siebel, and Oracle. Now, the adoption of PHP and MySQL on the System i platform gives System i organizations an open-source alternative for CRM: SugarCRM .
SugarCRM and the System i
You can deploy two different packaging versions of the SugarCRM application on i5/OS. The open-source package referred to as the Sugar Community Edition is the freely available version of the SugarCRM application. Deployment of the community edition comes with no formalized support from Sugar; support for the application follows the typical open-community support model of newsgroups and mailing lists. Functions supported in the community edition include
- personal home pages
- activity management
- e-mail client
- e-mail marketing
- contact management
- account management
- opportunity tracking
- lead management
- shared calendars
The second packaging of SugarCRM that can be deployed on i5/OS is the Sugar Enterprise Edition. Sugar announced the availability of this product for i5/OS in July 2007). The main difference between the community and enterprise editions of SugarCRM is the formalized support model provided with the enterprise edition. Support provided with the enterprise edition includes
- unlimited online support
- unlimited e-mail support
- automatic upgrades and maintenance of Sugar Enterprise
- access to knowledge-base support
- access to Sugar developer forums
The enterprise edition also offers functionality that is not available in the community edition. Some of those additional functions include
- sales forecasting
- advanced project management
- quotes and contracts
- team management
- advanced SQL reporting
Implementing SugarCRM in i5/OS
You can install and configure Zend Core and MySQL to implement your own i5/OS variant of the LAMP stack (for details, see "MySQL Delivers Applications for i5/OS," November 2007, article ID 21059 at SystemiNetwork.com). When you install Zend Core and MySQL, you also install Apache, MySQL, and PHP in the PASE environment, where you can use them to deploy applications. Let's look at how to use the stack to deploy an open-community application in this case, the SugarCRM application, as it is one of the most popular open-community CRM applications.
The first step is to obtain a copy of the SugarCRM source code from the SugarCRM website and extract the files from the zip file. This results in a folder of source code files (approximately 45 MB in more than 7,000 files). Copy the source code folder to the IFS. You should place it in the directory \www\zendcore\htdocs in a subfolder probably called sugarcrm. Note that \www\zendcore\htdocs is the document root for the Apache web server running the PASE environment.
There are a couple of configuration changes that you need to make to the Zend Core environment to support SugarCRM. Specifically, you need to enable support for multibyte character processing, set the size of file uploads to at least 6 MB, and set the resource limits to at least 32 MB. The following steps walk through these changes:
- Start the web-based administration interface for Zend Core by pointing a web browser to http://iseries:89/ZendCore.
- After logging in to the administration interface, select Configuration|Extensions.
- Scroll down the list of extensions until mbstring multibyte Character Processing is displayed. Enable the extension.
- While still in the administration interface, select Configuration|PHP|File Uploads and make sure that the size is set to at least 6 MB.
- Also in the administration interface, select Configuration|PHP|Resource Limits and make sure that Memory Limits is set to at least 32 MB.
- Save the settings.
- Restart the server.
You also need to enable the path location for saving session information, which requires a change to the Zend Core configuration file (\etc\php.ini). Edit the file and locate the following line:
;session.save_path = '/tmp'
Activate the line by removing the comment character (;), then use the Zend Core setup utility (GO ZENDCORE/ZCMENU) to restart Zend Core.
Now we are ready to actually install SugarCRM. To start the installation, open a web browser and point it to http://iseries:89/sugarcrm/install.php. To install SugarCRM, perform the following steps:
- Select your desired language and click Next.
- Indicate your acceptance of the license agreement for SugarCRM and click Next.
- At this point, the installer will go out and verify that the environment is properly established to support SugarCRM. This includes a check to see that a PHP engine and the MySQL database engine are available. Once you have reviewed the verification information, click Next.
- Establish the database configuration for SugarCRM. You will need to provide the following information:
- Host Name is the name of the host that SugarCRM should connect to; for our installation, the host name should be set to localhost.
- Database Name is the name of the database (in MySQL) that SugarCRM data will be stored in; typically the name sugarcrm is used.
- Database User Name is the MySQL user that will be used to store and retrieve records from the SugarCRM database; typically the name sugarcrm is used.
- Create Database indicates that the installer should create the SugarCRM database using the database name created earlier.
- Create User indicates that the installer should create the SugarCRM user using the name created earlier.
- Populate Database with Demo Data indicates that demonstration data should be loaded by the installer into the SugarCRM database.
- Privileged Database User Name is the privileged MySQL database user; if a default installation of MySQL was performed, then the user name will be root (note: if you've defined a password for the root MySQL user, you will need to provide that as well).
- Define the site configuration information for the SugarCRM application. Information in this step includes the following:
- URL of Sugar Instance is the web address of the SugarCRM application files. For running the application under the Zend Core support, the URL will need to indicate port 89 of the i5/OS network address. If the SugarCRM installation files were placed in the \www\zendcore\htdocs\sugarcrm directory, the URL would be set to http://iseries:89/sugarcrm, where iseries would be replaced by the network name of your i5/OS partition.
- Sugar Admin Password is a user-defined password that's used to validate your ability to log in to the SugarCRM application as the "admin" user. You need to enter and then reenter the password to validate it.
That is all of the information the SugarCRM installer needs. A confirmation screen of the settings will be displayed, after which the application will be configured and ready to use. Once the installation is complete, you will be able to access the SugarCRM application by pointing a browser to http://iseries:89/sugarcrm. Figure 1 shows an example SugarCRM home screen once you have successfully logged in to the application.
Customizing the Application
Many open-source applications include the ability to customize the application to satisfy the requirements of the organization the application is being deployed into. This capability is often referred to as "click and configure." For example, it is possible to use Lightweight Directory Access Protocol (LDAP) to integrate the login/authentication function of SugarCRM into your organization's existing authentication mechanism. Another example is the ability to configure the look and feel of the application, including which functions are available (Figure 2).
i5/OS and Open Source: A Winning Combination
After reading our earlier discussions of PHP and MySQL and this example of using the open-community deployment stack to implement a common function within i5/OS, you should see the potential of open-source applications. For a key reason why all this is possible, see "DB2 for i5/OS Storage Engine" on page ProVIP 32.
Erwin Earley is a staff software engineer at IBM and has worked with the Rochester, Minnesota, development lab since 1996. He has worked in the IT industry since 1980 and has experience with several Unix variants, as well as Linux and OS/400.
DB2 for i5/OS Storage Engine
Support for the MySQL open-source database engine in i5/OS provides a key component in the ability to deploy open-source applications on i5/OS. The key is the ability to deploy apps unchanged in i5/OS that is, with no change to the source code. A large majority of these open-source applications are written to use PHP as the scripting language (which is now supported with Zend Core in i5/OS) and MySQL as the data repository (which is now supported with MySQL in i5/OS). These components by themselves will allow for the deployment of applications where the data will be stored in MySQL database tables stored in the IFS.
A key strength of MySQL is its pluggable storage architecture. Figure A shows a high-level view of where the pluggable storage architecture comes into play. As you can see, the upper tier of the architecture builds a query plan by parsing and optimizing the SQL statement. Once the query plan is built, the pluggable storage architecture is used to determine where to store and/or retrieve the data. This architecture lets you select a personalized storage engine for a particular application need. With MySQL, it is possible to use different storage engines for different tables within the same database schema. Storage engines in MySQL have a number of key differentiations, including concurrency/locking, transaction support, physical storage, index support, memory caches, and performance aids.
MySQL AB and IBM have indicated that a new storage engine will be made available that will allow MySQL-written applications to store their data in DB2 for i5/OS tables. Figure B provides a high-level view of the architecture. When the storage engine is made generally available, it will be possible to deploy open-source applications in i5/OS and have the data stored in DB2 for i5/OS tables in that way the data from the open-source applications would also be available to other applications running in i5/OS.
E.E.
The inclusion of Zend's PHP engine (Zend Core) in i5/OS and MySQL AB's MySQL database server in i5/OS provides all of the components required for the deployment of open-source (or open-community) applications. This article explores the practical use of this web deployment stack by taking a look at one of the thousands of open-source applications that you can now deploy in i5/OS.
Customer Relationship Management
Customer relationship management (CRM) is the practice of identifying, marketing to, selling to, and servicing an organization's customers. Within the IT community, CRM is the term often used for software solutions that help an organization manage customer relationships in an organized and controlled way. One example of CRM is a database that contains complete information and details for an organization's customers, including contact information and purchase history. Typically, management and sales personnel would use and maintain the database, and they could use the data to cross-sell different products to customers based on customer requirements. The database of contact information would also provide the ability to contact customers for new product launches.
One goal of CRM is to support communication between an organization and its customers through any media, enabling realtime delivery of information to customers. You can use a CRM system to analyze customers' purchasing patterns and to provide information to the sales staff that will help them offer the best possible solutions and products to the customer.
CRM is one of the more popular functions that many organizations implement within their IT environments. Over the years, a number of vendors have begun to provide CRM solutions, including SAP, Siebel, and Oracle. Now, the adoption of PHP and MySQL on the System i platform gives System i organizations an open-source alternative for CRM: SugarCRM .
SugarCRM and the System i
You can deploy two different packaging versions of the SugarCRM application on i5/OS. The open-source package referred to as the Sugar Community Edition is the freely available version of the SugarCRM application. Deployment of the community edition comes with no formalized support from Sugar; support for the application follows the typical open-community support model of newsgroups and mailing lists. Functions supported in the community edition include
- personal home pages
- activity management
- e-mail client
- e-mail marketing
- contact management
- account management
- opportunity tracking
- lead management
- shared calendars
The second packaging of SugarCRM that can be deployed on i5/OS is the Sugar Enterprise Edition. Sugar announced the availability of this product for i5/OS in July 2007). The main difference between the community and enterprise editions of SugarCRM is the formalized support model provided with the enterprise edition. Support provided with the enterprise edition includes
- unlimited online support
- unlimited e-mail support
- automatic upgrades and maintenance of Sugar Enterprise
- access to knowledge-base support
- access to Sugar developer forums
The enterprise edition also offers functionality that is not available in the community edition. Some of those additional functions include
- sales forecasting
- advanced project management
- quotes and contracts
- team management
- advanced SQL reporting
Implementing SugarCRM in i5/OS
You can install and configure Zend Core and MySQL to implement your own i5/OS variant of the LAMP stack (for details, see "MySQL Delivers Applications for i5/OS," November 2007, article ID 21059 at SystemiNetwork.com). When you install Zend Core and MySQL, you also install Apache, MySQL, and PHP in the PASE environment, where you can use them to deploy applications. Let's look at how to use the stack to deploy an open-community application in this case, the SugarCRM application, as it is one of the most popular open-community CRM applications.
The first step is to obtain a copy of the SugarCRM source code from the SugarCRM website and extract the files from the zip file. This results in a folder of source code files (approximately 45 MB in more than 7,000 files). Copy the source code folder to the IFS. You should place it in the directory \www\zendcore\htdocs in a subfolder probably called sugarcrm. Note that \www\zendcore\htdocs is the document root for the Apache web server running the PASE environment.
There are a couple of configuration changes that you need to make to the Zend Core environment to support SugarCRM. Specifically, you need to enable support for multibyte character processing, set the size of file uploads to at least 6 MB, and set the resource limits to at least 32 MB. The following steps walk through these changes:
- Start the web-based administration interface for Zend Core by pointing a web browser to http://iseries:89/ZendCore.
- After logging in to the administration interface, select Configuration|Extensions.
- Scroll down the list of extensions until mbstring multibyte Character Processing is displayed. Enable the extension.
- While still in the administration interface, select Configuration|PHP|File Uploads and make sure that the size is set to at least 6 MB.
- Also in the administration interface, select Configuration|PHP|Resource Limits and make sure that Memory Limits is set to at least 32 MB.
- Save the settings.
- Restart the server.
You also need to enable the path location for saving session information, which requires a change to the Zend Core configuration file (\etc\php.ini). Edit the file and locate the following line:
;session.save_path = '/tmp'
Activate the line by removing the comment character (;), then use the Zend Core setup utility (GO ZENDCORE/ZCMENU) to restart Zend Core.
Now we are ready to actually install SugarCRM. To start the installation, open a web browser and point it to http://iseries:89/sugarcrm/install.php. To install SugarCRM, perform the following steps:
- Select your desired language and click Next.
- Indicate your acceptance of the license agreement for SugarCRM and click Next.
- At this point, the installer will go out and verify that the environment is properly established to support SugarCRM. This includes a check to see that a PHP engine and the MySQL database engine are available. Once you have reviewed the verification information, click Next.
- Establish the database configuration for SugarCRM. You will need to provide the following information:
- Host Name is the name of the host that SugarCRM should connect to; for our installation, the host name should be set to localhost.
- Database Name is the name of the database (in MySQL) that SugarCRM data will be stored in; typically the name sugarcrm is used.
- Database User Name is the MySQL user that will be used to store and retrieve records from the SugarCRM database; typically the name sugarcrm is used.
- Create Database indicates that the installer should create the SugarCRM database using the database name created earlier.
- Create User indicates that the installer should create the SugarCRM user using the name created earlier.
- Populate Database with Demo Data indicates that demonstration data should be loaded by the installer into the SugarCRM database.
- Privileged Database User Name is the privileged MySQL database user; if a default installation of MySQL was performed, then the user name will be root (note: if you've defined a password for the root MySQL user, you will need to provide that as well).
- Define the site configuration information for the SugarCRM application. Information in this step includes the following:
- URL of Sugar Instance is the web address of the SugarCRM application files. For running the application under the Zend Core support, the URL will need to indicate port 89 of the i5/OS network address. If the SugarCRM installation files were placed in the \www\zendcore\htdocs\sugarcrm directory, the URL would be set to http://iseries:89/sugarcrm, where iseries would be replaced by the network name of your i5/OS partition.
- Sugar Admin Password is a user-defined password that's used to validate your ability to log in to the SugarCRM application as the "admin" user. You need to enter and then reenter the password to validate it.
That is all of the information the SugarCRM installer needs. A confirmation screen of the settings will be displayed, after which the application will be configured and ready to use. Once the installation is complete, you will be able to access the SugarCRM application by pointing a browser to http://iseries:89/sugarcrm. Figure 1 shows an example SugarCRM home screen once you have successfully logged in to the application.
Customizing the Application
Many open-source applications include the ability to customize the application to satisfy the requirements of the organization the application is being deployed into. This capability is often referred to as "click and configure." For example, it is possible to use Lightweight Directory Access Protocol (LDAP) to integrate the login/authentication function of SugarCRM into your organization's existing authentication mechanism. Another example is the ability to configure the look and feel of the application, including which functions are available (Figure 2).
i5/OS and Open Source: A Winning Combination
After reading our earlier discussions of PHP and MySQL and this example of using the open-community deployment stack to implement a common function within i5/OS, you should see the potential of open-source applications. For a key reason why all this is possible, see "DB2 for i5/OS Storage Engine" on page ProVIP 32.
Erwin Earley is a staff software engineer at IBM and has worked with the Rochester, Minnesota, development lab since 1996. He has worked in the IT industry since 1980 and has experience with several Unix variants, as well as Linux and OS/400.
DB2 for i5/OS Storage Engine
Support for the MySQL open-source database engine in i5/OS provides a key component in the ability to deploy open-source applications on i5/OS. The key is the ability to deploy apps unchanged in i5/OS that is, with no change to the source code. A large majority of these open-source applications are written to use PHP as the scripting language (which is now supported with Zend Core in i5/OS) and MySQL as the data repository (which is now supported with MySQL in i5/OS). These components by themselves will allow for the deployment of applications where the data will be stored in MySQL database tables stored in the IFS.
A key strength of MySQL is its pluggable storage architecture. Figure A shows a high-level view of where the pluggable storage architecture comes into play. As you can see, the upper tier of the architecture builds a query plan by parsing and optimizing the SQL statement. Once the query plan is built, the pluggable storage architecture is used to determine where to store and/or retrieve the data. This architecture lets you select a personalized storage engine for a particular application need. With MySQL, it is possible to use different storage engines for different tables within the same database schema. Storage engines in MySQL have a number of key differentiations, including concurrency/locking, transaction support, physical storage, index support, memory caches, and performance aids.
MySQL AB and IBM have indicated that a new storage engine will be made available that will allow MySQL-written applications to store their data in DB2 for i5/OS tables. Figure B provides a high-level view of the architecture. When the storage engine is made generally available, it will be possible to deploy open-source applications in i5/OS and have the data stored in DB2 for i5/OS tables in that way the data from the open-source applications would also be available to other applications running in i5/OS.
E.E.