Update ROMA version
This page explains about How to update ROMA version?
(In case of update v0.8.14 to v1.1.0 as a example.)
Normal Update(with shutdown)
If you want to update ROMA version without shutdown, please refer the Rolling Update.
1. Shutdown ROMA
Stop the All process by use 'balse' or 'shutdown' command. Please refer Shutting Down(Complete Stop of ROMA) how to stop ROMA.
2. Download new version of ROMA
Download & convert ROMA main unit.
Ex.) Direct Download
$ cd {#your roma path#}
$ cd ../
$ ls -l roma*
drwxrwxr-x 3 roma roma 4096 Sep 30 05:13 roma-0.8.14
$ wget https://github.com/roma/roma/archive/v1.1.0.tar.gz
$ tar -zxvf v1.1.0.tar.gz
$ ls -l roma*
drwxrwxr-x 3 roma roma 4096 Sep 30 05:13 roma-0.8.14
drwxrwxr-x 3 roma roma 4096 Sep 30 05:13 roma-1.1.0
Ex.) Github Download
$ cd {#your roma path#}
$ git tag
v0.8.0
.
.
v0.8.14
.
.
.
v1.1.0
$ git checkout -b v1.1.0 refs/tags/v1.1.0
3. Booting up ROMA with new version
$ cd {# your NEW VERSION roma path #}
$ bin/romad ${HOST1} -p ${PORT1} -d --config {# config.rb's PATH #}
$ bin/romad ${HOST1} -p ${PORT2} -d --config {# config.rb's PATH #}
4. Check Status
- check version & stat result
$ telnet ${HOST1} ${PORT1}
> version
VERSION ROMA-1.1.0
> stat node
Please refer Status List for result of "stat node".
Rolling Update(without shutdown)
ROMA has been adopted P2P architecture, so you can update ROMA version one by one.
It means you can update ROMA version without stopping service which use ROMA.
1. Release data to other instance
Distribute data of target instance to other instances by use "release" command.
$ telnet ${TARGET_HOST} ${TARGET_PORT}
> version
VERSION ROMA-0.8.14
> stat primary
routing.primary 117
END
> stat secondary
routing.secondary 111
END
> stat run_release
stats.run_release false
END
> release
STARTED
> stat run_release
stats.run_release true
END
### wait a few minutes(depends on your ROMA's data size or server count or etc...)
> stat run_release
stats.run_release false
END
> stat primary
routing.primary 0
END
> stat secondary
routing.secondary 0
END
2. Separate target instance
Removing target ROMA instance by use 'shutdown_self' command.
$ telnet ${TARGET_HOST} ${TARGET_PORT}
> shutdown_self
=================================================================
CAUTION!!:
This command kill the instance!
There is some possibility of occuring redundancy down!
=================================================================
Are you sure to shutdown this instance?(yes/no)
> yes
BYE
Connection closed by foreign host.
Please refer Removing one ROMA process for more detail
3. Download new version of ROMA
Download & convert ROMA main unit.
Ex.) Direct Download
$ cd {#your roma path#}
$ cd ../
$ ls -l roma*
drwxrwxr-x 3 roma roma 4096 Sep 30 05:13 roma-0.8.14
$ wget https://github.com/roma/roma/archive/v1.1.0.tar.gz
$ tar -zxvf v1.1.0.tar.gz
$ ls -l roma*
drwxrwxr-x 3 roma roma 4096 Sep 30 05:13 roma-0.8.14
drwxrwxr-x 3 roma roma 4096 Sep 30 05:13 roma-1.1.0
Ex.) Github Download
$ cd {#your roma path#}
$ git tag
v0.8.0
.
.
v0.8.14
.
.
.
v1.1.0
$ git checkout -b v1.1.0 refs/tags/v1.1.0
4. Reposit target instance with new version by use "join" command.
Please refer Adding the new process how to add.
5. Check Status
- check join process was finished
$ telnet ${TARGET_HOST} ${TARGET_PORT}
> stat run_join
stats.run_join false
END
> stat primary
routing.primary xxx ###should be over 0
END
> stat secondary
routing.secondary xxx ###sholud be over 0
END
$ telnet ${TARGET_HOST} ${TARGET_PORT}
> version
VERSION ROMA-1.1.0
> stat node
Please refer Status List for result of "stat node".
- Please execute these procedure(1-5) in all instances.
- Execute procedure one server by one server (means NOT execute at once in all server).
- After finising all instance's updating, in case of vnodes count rate is too unbalanced, please execute 'balance' command.