Hotfix release available: 2025-05-14b "Librarian". upgrade now! [56.2] (what's this?)
Hotfix release available: 2025-05-14a "Librarian". upgrade now! [56.1] (what's this?)
New release available: 2025-05-14 "Librarian". upgrade now! [56] (what's this?)
Hotfix release available: 2024-02-06b "Kaos". upgrade now! [55.2] (what's this?)
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-04b "Jack Jackrum". upgrade now! [54.2] (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?)
New release available: 2020-07-29 "Hogfather". upgrade now! [51.3] (what's this?)
New release candidate 3 available: 2020-06-09 "Hogfather". upgrade now! [51.2] (what's this?)
New release candidate 2 available: 2020-06-01 "Hogfather". upgrade now! [51.1] (what's this?)
New release candidate available: 2020-06-01 "Hogfather". upgrade now! [51] (what's this?)
Hotfix release available: 2018-04-22c "Greebo". upgrade now! [50.3] (what's this?)
Hotfix release available: 2018-04-22b "Greebo". upgrade now! [50.2] (what's this?)
prodap04_migration

Backend Testing Add Hosts entry
vi /etc/hosts

207.20.42.196 test.learnexa.com #for prodapp04 not required vpn

step1

Install maintenance page
login to prodapp01 as expprodl appuser

/home/expprodl/crossbow

./runcap.sh


Select Target environment
1). Staging
2). Production
Enter target environment number [1,2]: 2

Select Cap Task
1). deploy (Use this for incremental code deployments)
2). deploy:setup (Use this to setup the necessary application folders)
3). deploy:check (Use this to verify application folder setup)
4). deploy:cold
5). deploy:migrate
6). deploy:restart
7). deploy:update
8). deploy:web:enable (Use this to remove maintenance page, all app servers are enabled)
9). deploy:web:disable (Use this to install maintenance page, public access to all app servers is disabled)
Enter Cap Task number [1-9]:  9



need to change like mentioned below for memcache 

login to prodapp03

ssh expprodl@10.166.152.14

vi /deploy/crossbow/current/config/environments/production.rb

from
config.cache_store = :dalli_store, "10.166.152.11"

to
config.cache_store = :dalli_store, "10.166.152.22"


restart passenger , god stop and start services on prodapp03 


/deploy/systasks/god.sh stop

/deploy/systasks/god.sh start


/deploy/systasks/god.sh status   #to know god status 



#to restart passenger


cd /deploy/crossbow/current/

touch tmp/restart.txt

step2

add below changes /opt/haproxy/haproxy.cfg

From

backend deploy_testing_learnexa
        balance roundrobin
        option httplog
        option forwardfor
        cookie SERVERID insert indirect
        source 10.166.152.242
        #timeout client 150000ms
        timeout connect 35000ms
        timeout server 8m
        option httpchk HEAD /contact-us/new HTTP/1.1\r\nHost:\ www.learnexa.com\r\nUser-Agent:\ HaProxy
       server prodapp01 10.166.152.11:80 check port 80  cookie app1 maxconn 31 inter 5000 rise 2 fall 3
#       server prodapp04 10.166.152.22:80 check port 80 cookie app4 maxconn 31 inter 5000 rise 2 fall 3



TO

backend deploy_testing_learnexa
        balance roundrobin
        option httplog
        option forwardfor
        cookie SERVERID insert indirect
        source 10.166.152.242
        #timeout client 150000ms
        timeout connect 35000ms
        timeout server 8m
        option httpchk HEAD /contact-us/new HTTP/1.1\r\nHost:\ www.learnexa.com\r\nUser-Agent:\ HaProxy
#       server prodapp01 10.166.152.11:80 check port 80  cookie app1 maxconn 31 inter 5000 rise 2 fall 3
       server prodapp04 10.166.152.22:80 check port 80 cookie app4 maxconn 31 inter 5000 rise 2 fall 3

 haproxy reload

/etc/init.d/haproxy reload

After validation completed do below 
*********************************************************************************************************************************

This is for adding prodapp04 and remove  prodapp01  server  live for public

add below changes /opt/haproxy/haproxy.cfg

FROM

backend learnexa
	balance roundrobin
        option httplog
        option forwardfor
 	cookie SERVERID insert indirect
	source 10.166.152.246
	#timeout client 150000ms
	timeout connect 35000ms
        timeout server 8m
	option httpchk HEAD /contact-us/new HTTP/1.1\r\nHost:\ www.learnexa.com\r\nUser-Agent:\ HaProxy
	server prodapp01 10.166.152.11:80 check port 80  cookie app1 maxconn 31 inter 5000 rise 2 fall 3
	server prodapp03 10.166.152.14:80 check port 80 cookie app3 maxconn 31 inter 5000 rise 2 fall 3


TO

backend learnexa
	balance roundrobin
        option httplog
        option forwardfor
 	cookie SERVERID insert indirect
	source 10.166.152.246
	#timeout client 150000ms
	timeout connect 35000ms
        timeout server 8m
	option httpchk HEAD /contact-us/new HTTP/1.1\r\nHost:\ www.learnexa.com\r\nUser-Agent:\ HaProxy
	server prodapp01 10.166.152.11:80 check port 80  cookie app1 maxconn 31 inter 5000 rise 2 fall 3
	 server prodapp04 10.166.152.22:80 check port 80 cookie app4 maxconn 31 inter 5000 rise 2 fall 3


#haproxy reload

/etc/init.d/haproxy reload 




Remove maintenance page
login to prodapp01 as expprodl appuser

/home/expprodl/crossbow

./runcap.sh


Select Target environment
1). Staging
2). Production
Enter target environment number [1,2]: 2

Select Cap Task
1). deploy (Use this for incremental code deployments)
2). deploy:setup (Use this to setup the necessary application folders)
3). deploy:check (Use this to verify application folder setup)
4). deploy:cold
5). deploy:migrate
6). deploy:restart
7). deploy:update
8). deploy:web:enable (Use this to remove maintenance page, all app servers are enabled)
9). deploy:web:disable (Use this to install maintenance page, public access to all app servers is disabled)
Enter Cap Task number [1-9]:  8

prodap04_migration.txt · Last modified: 2018/08/31 16:16 (external edit)