How to remove a member of a cluster via CLI

Requirements: Acess by SSH with the ‘mt4adm’ user or access through HTTPS web with the ‘admin’ user.

Recommendations: Take a snapshot of the instances that should continue in the cluster before the procedure.

Context example: There are 3 nodes in a cluster and it’s necessary to remove one of them, the third one.

This process can be done through CLI in the following way:

  • On the Third node:
orbit cluster stop
orbit shutdown
  • On the First node:
orbit cluster stop
  • On the Second node:
orbit cluster stop
  • On the First node:
orbit cluster config --ip=CURRENT_MACHINE_IP_IP --nodes=PRIMARY_MACHINE_IP,SECONDARY_MACHINE_IP --segment=0 --latency=high
orbit cluster start
  • On the Second node:
orbit cluster config --ip=CURRENT_MACHINE_IP_IP --nodes=PRIMARY_MACHINE_IP,SECONDARY_MACHINE_IP --segment=0 --latency=high
orbit cluster start
  • On the First node:
orbit service elasticsearch-senhasegura stop
orbit elasticsearch setup
  • On the Second node:
orbit service elasticsearch-senhasegura stop
orbit elasticsearch setup