0% found this document useful (0 votes)
14 views

Magento GCP Migration API

Uploaded by

Narender Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Magento GCP Migration API

Uploaded by

Narender Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Magento GCP API Migration Steps

Dependencies Installation on VM’s:

PHP8.1-FPM
Nginx

1. Php8.1 install & fine tuning of fpm


sudo apt-get install php8.1-
{gd,curl,intl,bcmath,ctype,common,mbstring,xml,soap,xsl,zip,mysql,xsl,fpm,mcrypt,redis,cli}

2.. Nginx install & fine tuning of nginx


sudo apt-get install nginx
3. Code Deployment => master branch deployed with db configurations /env.php file
configurations
[email protected]:apollo247/aphmagento-api.git
4. Kibana logs elastic-apm configuration(already installed on perf)

Media sync on api servers

10 3 * * * sshpass -p 'c5"D#S.@WZ]])$nE' rsync -avzhe "ssh -o StrictHostKeyChecking=no"


[email protected]:/var/www/html/pub/media/* /var/www/html/pub/media/ >>
/var/www/html/var/log/rsynlog.txt

Code Base Changes


Magento API Server :

Branch Name : master


1. Files to be modified :

i. /var/www/html/magento-api/services/Configuration.php
DB Credentails (SLAVE DB)
define ("MAGENTO_DBNAME","");
define ("MAGENTO_DBUSER","");
define ("MAGENTO_DB_PASSWORD","");
define ("MAGENTO_DBHOST","");
Redis Credentials
define ("CACHE_HOST", "");
define ("REDIS_PASSWORD", "");
Profile Redis Credentails
define ("PROFILE_CACHE_HOST", "");
define ("PROFILE_REDIS_PASSWORD", "");
define ("PROFILE_DB",0);
CMS Endpoint
define ("CMS_PDP_API","https://cms.apollo247.com/api/medicine/search-detail");
Turret Endpoint
define ("TURRET_ENDPOINT","https://search.apollo247.com/");
ii. /var/www/html/app/etc/env.php

DB credential
'host' => '',
'dbname' => '',
'username' => '',
'password' => '',

Redis Credentails ( at 3 places)


'server' => '',
'database' => '1',
'port' => '6379',
'password' => '',

'host' => '',


'port' => '6379',
'password' => '',

2. Rsync of media from admin server to all api servers

3. Fine tune of PHP-FPM & APM setup


Install elastic php agent (already installed on perf env)
/etc/php/8.1/fpm/php.ini

short_open_tag = On
extension=elastic_apm.so
elastic_apm.server_url="http://apm.qa.apollo247.in:8200"
elastic.apm.secret_token=""
elastic_apm.service_name="magento-pp"

/etc/php/8.1/cli/php.ini

short_open_tag = On

/etc/php/8.1/fpm/pool.d/www.conf
For 8CPU & 32GB RAM
pm.max_children = 793
pm.start_servers = 198
pm.min_spare_servers = 198
pm.max_spare_servers = 594

Test Case Execution :

1. Validate the production db size azure<->GCP/ Count of Tables


2. Validate the db/redis connectivity from all GCP VM’s and also validate all services nginx/PHP-FPM
is configured correctly
3. PHP-FPM /Nginx FineTuning Configurations
4.Backend Listeners for all VM’s (Health probe → all healthy vm’s)
5. Kibana Logs Validate for all VM’s
6. Performance test for Magento Api’s
7. Validate the CDS syncing from azure to GCP DB

Issues we faced while perf environment setup:


a) CORS Issue on web
b) Redis Latency Issue
c) DB synchig issue

You might also like