Openshift - Moving gears from one node to another

AFAIK, this can only by done by the root on the broker node.

broker ~ # oo-admin-move --help
== Synopsis

oo-admin-move: Move an app from one node to another

== Usage

oo-admin-move OPTIONS

Options:
--gear_uuid
    Gear uuid to move
--destination_district_uuid
    Destination district uuid
-i|--target_server_identity
    Target server identity
-p|--node_profile
    Node profile
-t|--timeout
    timeout
--change_district
    Move to a different district other than the source district
-h|--help
    Show Usage info


So first, we must obtain the gear ID list. And choose which gear we want to move.

rhc app show --gear -a appname -n appdomain

Then we need to specify the destination node FQDN (fully qualified domain name) and the gear uuid in the broker's root console.

oo-admin-move --gear_uuid zzzzzzz -i nodetarget.domain.com

Example result :


broker ~ # oo-admin-move --gear_uuid 54f7c4e398988bb221000083 -i node2.aon.telkom.co.id
URL: http://railtest-test.aon.telkom.co.id
Login: yayan
App UUID: 54f7c4e398988bb221000083
Gear UUID: 54f7c4e398988bb221000083
DEBUG: Source district uuid: 542e1fa998988be20f000001
DEBUG: Destination district uuid: 542e1fa998988be20f000001
DEBUG: Getting existing app 'railtest' status before moving
DEBUG: Gear component 'ruby-1.9' was running
DEBUG: Stopping existing app cartridge 'ruby-1.9' before moving
DEBUG: Stopping existing app cartridge 'haproxy-1.4' before moving
DEBUG: Force stopping existing app before moving
DEBUG: Gear platform is 'linux'
DEBUG: Creating new account for gear 'railtest' on node2.aon.telkom.co.id
DEBUG: Moving content for app 'railtest', gear 'railtest' to node2.aon.telkom.co.id
Identity added: /etc/openshift/rsync_id_rsa (/etc/openshift/rsync_id_rsa)
Agent pid 8861
unset SSH_AUTH_SOCK;
unset SSH_AGENT_PID;
echo Agent pid 8861 killed;
DEBUG: Moving system components for app 'railtest', gear 'railtest' to node2.aon.telkom.co.id
Identity added: /etc/openshift/rsync_id_rsa (/etc/openshift/rsync_id_rsa)
Agent pid 8891
unset SSH_AUTH_SOCK;
unset SSH_AGENT_PID;
echo Agent pid 8891 killed;
DEBUG: Starting cartridge 'haproxy-1.4' in 'railtest' after move on node2.aon.telkom.co.id
DEBUG: Starting cartridge 'ruby-1.9' in 'railtest' after move on node2.aon.telkom.co.id
DEBUG: Fixing DNS and mongo for gear 'railtest' after move
DEBUG: Changing server identity of 'railtest' from 'node1.aon.telkom.co.id' to 'node2.aon.telkom.co.id'
DEBUG: Deconfiguring old app 'railtest' on node1.aon.telkom.co.id after move
Successfully moved gear with uuid '54f7c4e398988bb221000083' of app 'railtest' from 'node1.aon.telkom.co.id' to 'node2.aon.telkom.co.id'




Comments

Popular posts from this blog

Long running process in Linux using PHP

Reverse Engineering Reptile Kernel module to Extract Authentication code

SAP System Copy Lessons Learned