Splitting an existing Gateway 10 cluster into single nodes

book

Article ID: 192087

calendar_today

Updated On:

Products

CA API Gateway API SECURITY CA API Gateway Precision API Monitoring Module for API Gateway (Layer 7) CA API Gateway Enterprise Service Manager (Layer 7) STARTER PACK-7 CA Microgateway

Issue/Introduction

Customer would like to know if the documented procedure for splitting a Gateway cluster into single nodes applies to GW10 with OTK and MAG installed.

The current procedure found is for Gateway 9.x

Environment

Release : 10.0

Component : API GATEWAY

Resolution

Instructions to Splitting a Gateway Cluster v10.0

1. Back up the database on the PRIMARY node: mysqldump --all-databases > ~/all_databases_`date '+%Y%m%d_%T'`.sql
2. Make sure that the last line of the newly created SQL file is "-- Dump completed <date-time>".
3. Store the file for future use.
4. Stop slave replication on both nodes: mysqladmin stop-slave
5. Reset the master configuration on both nodes: mysql -e "reset master"
6. Reset the slave configuration on both nodes: mysql -e "reset slave; reset slave all"
7. Stop the Gateway service on both nodes: service ssg stop
8. You need to Edit the node.properties and delete the lines which does contain the replication references :

/opt/SecureSpan/Gateway/node/default/etc/conf/node.properties

this 7 last lines from the file : 
node.db.clusterType = replicated
node.db.configs = main,failover
node.db.config.main.type = REPL_MASTER
node.db.config.failover.inheritFrom = main
node.db.config.failover.type = REPL_SLAVE
node.db.config.failover.host = dccrhsss.cloud1.edited
node.db.config.failover.port = 3306

** you must to have the node.properties this way for a single node.
(note node.db.config.main.host = localhost )

node.properties on Primary Node :
node.id = 001a1fb94a0a4fcEdited
node.enabled = true
node.cluster.pass = $L7C2$1bead,sIDyBFEdited==
node.db.config.main.host = localhost
node.db.config.main.port = 3306
node.db.config.main.name = ssg
node.db.config.main.user = gateway
node.db.config.main.pass = $L7C2$1bead,B6Edited==


node.properties on Secondary Node :
node.id = c17c82dda8604869aEdited
node.enabled = true
node.cluster.pass = $L7C2$1bead,OboKf0kEdited==
node.db.config.main.host = localhost
node.db.config.main.port = 3306
node.db.config.main.name = ssg
node.db.config.main.user = gateway
node.db.config.main.pass = $L7C2$1bead,Kjnd2Edited==


9. Edit the /etc/my.cnf in a text editor.
Locate the following section:
# Uncomment log-bin and log-slave-update if a clustered
# db server
log-bin
log-slave-update
# uncomment the next item on 1st db master server
#server-id=1
# uncomment the next item on 2nd db master servers
server-id=2


And modify the section to this (Comment All the lines Below):


# Uncommment log-bin and log-slave-update if a clustered
# db server
#log-bin
#log-slave-update
# uncomment the next item on 1st db master server
#server-id=1
# uncomment the next item on 2nd db master servers
#server-id=2


Save and exit the editor.

10. Start the Gateway service on both nodes: service ssg start
11. check there is not replication output with this command :
    mysql -e "show slave status\G" 
    
    Note : result must be empty

12. Deactivate a Cluster Node, by using instructions from :
https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/layer7-api-management/api-gateway/10-0/install-configure-upgrade/configure-a-gateway-cluster/deactivating-a-cluster-node.html