Site Tools


Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
Hotfix release available: 2023-04-04a "Jack Jackrum". upgrade now! [54.1] (what's this?)
New release available: 2023-04-04 "Jack Jackrum". upgrade now! [54] (what's this?)
Hotfix release available: 2022-07-31b "Igor". upgrade now! [53.1] (what's this?)
Hotfix release available: 2022-07-31a "Igor". upgrade now! [53] (what's this?)
New release available: 2022-07-31 "Igor". upgrade now! [52.2] (what's this?)
New release candidate 2 available: rc2022-06-26 "Igor". upgrade now! [52.1] (what's this?)
New release candidate available: 2022-06-26 "Igor". upgrade now! [52] (what's this?)
Hotfix release available: 2020-07-29a "Hogfather". upgrade now! [51.4] (what's this?)
public:deploy:expertusone_deployment_process_stack5

ExpertusONE Deployment Process (stack 5)

This document is to describe the system requirement, system setup/configuration, installation steps to install the Product ExpertusONE for stack 5 (ESP5).

System Requirement

Please refer to the below wiki for Hardware and software requirements under ESP5 section

https://dokuwiki.expertus.com/doku.php?id=public:deploy:software_installation_configurations_stack5

System Settings

PHP Settings

php compilation :

Compile the PHP on enabling the following modules/libraries

php.ini setting:

PHP_CURL
PHP_DOM
PHP_EXIF
PHP_GD2
PHP_MBSTRING
PHP_MCRYPT
PHP_MEMCACHE
PHP_MYSQLI
PHP_OPENSSL
PHP_OPCACHE (should be a zend extension)
PHP_PDO
PHP_PDO_MYSQL
PHP_SOAP
PHP_XMLRPC
PHP_XSL
PHP_ZIP
  

Edit the php.ini file for the tokens below

// Setup post data
always_populate_raw_post_data = -1 (-1 is for disable)

// Setup timezone 
date.timezone = <timezone>

// Setup upload file sieze
upload_max_filesize = 2000M
post_max_size = 2000M

// Setup smtp
SMTP = <SMTP Server IP>

// Setup wsdl 
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="<tmp directory path for wsdl cache>"
soap.wsdl_cache_ttl=8640000
soap.wsdl_cache = 3
soap.wsdl_cache_limit = 100

// Setup opcache
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=256
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=8000
opcache.validate_timestamps=1
opcache.revalidate_freq=900 (this can be higher in production)
opcache.save_comments=0
opcache.load_comments=0
opcache.fast_shutdown=1

// Setup OpenSSL
openssl.cafile = <path>
openssl.capath = <path>

Apache Settings

Inatall the apache of version in the Software Requirement section and set with configuration below

Enable modules in httpd.conf

LoadModule rewrite_module modules/mod_rewrite.so
LoadModule expires_module modules/mod_expires.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule filter_module modules/mod_filter.so
Include conf.d/*.conf

Set to override httpd.conf :

<Directory "<path_to>/ExpertusONE">
AllowOverride All
AddType text/ExpertusONE .exm
</Directory>
#NOTE: Replace <path_to> appropriately with the path where ExpertusONE web source is deployed

Virtual host settings:

Update the httpd-vhosts.conf for doc-root, servername, vhost,

DocumentRoot "<path_to/lamp>"
ServerName localhost

<VirtualHost *:80>
DocumentRoot <path_to/lamp>/ExpertusONE
ServerName www.expertusone.com
php_flag soap.wsdl_cache_enabled on
php_value soap.wsdl_cache_dir "<path_to/lamp>/www_wsdl_cache_dir"

RewriteEngine on
RewriteCond %{HTTP_COOKIE} !SPCertificate [NC]

# Replace www.expertusone.com with exact domain name
RewriteCond %{HTTP_REFERER} !.*www.expertusone.com.*$ [NC]  
RewriteRule ^/sites/default/files/(.*)$ /permission.php [L]

# Replace www.expertusone.com with exact domain name
RewriteCond %{HTTP_REFERER} !.*www.expertusone.com.*$ [NC]
RewriteCond %{REQUEST_URI} !.*profile.*$ [NC]
RewriteRule ^/services/(.*)$ /permission.php [L]
RewriteRule ^/services/(.*)$ /sites/all/services/LnrService.php?soapaction=$1 [L]
RewriteRule ^/services/(.*)?WSDL$ /sites/all/services/LnrService.php?soapaction=$1&showWSDL=true [L]

<IfModule mod_deflate.c>
     Include <path/to/mod_deflate.conf>
</IfModule>
<Directory D:\wamp\www\ExpertusONE>
  FileETag none
</Directory>
</VirtualHost>
#NOTE: Replace DocumentRoot appropriately with the path where ExpertusONE web source is deployed

Host entry Edit server's /etc/hosts entry mapping for deployment site-url

<HOST_IP> <SITE_NAME>
example : 192.168.7.97 idev.expertusone.com

Mysql Settings

Install the mysql of version in software Requirement and set the database as below

CREATE DATABASE `<DB_NAME>` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON *.* TO '<DB_USER>'@'localhost' IDENTIFIED BY 'expuser' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
GRANT ALL PRIVILEGES ON `<DB_NAME>` . * TO '<DB_USER>'@'localhost' IDENTIFIED BY '<DB_USER>';
GRANT ALL PRIVILEGES ON `mysql` . * TO '<DB_USER>'@'localhost' IDENTIFIED BY '<DB_USER>';
flush privileges;
-- NOTE: Replace <DB_USER> and <DB_NAME> appropriately, execute the above as mysql's root user

Setup in etc/my.cnf file (Note: Make sure the setting is under the [mysqld] group header):

group_concat_max_len=5M

Setup in etc/my.cnf file (Note: Make sure the setting is under the [mysqld] group header):

(Mysql Default timezont must match with php.ini default timezone.)
default-time-zone = '+5:30'

Populate timezone table in mysql from following command: (Locate mysql_tzinfo_to_sql file in mysql)

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql

Deployment Pre-requisites

Check List for server setup:

  • Apache installed and httpd.conf is configured
  • MySQL Database tool installed and database, user, password, permissions are set
  • PHP installed and php.ini are configured
  • /etc/hosts entry mapping for deployment site-url at server.
  • Check Services like apache and mysql are working fine

NOTE: Above are required for initial setup of the server

Backup of existing deployed code and database

  • Take backup of existing web component and preserve under standard backup location.
  • Take backup of existing database dump and preserve under standard backup location.
  • Make sure mysql service is running

NOTE : This is required for incremental build/full build deployment.

Web Component Deployment:

Web component is given in the form of zip archive, deploy(unzip the archive) in the web server deployment location (<path_to>/htdocs/ExpertusONE directory).

Site URL : Change all the http://idev.expertusone.com, http://www.expertusone.com to appropriate site url

cd <path_to>/ExpertusONE
grep -rl "www.expertusone.com" * | xargs sed -i "s/www.expertusone.com/idev.expertusone.com/g"
grep -rl "http:\/\/www.expertusone.com" * | xargs sed -i "s/http:\/\/www.expertusone.com/http:\/\/idev.expertusone.com/g"                                         

sites/default/exp_sp.ini Set the tokens of exp_sp.ini file with the respective values

sites/default/settings.php

$databases = array (
'default' =>
  array (
   'default' =>
     array (
      'database' => '<DB_NAME>',
        'username' => '<DB_USER>',
        'password' => '<DB_PASSWORD',
        'host' => 'localhost',
        'port' => '',
        'driver' => 'mysql',
        'prefix' => '',
     ),
  ),
'report' =>
  array (
   'default' =>
     array (
      'database' => '<DB_NAME>',
      'username' => '<DB_USER>',
      'password' => '<DB_PASSWORD',
      'host' => 'localhost',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => '',
    ),
  ),
);
$update_free_access = FALSE;

ini_set('session.cookie_lifetime', 0);

Composer update

 To use opcache with Drupal, Drupal's opcache and composer_manager modules are require and this is available as part of code base
 After installation the composer needs to be update. Use the following commands to install/update composer.
 
 // To install composer components
 <path to php>/php <document root>/composer.phar install --no-dev -d <document root>/sites/default/files/composer
 
 // To update composer components
 <path to php>/php <document root>/composer.phar update --no-dev -d <document root>/sites/default/files/composer
 

Configurations for data load process:

 
 create folder to store IN/OUT files
 provide permission to the folder that should be accessed by Apache and Mysql
  
 edit exp_sp.ini and set the folder path in DATALOAD_FILE_PATH = <path> (created in previous step)
 
 cron setup:
 
 php «DOCUMENT_ROOT»/dataload/dataloadExec.php –key [«CRON_KEY»] –document-root «DOCUMENT_ROOT» 
 
 

Cleanup WSDL cache:

rm -rf <path_to>/wsdl_cache_dir # remove the files in the wsdl cache directory

File permissions:

Make the below files and folder to have read and write access

  • ExpertusONE/sites/all/commonlib/html2pdf/cache
  • ExpertusONE/sites/default/files
  • ExpertusONE/sites/all/files/pictures
  • ExpertusONE/tmp
  • ExpertusONE/exp_debug.txt

DB Component Deployment:

Database component is deployed into db server. DB component is a archived sql file.

unzip the file and deploy it to mysql database

$ cd <path_to/shipin>
$ unzip Expertusone_db.sql
$ mysql -u[DB_USER] -p[DB_password] -h[Host_ip] [DB_NAME] < Expertusone_db.sql

Edit the end_point_url in table sct_service_provider

mysql -u[DB_USER] -p[DB_password] -h[Host_ip] [DB_NAME] << ENDOFMYSQL
update sct_service_provider set end_point_url = replace(end_point_url,'idev.expertusone.com','<domain_name>.expertusone.com') where end_point_url like '%idev.expertusone.com%'; 
update sct_service_provider set end_point_url = replace(end_point_url,'www.expertusone.com','<domain_name>.expertusone.com') where end_point_url like '%www.expertusone.com%'; 
update slt_person set email='expertusone_idev@expertus.com';
update users set mail = 'expertusone_idev@expertus.com';
truncate slt_notification;
commit;
ENDOFMYSQL
#NOTE : Replace <domain_name> with appropriate domain name of the site. [DB_USER],[DB_password],[Host_ip],[DB_NAME] should be replace with actual values.
#NOTE : Above steps is necessary for ExpertusONE version < 3.2.0.0

Once Web component and Database components are deployed, please restart apache service

sudo /etc/init.d/apache2 restart

Product Configurations:

Enable Content Delivery Network:

(Apache configuration steps are from my local workstation, and may slightly differ for idev and other servers)

Create a new domain www.static-expertusone.com pointing to the www.expertusone.com server.

  e.g. In the etc\hosts file make a new entry
 <same IP addr as for www.expertusone.com>    www.static-expertusone.com

Enable Apache headers_module by uncommenting the below line in httpd.conf file:

 LoadModule headers_module modules/mod_headers.so

Add the new VirtualHost entry in httpd_vhosts.conf.

e.g.
On my workstation I have the following VirtualHost entries for www.expertusone.com and its corresponding static domain www.static-expertusone.com.
<VirtualHost *:80>
  DocumentRoot D:\wamp\www\ExpertusONE
  ServerName www.static-expertusone.com
  <IfModule mod_deflate.c>
     Include D:\wamp\bin\apache\Apache2.2.17\conf\include\mod_deflate.conf
  </IfModule>
  RewriteEngine on
  RewriteRule ^/services/(.*)$ /sites/all/services/LnrService.php?soapaction=$1 [L]
  RewriteRule ^/services/(.*)?WSDL$ /sites/all/services/LnrService.php?soapaction=$1&showWSDL=true [L]
  # The following entries included in the new static domain to make it cookie-free.
  <Directory D:\wamp\www\ExpertusONE>
    RequestHeader unset Cookie
    Header unset Set-Cookie
    FileETag none
  </Directory>
 </VirtualHost>
 

Note: Add the below entry to vhost entry of actual sitename eg (www.expertusone.com)

<Directory D:\wamp\www\ExpertusONE>
FileETag none
</Directory>

Restart Apache server to read the new configurations.

Enable CDN module:

 As admin,
   i) Goto ?q=admin/modules.
  ii) Enable 'CDN' module under 'Performance and scalability' section by ticking its checkbox.
 iii) Save configuration

Setup CDN:

 As admin,
   i) Goto ?q=admin/config/development/cdn/details
  ii) Select Mode: Original Pull
 iii) Under Mode-specific settings, in the CDN Mapping text-box enter http://www.static-expertusone.com
  iv) Click Save configuration
   v) Goto ?q=admin/config/development/cdn/other
  vi) Check 'CDN supports HTTPS' under 'HTTPS'
 vii) In Exceptions->FILE URL->Blacklist textbox, enter *.js (remove any other entries if present)
viii) Clear text box Exception->FILE URL->Whitelist
  ix) Click Save configuration
   x) Goto ?q=admin/config/development/cdn
  xi) Select status enabled
 xii) Ensure Display statistics in not checked.
xiii) Click save configuration

Cyber-source Configuration for e-commerce:

  • Create keys folder outside htdocs and update the path in the system. The path can be updated in the system under:
    • Create keys directory to store the data
      • sudo mkdir /opt/apache2/keys
      • sudo chmod 777 /opt/apache2/keys
    • Browse to http://sitename.expertusone.com, login as admin and switch to administer view
    • Browse to Commerce Administration » Configurations » Payment settings » Payment Methods » Credit card settings» or site/?q=admin/store/settings/payment/method/credit
      • edit the key path to → /opt/apache2/keys
  • Update the Cybersource “Merchant ID” and “Transaction key” in the system.
    • Browse to Commerce Administration » Configurations » Payment settings » Payment Gateways: » Credit Card settings » Expertus CyberSource Silent Order POST » Soap toolkit API settings »
      • edit the “Merchant ID” and “Transaction key” as below for qa nad staging sites, for production it must be obtained from exp_sp.ini file
Merchant ID: expertus
Transactionkey: jyvxCFfEagSPLF98c/oZsOPUv4BGj6nBvY1KFIxwl8gEnd1MSHVWwjg0bUuJNWMiBith2cDjciLxWzfE8nc0ooU1WkXRVrQh0nc3bQ8Y7PMWL40WRvun7M2JLWDOnrF2qzO9RhBlYt0TW+p7IWnfoDaitq5TOCoikKPp1szbjWpeDlJAniWnDiy0bSeLmqyniL+ARo+pwb2NShSMcJfIBJ3dTEh1VsI4NG1LiTVjIgYrYdnA43Ii8Vs3xPJ3NKKFNVpF0Va0IdJ3N20PGOzzFi+NFkb7p+zNiS1gzp6xdqszvUYQZWLdE1vqeyFp36A2orauUzgqIpCj6dbM241qEg==

Other Instructions

  • This configuration is for full build deployment and initial setup.
  • Any additional other UI level configurations (admin setttings) are performed as per installation/release notes.
  • Clear performance cache http:<domain_name.expertusone.com>/?q=admin/config/development/performance.
public/deploy/expertusone_deployment_process_stack5.txt · Last modified: 2024/06/18 00:02 by 47.128.55.91